commit fe0d42203cb5616eeff68b14576a0f7e2dd56625 Author: Linus Torvalds Date: Mon Jul 4 15:56:24 2011 -0700 Linux 3.0-rc6 commit 532df6f3faa66b28b9b053775f5fa33761b8104e Merge: fc52693 a5ec7f8 Author: Linus Torvalds Date: Mon Jul 4 15:54:37 2011 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: (277 commits) [SCSI] isci: fix checkpatch errors isci: Device reset should request sas_phy_reset(phy, true) isci: pare back error messsages isci: cleanup silicon revision detection isci: merge scu_unsolicited_frame.h into unsolicited_frame_control.h isci: merge sata.[ch] into request.c isci: kill 'get/set' macros isci: retire scic_sds_ and scic_ prefixes isci: unify isci_host and scic_sds_controller isci: unify isci_remote_device and scic_sds_remote_device isci: unify isci_port and scic_sds_port isci: fix scic_sds_remote_device_terminate_requests isci: unify isci_phy and scic_sds_phy isci: unify isci_request and scic_sds_request isci: rename / clean up scic_sds_stp_request isci: preallocate requests isci: combine request flags isci: unify can_queue tracking on the tci_pool, uplevel tag assignment isci: Terminate dev requests on FIS err bit rx in NCQ isci: fix frame received locking ... commit fc52693f8f54485af29be1adc90ce2bd54ad325f Merge: aababb9 64393b3 Author: Linus Torvalds Date: Mon Jul 4 15:54:18 2011 -0700 Merge branch 'at91/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-2.6-arm-soc * 'at91/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-2.6-arm-soc: AT91: Change nand buswidth logic to match hardware default configuration at91: Use "pclk" as con_id on at91cap9 and at91rm9200 at91: fix udc, ehci and mmc clock device name for cap9/9g45/9rl atmel_serial: fix internal port num at91: fix at91_set_serial_console: use platform device id commit aababb9766f0e874da26a17acbbec867bf9501f0 Merge: b2bc478 3e86f1d Author: Linus Torvalds Date: Mon Jul 4 15:53:53 2011 -0700 Merge branch 'fbdev-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-3.x * 'fbdev-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-3.x: vesafb: fix memory leak fbdev: amba: Link fb device to its parent fsl-diu-fb: remove check for pixel clock ranges udlfb: Correct sub-optimal resolution selection. hecubafb: add module_put on error path in hecubafb_probe() sm501fb: fix section mismatch warning gx1fb: Fix section mismatch warnings fbdev: sh_mobile_meram: Correct pointer check for YCbCr chroma plane commit b2bc4782191cb574924a1d09f48083ea8b33a93b Author: Goldwyn Rodrigues Date: Mon Jul 4 09:26:57 2011 -0700 RDMA: Check for NULL mode in .devnode methods Commits 71c29bd5c235 ("IB/uverbs: Add devnode method to set path/mode") and c3af0980ce01 ("IB: Add devnode methods to cm_class and umad_class") added devnode methods that set the mode. However, these methods don't check for a NULL mode, and so we get a crash when unloading modules because devtmpfs_delete_node() calls device_get_devnode() with mode == NULL. Add the missing checks. Signed-off-by: Goldwyn Rodrigues [ Also fix cm.c. - Roland ] Signed-off-by: Roland Dreier Signed-off-by: Linus Torvalds commit 64393b3ae4e3cc86e2d622f682d736ec973364b6 Author: Nicolas Ferre Date: Fri Jul 1 12:25:24 2011 +0200 AT91: Change nand buswidth logic to match hardware default configuration The recently modified nand buswitth configuration is not aligned with board reality: the double footprint on boards is always populated with 8bits buswidth nand flashes. So we have to consider that without particular configuration the 8bits buswidth is selected by default. Moreover, the previous logic was always using !board_have_nand_8bit(), we change it to a simpler: board_have_nand_16bit(). Signed-off-by: Nicolas Ferre Tested-by: Ludovic Desroches Signed-off-by: Arnd Bergmann commit 3e86f1d8e397b1ef59a97910089e16a99e8f31f7 Author: Daniel J Blueman Date: Mon Jun 27 23:08:53 2011 +0000 vesafb: fix memory leak When releasing framebuffer, free colourmap allocations. Signed-off-by: Daniel J Blueman Signed-off-by: Paul Mundt commit ba466c74d99b91b2f390a09ad31bbc6cddd8cf4b Merge: 070f944 f5da24d Author: Linus Torvalds Date: Sun Jul 3 13:33:16 2011 -0700 Merge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6 * 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6: PM / Runtime: Update documentation regarding driver removal PM: Documentation: fix typo: pm_runtime_idle_sync() doesn't exist. commit a5ec7f86dc5432c44d8407a144e7617ec65da770 Author: James Bottomley Date: Sun Jul 3 14:14:45 2011 -0500 [SCSI] isci: fix checkpatch errors Signed-off-by: James Bottomley commit 5b45b69c0573b802a50ccad30e154b93d3b36ff8 Merge: db111e1 bc6f387 Author: James Bottomley Date: Sun Jul 3 14:19:29 2011 -0500 Merge git://git.kernel.org/pub/scm/linux/kernel/git/djbw/isci commit 070f944a0bb9dd27772fa232bd7648ccc5780548 Merge: b775c38 ee1b3ea Author: Linus Torvalds Date: Sun Jul 3 11:12:21 2011 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6: cifs: set socket send and receive timeouts before attempting connect commit b775c389252886b64f037a655934fa1df7c03006 Merge: 9508d80 af75d5b Author: Linus Torvalds Date: Sun Jul 3 11:12:06 2011 -0700 Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: hwmon: (k10temp) Update documentation for Fam12h hwmon-vid: Fix typo in VIA CPU name hwmon: (f71882fg) Add support for the F71869A hwmon: Use <> rather than () around my e-mail address hwmon: (emc6w201) Properly handle all errors commit af75d5b771269f764999a67511e7d0c995d1a185 Author: Clemens Ladisch Date: Sun Jul 3 13:32:54 2011 +0200 hwmon: (k10temp) Update documentation for Fam12h Add some CPU series IDs and links to the Fam12h datasheets. Signed-off-by: Clemens Ladisch Signed-off-by: Jean Delvare commit 014ab488e2ebdc65d2088a3ab6d4b8c4472c57fe Author: Jean Delvare Date: Sun Jul 3 13:32:54 2011 +0200 hwmon-vid: Fix typo in VIA CPU name It's Nehemiah, not Nemiah. Signed-off-by: Jean Delvare Acked-by: Guenter Roeck commit 5da556e33fc53179a5bec10b5698e262cf68e26d Author: Hans de Goede Date: Sun Jul 3 13:32:53 2011 +0200 hwmon: (f71882fg) Add support for the F71869A The F71869A is almost the same as the F71869F/E, except that it has the normal number of temp and pwm zones for a F71882FG derived chip, rather then the limited number of the F71869F/E. Signed-off-by: Hans de Goede Tested-by: Max Baldwin Acked-by: Guenter Roeck Signed-off-by: Jean Delvare commit 7958e3b45dd03bf4bc35b3ec97b8a9a4d6c616a5 Author: Hans de Goede Date: Sun Jul 3 13:32:53 2011 +0200 hwmon: Use <> rather than () around my e-mail address Signed-off-by: Hans de Goede Signed-off-by: Jean Delvare commit b6b2a1e8068684baf67307a994180976b7c443ed Author: Jean Delvare Date: Sun Jul 3 13:32:53 2011 +0200 hwmon: (emc6w201) Properly handle all errors Handle errors on 8-bit register reads and writes too. Also use likely and unlikely to make the functions faster on success. Signed-off-by: Jean Delvare Acked-by: Guenter Roeck commit bc6f387d3156702a0430585b93c04934254c0de1 Author: Jeff Skirvin Date: Fri Jul 1 13:03:44 2011 -0700 isci: Device reset should request sas_phy_reset(phy, true) The hard_reset parameter passed to the LLDD in the direct-attached phy control case allows the LLDD to filter link failure events while the direct-attached device reset is executing. Signed-off-by: Jeff Skirvin Signed-off-by: Dan Williams commit a8a0a133b03c6863d0f77229d19befca4de905fa Author: Dan Williams Date: Fri Jul 1 12:07:25 2011 -0700 isci: pare back error messsages The messages emitted from task.c and some from request.c likely duplicate (in a less undertandable way) what is reported by the midlayer. Signed-off-by: Dan Williams commit dc00c8b6940aa10ab1ce6a4d10b1bfe7b848781b Author: Dan Williams Date: Fri Jul 1 11:41:21 2011 -0700 isci: cleanup silicon revision detection Perform checking per-pci device (even though all systems will only have 1 pci device in this generation), and delete support for silicon that does not report a proper revision (i.e. A0). Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit 4e4dca3de9658f364d34924e072f2b64e5c3d267 Author: Dan Williams Date: Fri Jul 1 11:15:12 2011 -0700 isci: merge scu_unsolicited_frame.h into unsolicited_frame_control.h Does not need its own file. Signed-off-by: Dan Williams commit 16ba77091b44af28b3ff3318b4a2aa4fbf7d4c24 Author: Dan Williams Date: Fri Jul 1 10:52:55 2011 -0700 isci: merge sata.[ch] into request.c Undo some needless separation. Signed-off-by: Dan Williams commit 34a991587a5cc9f78960c2c9beea217866458c41 Author: Dan Williams Date: Fri Jul 1 02:25:15 2011 -0700 isci: kill 'get/set' macros Most of these simple dereference macros are longer than their open coded equivalent. Deleting enum sci_controller_mode is thrown in for good measure. Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit 89a7301f21fb00e753089671eb9e4132aab8ea08 Author: Dan Williams Date: Thu Jun 30 19:14:33 2011 -0700 isci: retire scic_sds_ and scic_ prefixes The distinction between scic_sds_ scic_ and sci_ are no longer relevant so just unify the prefixes on sci_. The distinction between isci_ and sci_ is historically significant, and useful for comparing the old 'core' to the current Linux driver. 'sci_' represents the former core as well as the routines that are closer to the hardware and protocol than their 'isci_' brethren. sci == sas controller interface. Also unwind the 'sds1' out of the parameter structs. Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit d9dcb4ba791de2a06b19ac47cd61601cf3d4e208 Author: Dan Williams Date: Thu Jun 30 17:38:32 2011 -0700 isci: unify isci_host and scic_sds_controller Remove the distinction between these two implementations and unify on isci_host (local instances named ihost). Hmmm, we had two 'oem_parameters' instances, one was unused... nice. Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit 78a6f06e0e82125787d7aa308fe28c2c8381540c Author: Dan Williams Date: Thu Jun 30 16:31:37 2011 -0700 isci: unify isci_remote_device and scic_sds_remote_device Remove the distinction between these two implementations and unify on isci_remote_device (local instances named idev). Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit ffe191c92ff195d73f9130b1490045ca2dd4c5e0 Author: Dan Williams Date: Wed Jun 29 13:09:25 2011 -0700 isci: unify isci_port and scic_sds_port Remove the distinction between these two implementations and unify on isci_port (local instances named iport). The duplicate '->owning_port' and '->isci_port' in both isci_phy and isci_remote_device will be fixed in a later patch... this is just the straightforward rename/unification. Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit 76802ce6756d605fbd7a9a43c196e9a471b3e57c Author: Dan Williams Date: Wed Jun 29 09:45:48 2011 -0700 isci: fix scic_sds_remote_device_terminate_requests Commit 0815632 "isci: unify remote_device stop_handlers" introduced the possibility that not all requests get terminated if we reach the request_count. Now that we properly reference count devices we don't need this self-defense and can do the straightforward scan of all active requests. Reported-by: Jeff Skirvin Acked-by: Jeff Skirvin Signed-off-by: Dan Williams commit 852809559e4680ba4768262a6c3d21454fcd460e Author: Dan Williams Date: Tue Jun 28 15:05:53 2011 -0700 isci: unify isci_phy and scic_sds_phy They are one in the same object so remove the distinction. The near duplicate fields (owning_port, and isci_port) will be cleaned up after the scic_sds_port isci_port unification. Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit 5076a1a97e2fa61c847a5fdd4b1991faf7716da6 Author: Dan Williams Date: Mon Jun 27 14:57:03 2011 -0700 isci: unify isci_request and scic_sds_request They are one in the same object so remove the distinction. The near duplicate fields (owning_controller, and isci_host) will be cleaned up after the scic_sds_contoller isci_host unification. Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit ba7cb22342a66505a831bb7e4541fef90e0193c9 Author: Dan Williams Date: Mon Jun 27 11:56:41 2011 -0700 isci: rename / clean up scic_sds_stp_request * Rename scic_sds_stp_request to isci_stp_request * Remove the unused fields and union indirection Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit db0562509800a2d4cb5cb14a66413c30484f165c Author: Dan Williams Date: Fri Jun 17 14:18:39 2011 -0700 isci: preallocate requests the dma_pool interface is optimized for object_size << page_size which is not the case with isci_request objects and the dma_pool routines show up in the top of the profile. The old io_request_table which tracked whether tci slots were in-flight or not is replaced with an IREQ_ACTIVE flag per request. Signed-off-by: Dan Williams commit 38d8879baeb61b6946052739e7c03fa79b3a57f0 Author: Dan Williams Date: Thu Jun 23 14:33:48 2011 -0700 isci: combine request flags Combine three bools into one unsigned long 'flags'. Doesn't increase the request size due to packing. (to do: optimize the structure layout). Signed-off-by: Dan Williams commit 312e0c2455c18716cf640d4336dcb1e9e5053818 Author: Dan Williams Date: Tue Jun 28 13:47:09 2011 -0700 isci: unify can_queue tracking on the tci_pool, uplevel tag assignment The tci_pool tracks our outstanding command slots which are also the 'index' portion of our tags. Grabbing the tag early in ->lldd_execute_task let's us drop the isci_host_can_queue() and ->was_tag_assigned_by_user infrastructure. ->was_tag_assigned_by_user required the task context to be duplicated in request-local buffer. With the tci established early we can build the task_context directly into its final location and skip a memcpy. With the task context buffer at a known address at request construction we have the opportunity/obligation to also fix sgl handling. This rework feels like it belongs in another patch but the sgl handling and task_context are too intertwined. 1/ fix the 'ab' pair embedded in the task context to point to the 'cd' pair in the task context (previously we were prematurely linking to the staging buffer). 2/ fix the broken iteration of pio sgls that assumes all sgls are relative to the request, and does a dangerous looking reverse lookup of physical address to virtual address. Signed-off-by: Dan Williams commit 9274f45ea551421cd3bf329de9dd8d1e6208285a Author: Jeff Skirvin Date: Thu Jun 23 17:09:02 2011 -0700 isci: Terminate dev requests on FIS err bit rx in NCQ When the remote device transitions to a not-ready state because of an NCQ error condition, all outstanding requests to that device are terminated and completed to libsas on the normal path. The device then waits for a READ LOG EXT command to issue on the task management path. Signed-off-by: Jeff Skirvin Signed-off-by: Dan Williams commit 4cffe13e0dfd00f90c86b0153c751dab61a1bf1d Author: Dan Williams Date: Thu Jun 23 23:44:52 2011 -0700 isci: fix frame received locking Updates to the frame_rcvd before need to be atomic with respect to when they are evaluated by libsas. Signed-off-by: Dan Williams commit 7cafbf1bd56be44038148bb8f733ea6e6a6a2d53 Author: Maciej Patelczyk Date: Tue Jun 21 22:03:13 2011 +0000 isci: possible buffer overflow in isci_parse_oem_parameters fixed scu_index is a parameter of isci_parse_eom_parameters and is an index in controller table. There is a check: scu_index > SCI_MAX_CONTROLLERS which is insufficient and should be: scu_index >= SCI_MAX_CONTROLLERS. scu_index is used as an index in the table which size is SCI_MAX_CONTROLLERS. Signed-off-by: Maciej Patelczyk Signed-off-by: Dan Williams commit 086a0dabc5bf154e13604a6d71e2d051207f9718 Author: Dan Williams Date: Tue Jun 21 16:23:03 2011 -0700 isci: fix isci_task_execute_tmf completion 1/ fix the timeout for wait_for_completion_timeout 2/ In the tmf timeout case we need to wait for our termination callback 3/ Once the request is successfully started it will be freed according to the normal lifetime for requests. Signed-off-by: Dan Williams commit e9bf709564e90abea25ca7aeae8c3de5cc6468d7 Author: Dan Williams Date: Thu Jun 16 16:59:56 2011 -0700 isci: fix support for arbitrarily large smp requests Instead of duplicating the smp request buffer reuse the one provided by libsas. This future proofs the driver to support arbitrarily large smp requests, and shrinks the request structure size by ~700 bytes. Signed-off-by: Dan Williams commit ddcc7e347a891937be65358b43f40b7f81185f8f Author: Dan Williams Date: Fri Jun 17 10:40:43 2011 -0700 isci: fix dma_unmap_sg usage One bug and a cleanup: 1/ Fix cases where we were unmapping invalid addresses (smp requests were being unmapped) [ 604.662770] ------------[ cut here ]------------ [ 604.668026] WARNING: at lib/dma-debug.c:800 check_unmap+0x418/0x740() [ 604.675315] Hardware name: SandyBridge Platform [ 604.680465] isci 0000:03:00.0: DMA-API: device driver tries to free an invalid DMA memory address 2/ The unmap routine is too large to be an inline function, and isci_request_io_request_get_next_sge is unused. Signed-off-by: Dan Williams commit 5edc33480c1c363ab361a881f2957b9fba5185cf Author: Dan Williams Date: Thu Jun 16 17:20:35 2011 -0700 isci: fix smp response frame overrun Due to a typo we currently copy way too much when copying over the response data, but since a request is likely backed by a full page allocation we don't corrupt live data. Signed-off-by: Dan Williams commit ff60639dc9a461883db9192d2da0674a00339f12 Author: Dan Williams Date: Fri Jun 17 13:34:43 2011 -0700 isci: kill device_sequence Now that we have upleveled device reassignment protection to the isci_remote_device reference count we no longer need this level of self-defense. Signed-off-by: Dan Williams commit f2088267514b39af1a94409168101527769a911c Author: Dan Williams Date: Thu Jun 16 11:26:12 2011 -0700 isci: kill isci_remote_device_change_state() Now that "stopping/stopped" are one in the same and signalled by a NULL device pointer the rest of the device status infrastructure can be removed (->status and ->state_lock). The "not ready for i/o state" is replaced with a state flag, and is evaluated under scic_lock so that we don't see transients from taking the device reference to submitting the i/o. This also fixes a potential leakage of can_queue slots in the rare case that SAS_TASK_ABORTED is set at submission. Signed-off-by: Dan Williams commit 209fae14fabfd48525e5630bebbbd4ca15090c60 Author: Dan Williams Date: Mon Jun 13 17:39:44 2011 -0700 isci: atomic device lookup and reference counting We have unsafe references to remote devices that are notified to disappear at lldd_dev_gone. In order to clean this up we need a single canonical source for device lookups and stable references once a lookup succeeds. Towards that end guarantee that domain_device.lldd_dev is NULL as soon as we start the process of stopping a device. Any code path that wants to safely lookup a remote device must do so through task->dev->lldd_dev (isci_lookup_device()). For in-flight references outside of scic_lock we need reference counting to ensure that the device is not recycled before we are done with it. Simplify device back references to just scic_sds_request.target_device which is now the only permissible internal reference that is maintained relative to the reference count. There were two occasions where we wanted new i/o's to be treated as SAS_TASK_UNDELIVERED but where the domain_dev->lldd_dev link is still intact. Introduce a 'gone' flag to prevent i/o while waiting for libsas to take action on the port down event. One 'core' leftover is that we currently call scic_remote_device_destruct() from isci_remote_device_deconstruct() which is called when the 'core' says the device is stopped. It would be more natural for the final put to trigger isci_remote_device_deconstruct() but this implementation is deferred as it requires other changes. Signed-off-by: Dan Williams commit 360b03ed178a4fe3971b0a098d8feeb53333481b Author: Dan Williams Date: Wed Jun 15 11:11:03 2011 -0700 isci: fix ssp response iu buffer size in isci_tmf In isci_task_request_complete() we save the response/sense data from the command. Make sure isci_tmf has enough space to hold the full response. [ it does not look like we actually use this data, and response_data_len/sense_data_len should be specifying the byte count, in any event do the simple fix first so we don't corrupt memory ] Reported-by: Adam Gruchala Tested-by: Edmund Nadolski Signed-off-by: Dan Williams commit 0d0cf14c9bd2943ed5afd15df459f564d85eacde Author: Dan Williams Date: Mon Jun 13 00:51:30 2011 -0700 isci: cleanup request allocation Rather than return an error code and update a pointer that was passed by reference just return the request object directly (or null if allocation failed). Signed-off-by: Dan Williams commit 994a9303d33f8238d57f58c26067b6d4ac9af222 Author: Dan Williams Date: Thu Jun 9 16:04:28 2011 -0700 isci: cleanup/optimize queue increment macros Every single i/o or event completion incurs a test and branch to see if the cycle bit changed. For power-of-2 queue sizes the cycle bit can be read directly from the rollover of the queue pointer. Likely premature optimization, but the hidden if() and hidden assignments / side-effects in the macros were already asking to be cleaned up. Signed-off-by: Dan Williams commit dd047c8e2bca22856050dbe0378a37cf44eecc97 Author: Dan Williams Date: Thu Jun 9 11:06:58 2011 -0700 isci: cleanup tag macros A tag is a 16 bit number where the upper four bits is a sequence number and the remainder is the task context index (tci). Sanitize the macro names and shave 256-bytes out of scic_sds_controller by reducing the size of io_request_sequence. scic_sds_io_tag_construct --> ISCI_TAG scic_sds_io_tag_get_sequence --> ISCI_TAG_SEQ scic_sds_io_tag_get_index() --> ISCI_TAG_TCI scic_sds_io_sequence_increment() [delete / open code] Signed-off-by: Dan Williams commit ac668c69709c7d927015c5cf3d9e87bf4eaaf57d Author: Dan Williams Date: Tue Jun 7 18:50:55 2011 -0700 isci: cleanup/optimize pool implementation The circ_buf macros are ~6% faster, as measured by perf, because they take advantage of power-of-two math assumptions i.e. no test and branch for rollover. Their semantics are clearer than the hidden side effects in pool.h (like sci_pool_get() which hides an assignment). Signed-off-by: Dan Williams commit 9b917987fd16d0687afe550a02f68099419f5d43 Author: Jeff Skirvin Date: Mon Jun 20 14:09:31 2011 -0700 isci: Disable link layer hang detection Some targets exceed the hang detect timer. Use the OS timeout to catch hung tasks. Signed-off-by: Jeff Skirvin Signed-off-by: Dan Williams commit fd0527ab15bfd96f04b084b1b2550f80cf151b60 Author: Jeff Skirvin Date: Mon Jun 20 14:09:26 2011 -0700 isci: Hard reset failure will link reset all phys in the port In the case where the hard reset process fails, each link in the port is put through a link reset sequence. Signed-off-by: Jeff Skirvin Signed-off-by: Dan Williams commit fd53660120b5eda06539225de56755dc389a4e64 Author: Jeff Skirvin Date: Mon Jun 20 14:09:22 2011 -0700 isci: Explicitly decode remote node ready and suspended states The remote node context should only signal a device reset condition in a suspended state. Signed-off-by: Jeff Skirvin Signed-off-by: Dan Williams commit 980d3aeb3828b0fdf2a0b2e893d238130b014575 Author: Dan Williams Date: Mon Jun 20 15:11:22 2011 -0700 isci: fix isci_terminate_pending() list management Walk through the list of pending requests being careful to consider that multiple requests can be terminated when the lock is dropped (i.e. invalidating the 'next' reference established by list_for_each_entry_safe). Also noticed that all callers to isci_terminate_pending_requests() specifying terminating, so just drop the parameter. Signed-off-by: Dan Williams commit 77c852f312243192b1f2ce7fc56d678784786692 Author: Jeff Skirvin Date: Mon Jun 20 14:09:16 2011 -0700 isci: Handle timed-out request terminations correctly In the situation where a termination of an I/O times-out, make sure that the linkage from the request to the task is severed completely. Also make sure that the selection of tasks to terminate occurs under scic_lock. Signed-off-by: Jeff Skirvin Signed-off-by: Dan Williams commit f53a3a32c1e799e27f63bff7b42b4c36749e5e6f Author: Jeff Skirvin Date: Mon Jun 20 14:09:11 2011 -0700 isci: Requests that do not start must be set to "complete" Requests that fail at start because of a reset pending condition must be set to complete in order to allow for later cleanup. Signed-off-by: Jeff Skirvin Signed-off-by: Dan Williams commit cde76fbf1f27551a08860227765ae8d5026ac0d9 Author: Jeff Skirvin Date: Mon Jun 20 14:09:06 2011 -0700 isci: Add decode for SMP request retry error condition There are situations with slow expanders in which a first attempt to execute an SMP request will fail with a timeout. Immediate subsequent retries will generally succeed. This change makes sure SMP I/O failures are immediately failed to libsas so that retries happen with no discovery process timeout delay. Signed-off-by: Jeff Skirvin Signed-off-by: Dan Williams commit 61aaff49e20fdb700f1300a49962bc76effc77fc Author: Jeff Skirvin Date: Tue Jun 21 12:16:33 2011 -0700 isci: filter broadcast change notifications during SMP phy resets When resetting a sata device in the domain we have seen occasions where libsas prematurely marks a device gone in the time it takes for the device to re-establish the link. This plays badly with software raid arrays. Other libsas drivers have non-uniform delays in their reset handlers to try to cover this condition, but not sufficient to close the hole. Given that a sata device can take many seconds to recover we filter bcns and poll for the device reattach state before notifying libsas that the port needs the domain to be rediscovered. Once this has been proven out at the lldd level we can think about uplevelling this feature to a common implementation in libsas. Signed-off-by: Jeff Skirvin [ use kzalloc instead of kmem_cache ] Signed-off-by: Dave Jiang [ use eventq and time macros ] Signed-off-by: Dan Williams commit ff717ab05f0c33f93514eccea6dfe1a15983e1d1 Author: Jeff Skirvin Date: Mon Jun 20 14:08:51 2011 -0700 isci: Move the reset delay after the remote node resumption. Delay after bringing up the RNC to allow for resumption latency. Signed-off-by: Jeff Skirvin Signed-off-by: Dan Williams commit 7c78da3175177c905a75c54b5830029c778494ea Author: Dan Williams Date: Wed Jun 1 16:00:01 2011 -0700 isci: remove 'min memory' infrastructure The old 'core' had aspirations of running in severely memory constrained environments like bios option-rom, it's not needed for Linux and gets in the way of other cleanups (like unifying/reducing the number of structure members in scic_sds_controller/isci_host). This also fixes a theoretical bug in that the driver would blindly override the silicon advertised limits for number of ports, task contexts, and remote node contexts. Signed-off-by: Dan Williams commit dbb0743a58825d94f1b3fdfa90a8d61dfef88f7b Author: Adam Gruchala Date: Wed Jun 1 22:31:03 2011 +0000 isci: Added support for C0 to SCU Driver C0 silicon updates the pci revision id and requires new AFE parameters for phy signal integrity. Support for previous silicon revisions is deprecated (it's also broken for the theoretical case of multiple controllers at different silicon revisions, all the more reason to get it removed as soon as possible) Signed-off-by: Adam Gruchala [fixed up deprecated silicon support] Signed-off-by: Dan Williams commit 12ef65444de9d387a383b9991960848bed5bbe74 Author: Edmund Nadolski Date: Thu Jun 2 00:10:50 2011 +0000 isci: additional state machine cleanup Additional state machine cleanups: o Remove static functions sci_state_machine_exit_state() and sci_state_machine_enter_state() o Combines sci_base_state_machine_construct() and sci_base_state_machine_start() into a single function, sci_init_sm() o Remove sci_base_state_machine_stop() which is unused. o Kill state_machine.[ch] Signed-off-by: Edmund Nadolski [fixed too large to inline functions] Signed-off-by: Dan Williams commit e301370ac553a9a0ac0d1d25e769b86cf60395b3 Author: Edmund Nadolski Date: Thu Jun 2 00:10:43 2011 +0000 isci: state machine cleanup This cleans up several areas of the state machine mechanism: o Rename sci_base_state_machine_change_state to sci_change_state o Remove sci_base_state_machine_get_state function o Rename 'state_machine' struct member to 'sm' in client structs o Shorten the name of request states o Shorten state machine state names as follows: SCI_BASE_CONTROLLER_STATE_xxx to SCIC_xxx SCI_BASE_PHY_STATE_xxx to SCI_PHY_xxx SCIC_SDS_PHY_STARTING_SUBSTATE_xxx to SCI_PHY_SUB_xxx SCI_BASE_PORT_STATE_xxx to SCI_PORT_xxx and SCIC_SDS_PORT_READY_SUBSTATE_xxx to SCI_PORT_SUB_xxx SCI_BASE_REMOTE_DEVICE_STATE_xxx to SCI_DEV_xxx SCIC_SDS_STP_REMOTE_DEVICE_READY_SUBSTATE_xxx to SCI_STP_DEV_xxx SCIC_SDS_SMP_REMOTE_DEVICE_READY_SUBSTATE_xxx to SCI_SMP_DEV_xxx SCIC_SDS_REMOTE_NODE_CONTEXT_xxx_STATE to SCI_RNC_xxx Signed-off-by: Edmund Nadolski Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit 8d2c65c09c9e0adc16070562e7944c1c3277f332 Author: Dave Jiang Date: Wed Jun 1 09:03:08 2011 +0000 isci: Removing unused variables compiler warnings Newer gcc's are better at identifying "set, but not used" variables. Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit bf482c6069b514b7fe57a048ae1b6f11cf3bb10c Author: Dave Jiang Date: Wed May 25 05:04:35 2011 +0000 isci: Retrieve the EFI variable for OEM parameter We can call the EFI get_variable service routine directly to retrieve the EFI variable that holds the OEM parameters table. Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit 77d67385f7b4a630912fd567f104946be137f477 Author: Dave Jiang Date: Wed May 25 02:21:57 2011 +0000 isci: removing the kmalloc in smp request construct It doesn't look like there is any reason to do a kmalloc. We can do the byte swap in place and avoid the allocation. This allow us to remove a kmalloc and a memcpy. Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit 8db02da52895285e99d7eb2fa825fd393e61d9c5 Author: Edmund Nadolski Date: Thu May 19 12:00:22 2011 +0000 isci: remove isci_timer interface Delete code which is no longer used. Signed-off-by: Edmund Nadolski Signed-off-by: Dan Williams commit fd18388bc5820b3e7807302ac18e8e7de83c9f4c Author: Edmund Nadolski Date: Thu May 19 12:00:15 2011 +0000 isci: Remove tmf timeout_timer Replace the timeout_timer in the isci_tmf with a call to wait_for_completion_timeout Signed-off-by: Edmund Nadolski Signed-off-by: Dan Williams commit bb3dbdf6c835a145e46119ed18a920a774694583 Author: Edmund Nadolski Date: Thu May 19 20:26:02 2011 -0700 isci: convert phy_startup_timer to sci_timer Signed-off-by: Edmund Nadolski Signed-off-by: Dan Williams commit 6cb5853d3e252015eaf72d3761491e3da959556d Author: Edmund Nadolski Date: Thu May 19 11:59:56 2011 +0000 isci: convert scic_timeout_timer to sci_timer Signed-off-by: Edmund Nadolski Signed-off-by: Dan Williams commit 0473661a125905240879456567e117ed8a58cf5d Author: Edmund Nadolski Date: Thu May 19 20:17:47 2011 -0700 isci: convert power control timer to sci_timer Signed-off-by: Edmund Nadolski Signed-off-by: Dan Williams commit a628d478570d71fb8751ad09b8017139c5056002 Author: Edmund Nadolski Date: Thu May 19 11:59:36 2011 +0000 isci: convert phy sata_timeout_timer to sci_timer Convert the sata_timeout_timer in the scic_sds_phy struct to use a struct sci_timer Signed-off-by: Edmund Nadolski Signed-off-by: Dan Williams commit ac0eeb4f774261d1da21a68169f7ddd4f6c082fc Author: Edmund Nadolski Date: Thu May 19 20:00:51 2011 -0700 isci: convert port config agent timer to sci_timer Signed-off-by: Edmund Nadolski [squashed collateral cleanups] Signed-off-by: Dan Williams commit 5553ba2be0f3e3741e1a885a33d2b89921f9fd48 Author: Edmund Nadolski Date: Thu May 19 11:59:10 2011 +0000 isci: replace isci_timer list with proper embedded timers Rather than preallocating a list of timers and doling them out at runtime, embed a struct timerlist in each object that needs one. A struct sci_timer interface is introduced to manage the timer cancellation semantics which currently need to guarantee the timer is cancelled while holding spin_lock(ihost->scic_lock). Since the timeout functions also need to acquire the lock it currently prevents the driver from using del_timer_sync() for runtime cancellations. del_timer_sync() is used however before the objects go out of scope. Signed-off-by: Edmund Nadolski Signed-off-by: Dan Williams commit 9269e0e898594c65dee6b20d4ed48e33dbbd4eeb Author: Dan Williams Date: Thu May 12 07:42:17 2011 -0700 isci: add some type safety to the state machine interface Now that any given object type only has one state_machine we can use container_of() to get back to the given state machine owner. Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit f34d9e5d3f34f395a497a8747316b04ef3e865b1 Author: Dan Williams Date: Thu May 12 09:27:52 2011 -0700 isci: unify rnc start{io|task} handlers Unify rnc start{io|task} handlers and delete the state handler infrastructure. Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit ed3efb7784cb0772558e9cc9440bd6c9a3139be4 Author: Dan Williams Date: Thu May 12 08:50:23 2011 -0700 isci: unify rnc suspend/resume handlers Unify rnc suspend/resume handlers and delete the state handlers. Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit c845ae96bcb1625a093003248ffaf13b92a81ac2 Author: Dan Williams Date: Thu May 12 08:26:56 2011 -0700 isci: unify rnc destruct handlers Unify rnc destruct handlers and delete the state handler. Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit 338e386d12c2440e39c987d35fda403d319a79a0 Author: Dan Williams Date: Thu May 12 07:46:59 2011 -0700 isci: unify rnc event handlers Unify rnc event handlers and delete the state handler. Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit 6813820c7b892e1a5c2306808a5ccc8a27b7946d Author: Dan Williams Date: Thu May 12 07:16:06 2011 -0700 isci: unify port start_io and complete_io handlers Unify the handlers and kill the state handler infrastructure. Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit 051266caaeb15719553c5316e3d43b533d3cd5a0 Author: Piotr Sawicki Date: Thu May 12 19:10:14 2011 +0000 isci: unify port link_up and link_down handlers Unify the handlers and kill the state handler implementations. Reported-by: Christoph Hellwig Signed-off-by: Piotr Sawicki Signed-off-by: Dan Williams commit 13721e186fd31cd8475e635a89383853871fdbf1 Author: Piotr Sawicki Date: Thu May 12 19:10:08 2011 +0000 isci: remove port frame and event handlers Unused infrastructure. Reported-by: Christoph Hellwig Signed-off-by: Piotr Sawicki Signed-off-by: Dan Williams commit bd6713b416bbfc7d7180114f7cc543b152cc1725 Author: Piotr Sawicki Date: Thu May 12 19:10:03 2011 +0000 isci: unify port reset, add_phy, and remove_phy handlers Unify the implementations and remove the state handlers. Reported-by: Christoph Hellwig Signed-off-by: Piotr Sawicki Signed-off-by: Dan Williams commit e6ec5afde9794f50e60788bd10760fcd0d609252 Author: Piotr Sawicki Date: Wed May 11 23:52:37 2011 +0000 isci: remove port destruct handler The handler was never used. Signed-off-by: Piotr Sawicki Signed-off-by: Dan Williams commit 8bc80d303063d9540493be623df1c9a8dee9ccb8 Author: Piotr Sawicki Date: Wed May 11 23:52:31 2011 +0000 isci: unify port stop handlers Implement the stop handlers directly in scic_sds_port_stop() Reported-by: Christoph Hellwig Signed-off-by: Piotr Sawicki Signed-off-by: Dan Williams commit d76f71d988ef48384593ad97ebc762d9257d96a8 Author: Piotr Sawicki Date: Wed May 11 23:52:26 2011 +0000 isci: remove port start handler remove the handler from the port state handler table and implement the logic directly in scic_sds_port_start(). Signed-off-by: Piotr Sawicki [remove a level of indirection] Signed-off-by: Dan Williams commit e91f41ef809a2d1b8cdba52ac380aecd706c93dd Author: Piotr Sawicki Date: Wed May 11 23:52:21 2011 +0000 isci: merge port ready substates into primary state machine This conversion was complicated by the fact that the ready state exit routine took unconditional action beyond just stopping the substate machine (like in previous conversions). In order to ensure identical behaviour every state transition needs to be instrumented to catch ready-->!ready transitions and execute scic_sds_port_invalidate_dummy_remote_node() Reported-by: Christoph Hellwig Signed-off-by: Piotr Sawicki [fix ready state exit handling] Signed-off-by: Dan Williams commit c777c26ca2a06164e1b8c8ccf4cd76cd645a9bbb Author: Piotr Sawicki Date: Wed May 11 23:52:16 2011 +0000 isci: c99 port state handlers Name the table fields for consistancy and clarity. Signed-off-by: Piotr Sawicki Signed-off-by: Dan Williams commit 4f20ef4f57aa52fd3356c143a8f3d2bd18dc61fc Author: Dan Williams Date: Thu May 12 06:00:31 2011 -0700 isci: clarify phy to port lookups While cleaning up the driver it is very tempting to convert scic_sds_get_* macros to their open coded equivalent. They are all just pointer dereferences *except* scic_sds_phy_get_port() which returns NULL if the phy is assigned to the dummy port. Clarify this by renaming it to phy_get_non_dummy_port(). Signed-off-by: Dan Williams commit 5b1d4af25186f5d23dae7a538d8472dacd9486c8 Author: Dan Williams Date: Thu May 12 04:51:41 2011 -0700 isci: unify phy consume_power handlers Unify the implementations in scic_sds_phy_consume_power_handler(), and kill the state handler plus infrastructure. Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit 23506a69e2ee761824c266f6e2cd541a7287c2a5 Author: Dan Williams Date: Thu May 12 04:27:29 2011 -0700 isci: unify phy event handlers Unify the implementations in scic_sds_phy_event_handler(), and kill the state handler Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit c4441abc25a33ab259f01dce4b4d63721013f86d Author: Dan Williams Date: Thu May 12 04:17:51 2011 -0700 isci: unify phy frame handlers Unify the implementations in scic_sds_phy_frame_handler(), and kill the state handler Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit 35b317bec511b4a5f87a637bf78b6d1d635c617d Author: Dan Williams Date: Thu May 12 04:10:41 2011 -0700 isci: remove phy destruct handlers Unused infrastructure. Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit 0cf36fa9f1197e669ac6f5efc51d0587bcc95e6e Author: Dan Williams Date: Thu May 12 04:02:07 2011 -0700 isci: unify phy reset handlers Unify the implementations in scic_sds_phy_reset(), and kill the state handler Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit 931532364e7966f61683bdf40fa1698d6707f523 Author: Dan Williams Date: Thu May 12 04:01:03 2011 -0700 isci: unify phy stop handlers Merge all implementations in scic_sds_phy_stop(), and kill the state handler Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit 966699b50c61940e06ff39fb1085bea813f9a51d Author: Dan Williams Date: Thu May 12 03:44:24 2011 -0700 isci: unify phy start handlers Implement all handlers in scic_sds_phy_start(), and kill the state handler Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit 4a33c525f0e94b57602abd1e43644cbf6f5418f4 Author: Adam Gruchala Date: Tue May 10 23:54:23 2011 +0000 isci: merge phy substates Merged states and substates into one state machine, as we always unconditionally transitioned to the substate machine it was straightforward to enter that substate from the starting state. Reported-by: Christoph Hellwig Signed-off-by: Adam Gruchala [fixed construction, starting_state_enter, and starting check] Signed-off-by: Dan Williams commit 79e2b6b27699c916e3c7cda18a26d47fea6017fb Author: Dan Williams Date: Wed May 11 08:29:56 2011 -0700 isci: remove the completion and event state handlers With these handlers gone the rest of the state handler infrastructure is removed. Added some WARN_ONCEs where previously we would cause NULL pointer dereferences or silently run handlers from a previous state. Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit a7e255a34220ba57eeeb75637c911974e54c08e7 Author: Dan Williams Date: Wed May 11 08:27:47 2011 -0700 isci: remove request task context completion state handler Unlike the other conversions this only updates scic_sds_io_request_tc_completion() to call the old state handlers directly (with less verbose names). This was done for future patch readability, the implementations have only minor differences for different completion codes. Without a reference to the function name it would be difficult to dicern which state is being updated. Considered changing the order to look up the completion code before the state but that was not a clean conversion either. Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit d1c637c35b33ddd2b405956e04b50939bb10ed2a Author: Dan Williams Date: Wed May 11 08:27:47 2011 -0700 isci: unify request frame handlers Unify the implementation in scic_sds_io_request_frame_handler and kill the state handler. Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit f4636a7b2ab8288466b83a8459d47c43143a70dc Author: Piotr Sawicki Date: Tue May 10 23:50:32 2011 +0000 isci: unify request start handlers Unify the implementation in scic_sds_request_start and kill the state handler. Reported-by: Christoph Hellwig Signed-off-by: Piotr Sawicki [remove scic_sds_request_constructed_state_start_handler] Signed-off-by: Dan Williams commit f00e6ba4996a34f098fe50c78077f0568fd838ec Author: Dan Williams Date: Tue May 10 02:39:11 2011 -0700 isci: unify request abort handlers Unify the implementation in scic_sds_io_request_terminate and kill the state handler. Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit 5dec6f4e41340196d223caf922578c44dfe2295a Author: Dan Williams Date: Tue May 10 02:28:49 2011 -0700 isci: merge stp request substates into primary state machine Remove usage of the request substate machine for stp requests, and kill the request substate infrastructure. Similar to the previous conversions this adds the substates to the primary state machine and arranges for the 'started' state to transition to the proper stp substate. Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit c72086e3c2897eaca5b99c005dd9844fdc784981 Author: Dan Williams Date: Tue May 10 02:28:48 2011 -0700 isci: merge smp request substates into primary state machine Remove usage of the request substate machine for smp requests identified by: task->task_proto == SAS_PROTOCOL_SMP While merging over the smp_request infrastructure noticed that all the assign buffer implementations are now equal, so moved it to scic_sds_general_request_construct. Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit f139303d17c47eff4c5b5407dee0a6d43e8fd146 Author: Dan Williams Date: Tue May 10 02:28:47 2011 -0700 isci: merge ssp task management substates into primary state machine Remove usage of the request substate machine for ssp task management requests identified by: ireq->ttype == tmf_task && dev->dev_type == SAS_END_DEV; The only routine that checks the base 'started' state is scic_sds_io_request_tc_completion which calls the substate machine handler if we are not in the 'started' state or we are 'started' and no substate machine is defined. This routine requires no conversion because we have transitioned out of 'started' and the substate routine will be called naturally as a result. There are also no side effects of this conversion on exiting the 'started', state because it only stops the substate machine, which is no longer relevant for this transaction type. Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit e2f8db509fdd354bb7a68c86515e9d2d8909ccc9 Author: Dan Williams Date: Tue May 10 02:28:46 2011 -0700 isci: uplevel port infrastructure * Move port configuration agent implementation * Merge core/scic_sds_port.[ch] into port.[ch] Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit d35bc1bd18ab9e986cfb67c5a281a70cfd717f05 Author: Dan Williams Date: Tue May 10 02:28:45 2011 -0700 isci: uplevel phy infrastructure Merge core/scic_sds_phy.[ch] into phy.[ch] Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit f1f52e75939b56c40b3d153ae99faf2720250242 Author: Dan Williams Date: Tue May 10 02:28:45 2011 -0700 isci: uplevel request infrastructure * Consolidate tiny header files * Move files out of core/ (drop core/scic_sds_ prefix) * Merge core/scic_sds_request.[ch] into request.[ch] * Cleanup request.c namespace (clean forward declarations and global namespace pollution) Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit 3bff9d54ecba84e538da822349a9a6fd6e534539 Author: Dan Williams Date: Sun May 8 22:15:10 2011 -0700 isci: uplevel state machine unify core/sci_base_state.h and core/sci_base_state_machine.[ch] into state_machine.[ch] Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit 63a3a15fb00ef49e50e98ff675094afcd92f113a Author: Dan Williams Date: Sun May 8 21:36:46 2011 -0700 isci: uplevel register hardware data structures and unsolicited frame handling Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit cc9203bf381a465cd115762b9cf7c9a313c874bc Author: Dan Williams Date: Sun May 8 17:34:44 2011 -0700 isci: move core/controller to host Now that the data structures are unified unify the implementation in host.[ch] and cleanup namespace pollution. Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit ce2b3261b6765c3b80fda95426c73e8d3bb1b035 Author: Dan Williams Date: Sun May 8 15:49:15 2011 -0700 isci: unify constants cross driver constants are spread out over multiple header files, consolidate them into isci.h, and push some includes out to the source files that need them. TODO: remove SCI_MODE_SIZE infrastructure. TODO: task.h is full of inlines that are too large Signed-off-by: Dan Williams commit 67ea838d17acdad3331aeae848683c768df96aaa Author: Dan Williams Date: Sun May 8 11:47:15 2011 -0700 isci: unify request data structures Make scic_sds_request a proper member of isci_request. Also let's us get rid of the dma pool object size tracking since we now know that all requests are sizeof(isci_request). While cleaning up the construct routine incidentally replaced SCI_FIELD_OFFSET with offsetof. Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit b7645818cff1536038c0b21407eefb6b9d5755e6 Author: Dan Williams Date: Sun May 8 02:35:32 2011 -0700 isci: make command/response iu explicit request object members Final elimination of the anonymous data at the end of the request structure. Signed-off-by: Dan Williams commit 26298264a5de6d46d6e872dfd4c5d14c3011666f Author: Dan Williams Date: Sat May 7 19:07:14 2011 -0700 isci: move task context alignment from run-time to compile time Remove usage of PTR_ALIGN by arranging for the task context to be aligned by the compiler. Another step towards unifying isci_request and scic_sds_request. Once this is complete the task context in the request can likely be removed in favor of building the task directly to tc memory (see: scic_sds_controller_copy_task_context). It's not clear why this needs to be cacheline aligned if we just end up copying before submission... Signed-off-by: Dan Williams commit 0d84366fbef557f92ef82ac9a224c57ffb3318bc Author: Dan Williams Date: Sun May 8 01:56:57 2011 -0700 isci: make sgl explicit/aligned request object member Towards unifying request objects we need all members to be defined in the object and not carved out of anonymous buffer space. Signed-off-by: Dan Williams commit 827a84d4e036b342b31abc2bcc3893505c2c7daa Author: Dan Williams Date: Sat May 7 15:59:09 2011 -0700 isci: move stp request info to scic_sds_request In preparation for unifying allocation of all request information make stp data available in all requests. Incidentally collapse indentation. Signed-off-by: Dan Williams commit e531381e2f8a68b8737c63c7bb890ad80b2470bd Author: Dan Williams Date: Sat May 7 10:11:43 2011 -0700 isci: unify port data structures Make scic_sds_port a member of isci_port and merge their lifetimes which means removing the port table from scic_sds_controller in favor of the one at the isci_host level. Merge ihost->sas_ports into ihost->ports. _ Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit 4b33981ade7cf723f3f32809e34192376c9a10f8 Author: Dan Williams Date: Fri May 6 17:36:38 2011 -0700 isci: unify phy data structures Make scic_sds_phy a member of isci_phy and merge their lifetimes which means removing the phy table from scic_sds_controller in favor of the one at that isci_host level. Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit a98a7426bc91700ac8613701daf8470efe2ad2d2 Author: Jacek Danecki Date: Tue May 3 04:21:07 2011 +0000 isci: rnc state machine table c99 conversion This makes the subsequent patches to delete rnc->state_handler more clear. Signed-off-by: Jacek Danecki Signed-off-by: Dan Williams commit b9988b8e7fcd80404c60462dc223df8c1f31550d Author: Edmund Nadolski Date: Thu May 5 01:11:49 2011 +0000 isci: remove scic_sds_port_increment_request_count Removes excessive encapsulation function. Signed-off-by: Edmund Nadolski Signed-off-by: Dan Williams commit ed30c275dd9fc5c603081144db5df3110f258534 Author: Edmund Nadolski Date: Thu May 5 01:11:43 2011 +0000 isci: kill scic_controller_get_port_handle function This function is just overkill and its usage is inconsistent. Replace with inlined code. Signed-off-by: Edmund Nadolski Signed-off-by: Dan Williams commit 9286a1959ce7f3df3c1a8e33eb9b210078318dc8 Author: Dave Jiang Date: Fri May 6 02:17:37 2011 +0000 isci: Removing unnecessary functions in request.c No need for wrappers, just access sas_task directly. Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit cc3dbd0a9178865d4444f8e28b51715808e9ac85 Author: Artur Wojcik Date: Wed May 4 07:58:16 2011 +0000 isci: unify isci_host data structures Make it explicit that isci_host and scic_sds_controller are one in the same object. Signed-off-by: Artur Wojcik [removed ->ihost back pointer] Signed-off-by: Dan Williams commit d06b487b78f28a02efdcdcc9ec295bf230b9d0e8 Author: Dan Williams Date: Mon May 2 13:59:25 2011 -0700 isci: implement I_T_nexus_reset This is a requirement for 2.6.39's new libata eh. Still some questions about lldd_dev_gone racing against dev->lldd_dev lookups, but we are at least no more broken than mvsas in this regard. We also short-circuit I_T_nexus_reset invocations from the device discovery path (IDEV_EH similar to MVS_DEV_EH) to filter out the resulting domain rediscoveries triggered by the reset. Signed-off-by: Dan Williams commit 5b3f2bd877382eaf4b5a7d90fdec72ef14b9ec97 Author: Dan Williams Date: Thu May 5 17:47:44 2011 -0700 isci: fix ata locking Upstream commit a29b5dad "libata: fix locking for sas paths" switched libsas ata locking to the ata_host lock. We need to do the same when returning ata tasks from the execute path. Signed-off-by: Dan Williams commit 8694e79287ad92e351feceededeb6804babb6d9a Author: Dave Jiang Date: Wed May 4 19:01:01 2011 -0700 isci: removing intel_*.h headers Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit 2d9c2240e0bad47e8d08091016b537287a263976 Author: Dave Jiang Date: Wed May 4 18:45:05 2011 -0700 isci: Using Linux SSP frame header Removing of struct sci_ssp_frame_header and migrate to struct ssp_frame_hdr. Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit 51a57cff7ca0549bcf87cbb36086269978f42568 Author: Dave Jiang Date: Wed May 4 18:28:32 2011 -0700 isci: Remove SCIC_SWAP_DWORD() Use Linux native swab32() call instead of SCIC_SWAP_DWORD(). We need to swab() because the hardware munges the data into a "big-endian dword" stream which is byte-swapped from the sas definition regardless of host endian. Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit d7b90fc3436fa6d5b5251eec3128386af1a4d7b8 Author: Dave Jiang Date: Wed May 4 18:22:33 2011 -0700 isci: fixup SAS iaf protocols data structure Moved the actual data structure that's read from the phy register to phy header. Removed the parsing of identify address frame protocol bits as that seemed not necessary and we can use existing information. Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit f700ad4331d55df729a36b2602c4abe2d855036f Author: Dave Jiang Date: Wed May 4 18:08:35 2011 -0700 isci: remove redundant copies of IAF We need to remove the extra copies of identify address frame that's being kept around. We only need the one copy that libsas is using. Signed-off-by: Dave Jiang [further cleanups] Signed-off-by: Dan Williams commit d20930a2b3271b233f4bef3c59ce602dfc9e5d83 Author: Dave Jiang Date: Wed May 4 18:07:09 2011 -0700 isci: Converting smp_response to Linux native smp_resp Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit 2ec53eb4d5b301e5c9c386da5685894d572772a5 Author: Dave Jiang Date: Wed May 4 18:01:22 2011 -0700 isci: Fixup of smp request The struct smp_request data structure has be fixed up for Linux consumption. This probably should go to scsi/sas.h eventually. Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit af5ae89350840b9d724fc4fb81d928673bffdd4d Author: Dave Jiang Date: Wed May 4 17:53:24 2011 -0700 isci: Convert of sci_ssp_response_iu to ssp_response_iu Converting to Linux native format. However the isci driver does a lot of the calculation based on the max size of this data structure and the Linux data structure only has a pointer to the response data. Thus the sizeof(struct ssp_response_iu) will be incorrect and we need to define the max size. Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit 0cfa890e5a8a9e3b01b75c17a7856cf96e026e27 Author: Dave Jiang Date: Wed May 4 17:44:54 2011 -0700 isci: Fixup SSP command IU and task IU Fixup of SSP command IU and SSP task IU to something that looks like Linux Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit ed0e24830e7b744d0d0ae5936740f1cdbd0ec5ba Author: Dave Jiang Date: Wed May 4 16:16:44 2011 -0700 isci: renaming sas_capabilities to scic_phy_cap This seems to be a data structure that represents the phy capabilities register from the hardware and has nothing to do with SAS data structs. Moving and fixup Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit 1dea554fce698b7e8ad03cab1525f41cd6c28092 Author: Dave Jiang Date: Wed May 4 16:13:17 2011 -0700 isci: Collapsing of phy_type data structure Collapsing of struct scic_sds_phy phy_type data structure Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit 4b7ebd05fc074ac2ffdc803232d83f3593d4f548 Author: Dave Jiang Date: Wed May 4 15:37:52 2011 -0700 isci: Convert SAS identify address frame to Linux Native format Convert struct sci_sas_identify_address_frame to struct sas_identify_frame Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit e76d6180da436edf2cc3538cbed1f5b02b614613 Author: Dave Jiang Date: Wed May 4 15:02:03 2011 -0700 isci: Convert ATA defines to Linux native defines * Removing all intel_sata and intel_ata defines * Removing the usage of SAT_PROTOCOL_*. We can get everything from sas_task * Moved SATA FIS types to local sas.h. These defines will have to go into include/scsi/sas.h eventually. * Added offsets for SATA FIS header in order to grab the values Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit f2f300806fe186a6c45020a444667755edcce672 Author: Dave Jiang Date: Wed May 4 15:02:02 2011 -0700 isci: Convert SATA fis data structures to Linux native Converting of sata_fis_reg_d2h to dev_to_host_fis Converting of sata_fis_reg_h2d to host_to_dev_fis Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit c6d42257899505ea1982eba4c5e8bc7981e63e07 Author: Dan Williams Date: Wed May 4 13:49:32 2011 -0700 isci: remove compile-time (Kconfig) silicon configuration Pre-production silicon support is deprecated, and will be removed completely in the future. Signed-off-by: Dan Williams commit d6f6404c038b004fdb93f0676db934d69c524f7e Author: Dave Jiang Date: Fri Apr 22 06:39:48 2011 +0000 isci: Removing unused define SCIC_SDS_4_ENABLED Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit 971cc2ff90875a4ca28b7da5b91a408cc8151fdc Author: Dan Williams Date: Sun May 1 16:58:46 2011 -0700 isci: kill scic_sds_remote_device.state_handlers Remove the now unused state_handler infrastructure for remote_devices. Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit 01bec7788db9d1bb2c594d1f1916096ce6299f38 Author: Dan Williams Date: Sun May 1 16:51:11 2011 -0700 isci: unify remote_device frame_handlers Implement all states in scic_sds_remote_device_frame() and delete the state handler. Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit e622571f0f05986b23eba566b73b3abeb5d847d3 Author: Dan Williams Date: Sun May 1 16:26:09 2011 -0700 isci: unify remote_device event_handlers Implement all states in scic_sds_remote_device_event() and delete the state handler. Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit 978edfef46415badd28974a3e85119e2b764d236 Author: Dan Williams Date: Sun May 1 16:20:54 2011 -0700 isci: kill remote_device resume_handler This is unused infrastructure. Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit 323f0ec0fc72670f71210ba89611f6a1ec234394 Author: Dan Williams Date: Sun May 1 16:15:47 2011 -0700 isci: unify remote_device suspend_handlers Implement all states in scic_sds_remote_device_suspend() and delete the state handler. Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit e4a867bb4a7617dc1067e1c41627782f3c6c284c Author: Dan Williams Date: Sun May 1 16:01:05 2011 -0700 isci: kill remote_device complete_task_handler This is unused infrastructure. Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit 84b9b029bc4121c43294e27aeaa0350a6d07450c Author: Dan Williams Date: Sun May 1 15:53:25 2011 -0700 isci: unify remote_device start_task_handlers Implement all states in scic_sds_remote_device_start_task() and delete the state handler. Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit c027a20bf3fa831fed70b1662e526be04447ab07 Author: Dan Williams Date: Sun May 1 15:46:18 2011 -0700 isci: kill remote_device continue_io_handler This is unused infrastructure. Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit 10a09e64be2580ceef8539629fb953b7d94fa35f Author: Dan Williams Date: Sun May 1 15:33:43 2011 -0700 isci: unify remote_device complete_io_handlers Implement all states in scic_sds_remote_device_complete_io() and delete the state handler. Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit 1860655706ee5a7e3f3adeebd4927fed98860462 Author: Dan Williams Date: Sun May 1 14:57:11 2011 -0700 isci: unify remote_device start_io_handlers Implement all states in scic_sds_remote_device_start_io() and delete the state handler. Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit 815151826553f875846ebba9696777a424ee62e5 Author: Dan Williams Date: Sun May 1 14:53:00 2011 -0700 isci: unify remote_device reset_complete_handlers Implement all states in scic_remote_device_reset_complete() and delete the state handler. Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit 4fd0d2e9bf5152456952ad7c5b6f3d8565de7737 Author: Dan Williams Date: Sun May 1 14:48:54 2011 -0700 isci: unify remote_device reset_handlers Implement all states in scic_remote_device_reset() and delete the state handler. Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit b8d82f6cdd0f04ddfa877d8d886e56ebd8526d25 Author: Dan Williams Date: Sun May 1 14:38:26 2011 -0700 isci: unify remote_device destruct_handlers Implement all states in scic_remote_device_destruct() and delete the state handler. Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit 1a6de2562b38e1e0e74c468554111ac54c062928 Author: Dan Williams Date: Sun May 1 14:35:43 2011 -0700 isci: kill remote_device fail_handler This is just unused infrastructure. Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit ec5756699b705c179a0680985e3d18a093f93fae Author: Dan Williams Date: Sun May 1 14:19:25 2011 -0700 isci: unify remote_device stop_handlers Implement all states in scic_remote_device_stop() and delete the state handlers. Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit eb229671b1310c996dba7b78e21a9a9474edccdc Author: Dan Williams Date: Sun May 1 14:05:57 2011 -0700 isci: unify remote_device start_handlers Implement all states in scic_remote_device_start() and delete the state handler. Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit f619fffb4070a577524fd9eb68cea484d86d2b97 Author: Dan Williams Date: Sun May 1 10:13:04 2011 -0700 isci: fix remote_device start_io regressions While reducing indentation commits 7ab92c9e "isci: make a remote_node_context a proper member of a remote_device", 0879e6a6 "isci: merge remote_device substates into a single state machine" broke handling of situations where i/o's successfully started at the port level need to terminated when the remote_node declines to start the i/o. Signed-off-by: Dan Williams commit 8f304c36ee415600c6bbc5de300e6fa3dbe59d6d Author: Dan Williams Date: Fri Apr 29 13:20:30 2011 -0700 isci: kill scic_remote_device_get_connection_rate A function call to dereference a pointer is a tad much. Signed-off-by: Dan Williams commit ab2e8f7d07f577ee39228fb3454b9f29eab0f312 Author: Dan Williams Date: Wed Apr 27 16:32:45 2011 -0700 isci: merge remote_device substates into a single state machine A substate is just a state, so uplevel the smp and stp device substates. Three tricks at work here: 1/ scic_sds_remote_device_ready_state_enter: needs to know the the device type so it can immediately transition to a stp or smp ready substate. 2/ scic_sds_remote_device_ready_state_exit: needs to know the device type. In the ssp case the device is no longer ready, in the stp, and smp case we have simply exited to a ready "substate". 3/ scic_sds_remote_device_resume_complete_handler: The one location where we directly check the current state against SCI_BASE_REMOTE_DEVICE_STATE_READY needed to comprehend the possible ready substates. Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit be2f41c611b65353fa3ae0c155cf906b348dc864 Author: Maciej Patelczyk Date: Thu Apr 28 22:06:36 2011 +0000 isci: Removed sci_object.h from project. The sci_object.h file was removed. No sci_base_object is now in the code. Reported-by: Christoph Hellwig Signed-off-by: Maciej Patelczyk Signed-off-by: Dan Williams commit 890cae9b8a7defd87feb1ec77a2affd25bd59cce Author: Maciej Patelczyk Date: Thu Apr 28 22:06:31 2011 +0000 isci: Removed sci_base_object from scic_sds_request. The 'struct sci_base_object' was removed from the struct scic_sds_request and was replaced by a pointer to struct isci_request. Signed-off-by: Maciej Patelczyk Signed-off-by: Dan Williams commit af23e85737253624cde84704008be40355ff6922 Author: Maciej Patelczyk Date: Thu Apr 28 22:06:26 2011 +0000 isci: Removed sci_base_object from scic_sds_remote_node_context. The 'struct sci_base_object' was removed from the struct scic_sds_remote_node_context. Signed-off-by: Maciej Patelczyk Signed-off-by: Dan Williams commit 5d937e966d383c4012c19b0e47dc196ba505eb19 Author: Maciej Patelczyk Date: Thu Apr 28 22:06:21 2011 +0000 isci: Removed sci_base_object from scic_sds_remote_device. The 'struct sci_base_object' was removed from the struct scic_sds_remote_device. Signed-off-by: Maciej Patelczyk [cleaned up sci_dev_to_idev] Signed-off-by: Dan Williams commit 115bd1f9e8ee11744818e6eb5351d05ab6a8402e Author: Maciej Patelczyk Date: Thu Apr 28 22:06:16 2011 +0000 isci: Removed sci_base_object from scic_sds_port. The 'struct sci_base_object' was removed from the struct scic_sds_port and was replaced by a pointer to struct isci_port. Signed-off-by: Maciej Patelczyk Signed-off-by: Dan Williams commit e1e72a00dd9db0cd2b7d106916645626f53c0382 Author: Maciej Patelczyk Date: Thu Apr 28 22:06:11 2011 +0000 isci: Removed sci_base_object from scic_sds_phy. The 'struct sci_base_object' was removed from the struct scic_sds_phy and was replaced by a pointer to struct isci_phy. Signed-off-by: Maciej Patelczyk Signed-off-by: Dan Williams commit d3757c3aeb75259e0b86a872e98841a2ea4cb5e8 Author: Maciej Patelczyk Date: Thu Apr 28 22:06:06 2011 +0000 isci: Removed sci_base_object from scic_sds_controller. The 'struct sci_base_object' was removed from the struct scic_sds_controller and was replaced by a pointer to struct isci_host. Signed-off-by: Maciej Patelczyk Signed-off-by: Dan Williams commit 9a0fff7bf0ffd4f57fc71d8075a92008b606eb61 Author: Maciej Patelczyk Date: Thu Apr 28 22:06:01 2011 +0000 isci: Removed struct sci_base_object from state machine. Changed any occurrence of struct sci_base_object into void. Signed-off-by: Maciej Patelczyk Signed-off-by: Dan Williams commit e76d80579c2b5b4ecac107b83c22ceeb9e23bd1b Author: Maciej Patelczyk Date: Wed Apr 27 17:50:50 2011 +0000 isci: Implement SCU AFE recipe 10. Updated SCU AFE initialization values accordingly to the recipe 10. Signed-off-by: Maciej Patelczyk Signed-off-by: Dan Williams commit d2d61433a85f814c7bc0b20993bb39e97f2dde76 Author: Dave Jiang Date: Thu Apr 21 05:36:23 2011 +0000 isci: Remove excessive log noise with expander hot-unplug We are logging excessive output when hot unplug from expander. Moving that to debug. Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit d37ee7e89a98a583d45fbc8bdd1943cbaf642fd0 Author: Dan Williams Date: Tue Apr 26 13:19:53 2011 -0700 isci: allow fallback to option-rom if efi variable retrieval fails If the scu efi driver is disabled but the option-rom is enabled (during an efi boot) allow the code to fallback to scanning legacy option-rom space for the parameters. Reported-by: Yinghai Lu Signed-off-by: Dan Williams commit 3d6e428c0cd8d234bab0ac93aff9ccffacc8bc7e Author: Dave Jiang Date: Tue Apr 26 12:31:37 2011 -0700 isci: removing non-working ATAPI code Removing not used / bit-rotten ATAPI code. This needs to go back and debugged at a later date. Signed-off-by: Dave Jiang [reflow against devel, delete dead sati headers] Signed-off-by: Dan Williams commit 1f4fa1f958ca678ea021b95c2799b018b2cebc9c Author: Dan Williams Date: Tue Apr 26 11:44:06 2011 -0700 isci: remove scic_sds_remote_device_get_port_index Longer to type than the open-coded equivalent. Signed-off-by: Dan Williams commit a3d568f0dfbb6bc786df04ad13e0b401f80e614c Author: Dan Williams Date: Tue Apr 26 09:41:52 2011 -0700 isci: remove usage of sci_sas_address in scic_sds_remote_device The sas address can be retrieved from the domain device and then converted to the always little-endian format in the remote node context. Signed-off-by: Dan Williams commit 00d680ef84570bc7aea023772d27e85b0052004c Author: Dan Williams Date: Mon Apr 25 14:29:29 2011 -0700 isci: kill smp_discover_response An lldd need never look at the contents of an smp_discover_response frame. Kill the remaining locations where isci is looking at it: 1/ covering for expanders that do not set the stp_attached bit (already handled by sas_ex_discover_end_dev) 2/ an overkill method to notifiy the rest of the driver about remote_device sas addresses Signed-off-by: Dan Williams commit a1a113b0a1ea437daf099b44f8a39e93a02a3f47 Author: Dan Williams Date: Thu Apr 21 18:44:45 2011 -0700 isci: kill smp_discover_response_protocols in favor of domain_device.dev_type This is step 1 of removing the contortions to: 1/ unparse expander phy data into a smp discover frame 2/ open-code-parse the smp discover fram into a domain_device.dev_type equivalent libsas has already spent cycles determining the dev_type, so now that scic_sds_remote_device is unified with isci_remote_device we can directly reference dev_type. This might also change multi-level expander detection as we previously only looked at dev_type == EDGE_DEV and we did not consider the FANOUT_DEV case. Signed-off-by: Dan Williams commit b87ee3075b090e1dd0bdf40b295142b606d55e64 Author: Dan Williams Date: Mon Apr 25 11:48:29 2011 -0700 isci: cleanup remote device construction and comments The construction routines scic_remote_device_[de]a_construct both reference the need to call scic_remote_device_construct first. Delete that comment and just have them call it explicitly, also: * move the comments from header to source * delete dead references to scic_[de]a_remote_device_add_phy Signed-off-by: Dan Williams commit 88f3b62ac131e2549b6c262cacbd47e8cca42d6e Author: Dan Williams Date: Fri Apr 22 19:18:03 2011 -0700 isci: move remote_device handling out of the core Now that the core/lldd remote_device data structures are nominally unified merge the corresponding sources into the top-level directory. Also move the remote_node_context infrastructure which has no analog at the lldd level. Signed-off-by: Dan Williams commit 57f20f4ed6fb702339be2ef4dea9d15e6a7d0d07 Author: Dan Williams Date: Thu Apr 21 18:14:45 2011 -0700 isci: unify remote_device data structures Make it explicit that isci_remote_device and scic_sds_remote_device are one in the same object. Signed-off-by: Dan Williams commit 9614395ea2eed076fa8341df422582b0017d330c Author: Dan Williams Date: Tue Apr 19 18:35:58 2011 -0700 isci: remove rnc->device back pointer Now that they are one in the same object remove the back pointer reference in favor of container_of. Signed-off-by: Dan Williams commit 7ab92c9ed22b49a50d9a10bbfdf4ee8ffe62c324 Author: Dan Williams Date: Tue Apr 19 13:48:49 2011 -0700 isci: make a remote_node_context a proper member of a remote_device A rnc object has the same lifetime as its associated remote_device. It might get re-initialized, but a remote device always has an rnc member. Preparation for unifying scic_sds_remote_device and isci_remote_device Signed-off-by: Dan Williams commit 31e824ed0d8c84c5232405167b2338ffc071ae8a Author: Dan Williams Date: Tue Apr 19 12:32:51 2011 -0700 isci: rely on irq core for intx multiplexing, and silence screaming intx Remove the extra logic to poll each controller for interrupts, that's the core's job for shared interrupts. While testing noticed that a number of interrupts fire while waiting for the completion tasklet to run, so added an irq-ack. Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit e2023b8735956bb78f167d0fdc575364e69b02c4 Author: Dave Jiang Date: Thu Apr 21 05:34:49 2011 +0000 isci: replace this_* and the_* variables with more meaningful names Removed any instances of the_* and this_* to variable names that are more meaningful and tell us what they actually are. Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit 2d70de5a0f03072289015917b059c155936c894d Author: Dan Williams Date: Wed Apr 20 12:57:08 2011 -0700 isci: validate oem parameters early, and fallback If the platform specifies invalid parameters warn the user and fallback to internal defaults rather than fail the driver load altogether. Reported-by: Yinghai Lu Signed-off-by: Dan Williams commit f22be5d8386d9da67bfe02693806fbaff7b078da Author: Dan Williams Date: Tue Apr 19 15:29:25 2011 -0700 isci: fix oem parameter header definition The element_length is 2 bytes. Reported-by: Yinghai Lu Acked-by: Dave Jiang Signed-off-by: Dan Williams commit 6cb4d6b382be6345c2d0c4b1b90dfdf9af32da7e Author: Bartosz Barcinski Date: Tue Apr 12 17:28:43 2011 -0700 isci: audit usage of BUG_ON macro in isci driver Removes unnecessary usage of BUG_ON macro, excluding core directory. In some cases macro is unnecesary, check is done in caller function. In other cases macro is replaced by if construction with appropriate warning. Signed-off-by: Maciej Patelczyk [changed some survivable bug conditions to WARN_ONCE] Signed-off-by: Dan Williams commit 467e855a0331f619f41fbf7391bc29ec0ca923a0 Author: Bartosz Barcinski Date: Tue Apr 12 17:28:41 2011 -0700 isci: sparse warnings cleanup Clean warnings and errors reported by sparse tool. request.c:430:50: warning: mixing different enum types remote_device.c:534:39: warning: symbol 'flags' shadows an earlier one task.c:495:44: warning: mixing different enum types scic_sds_controller.c:2155:24: warning: mixing different enum types scic_sds_controller.c:2272:36: warning: mixing different enum types scic_sds_controller.c:2911:38: warning: incorrect type in initializer (different address spaces) scic_sds_controller.c:2913:25: warning: incorrect type in argument 2 (different address spaces) scic_sds_request.c:875:34: warning: cast removes address space of expression scic_sds_request.c:876:123: warning: incorrect type in argument 2 (different address spaces) scic_sds_port.c:585:51: warning: incorrect type in assignment (different address spaces) scic_sds_port.c:712:9: warning: incorrect type in argument 2 (different address spaces) scic_sds_port.c:1770:25: warning: incorrect type in argument 2 (different address spaces) Signed-off-by: Bartosz Barcinski Signed-off-by: Maciej Patelczyk [fixed up some false positives and misconversions] Signed-off-by: Dan Williams commit 26bace349ecd08b1d744f7067d24fd1bedb91020 Author: Dan Williams Date: Thu Apr 14 18:27:49 2011 -0700 isci: replace sci_sas_link_rate with sas_linkrate Drop duplicated enum definition. Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit d857d9a0adf49e332413d918322405192aafc766 Author: Maciej Trela Date: Tue Apr 12 17:28:39 2011 -0700 isci: remove base_phy abstraction Merge struct sci_base_phy into scic_sds_phy. Until now sci_base_phy was referenced using scic_sds_phy->parent field. 'sci_base_phy' state machine handlers were also merged into scic_sds_phy state handlers. Reported-by: Christoph Hellwig Signed-off-by: Maciej Trela Signed-off-by: Maciej Patelczyk Signed-off-by: Dan Williams commit 41e2b90584695cf5ae3a29eaa115e31913fbefe0 Author: Maciej Trela Date: Tue Apr 12 17:28:37 2011 -0700 isci: remove base_port abstraction Merge struct sci_base_port into scic_sds_port. Until now sci_base_port was referenced indirectly with scic_sds_port->parent field. 'sci_base_port' state machine handlers were also incorporated into scic_sds_port handlers. Reported-by: Christoph Hellwig Signed-off-by: Maciej Trela Signed-off-by: Maciej Patelczyk Signed-off-by: Dan Williams commit 0ea99d52cbcdb4bf5f5dd3097088a2919a115981 Author: Maciej Trela Date: Tue Apr 12 17:28:35 2011 -0700 isci: remove base_remote_device abstraction Merge struct sci_base_remote_device into scic_sds_remote_device. As for now sci_base_remote_device was accessed indirectly using scic_sds_remote_device->parent field. Both machine state handlers are also merged together. Reported-by: Christoph Hellwig Signed-off-by: Maciej Trela Signed-off-by: Maciej Patelczyk Signed-off-by: Dan Williams commit c629582d0dea42d8b3617f8c46ea2770b95e23aa Author: Christoph Hellwig Date: Sat Apr 2 08:15:20 2011 -0400 isci: remove scic_controller state handlers Remove the state handler indirections for the scic_controller, and replace them with procedural calls that check for the correct state first. Signed-off-by: Christoph Hellwig Signed-off-by: Dan Williams commit bc5c96748a5f2067193faa8131b2aa5f9775d309 Author: Christoph Hellwig Date: Sat Apr 2 08:15:04 2011 -0400 isci: simplify dma coherent allocation Remove the insane infrastructure for preallocating coheren DMA regions, and just allocate the memory where needed. This also gets rid of the aligment adjustments given that Documentation/DMA-API-HOWTO.txt sais: "The cpu return address and the DMA bus master address are both guaranteed to be aligned to the smallest PAGE_SIZE order which is greater than or equal to the requested size. This invariant exists (for example) to guarantee that if you allocate a chunk which is smaller than or equal to 64 kilobytes, the extent of the buffer you receive will not cross a 64K boundary." Signed-off-by: Christoph Hellwig [djbw: moved allocation from start to init, re-add memset] Signed-off-by: Dan Williams commit 524b5f723be8a1d966c1285d69810bc461f181c2 Author: Christoph Hellwig Date: Thu Mar 31 11:06:16 2011 -0400 isci: simplify request state handlers Instead of filling up tables with default handlers call the default handler in the only caller. IMHO the whole state handlers concept is not very suitable for the isci request. For example there is a single real instance of the start handler, and we'd be much better off just having a check for the right state in the only caller, than all this mess. It's quite similar for the abort handler as well. Even the actual state machine has a lot of states that are rather pointless. The initial and constructed states are not needed at all as the request is not reachable for calls before it's fully set up and started. And the abort state should be replaced with an abort actions and a state transition to the completed state. Signed-off-by: Christoph Hellwig Signed-off-by: Dan Williams commit 78141676784ed190ce2546f97a7d6368f21e450b Author: Christoph Hellwig Date: Thu Mar 31 11:01:39 2011 -0400 isci: kill dead data structurs in scic_io_request.h Signed-off-by: Christoph Hellwig Signed-off-by: Dan Williams commit 38aa74eb704c5886a5ded4085acd5f2895ab3511 Author: Christoph Hellwig Date: Mon Mar 28 09:21:14 2011 -0400 isci: remove base_request abstraction Merge struct sci_base_request into scic_sds_request, and also factor the two types of state machine handlers into one function. While we're at it also remove lots of duplicate incorrect kerneldoc comments for the state machine handlers. Signed-off-by: Christoph Hellwig Signed-off-by: Dan Williams commit ca841f0e862bccd61f537b76c94579c1bd391448 Author: Christoph Hellwig Date: Mon Mar 28 09:21:04 2011 -0400 isci: remove base_controller abstraction Merge struct sci_base_controller into scic_sds_controller, and also factor the two types of state machine handlers into one function. While we're at it also remove lots of duplicate incorrect kerneldoc comments for the state machine handlers. Signed-off-by: Christoph Hellwig Signed-off-by: Dan Williams commit bc99aa47108e9fd759071d4741c7abdf7b903579 Author: Christoph Hellwig Date: Sun Mar 27 20:07:54 2011 -0400 isci: remove mmio wrappers Remove a couple of layers around read/writel to make the driver readable. Signed-off-by: Christoph Hellwig Signed-off-by: Dan Williams commit 4393aa4e6b9517a666f0ef6b774fd421a9dc4c68 Author: Dan Williams Date: Thu Mar 31 13:10:44 2011 -0700 isci: fix fragile/conditional isci_host lookups A domain_device can always reference back to ->lldd_ha unlike local lldd structures. Fix up cases where the driver uses local objects to look up the isci_host. This also changes the calling conventions of some routines to expect a valid isci_host parameter rather than re-lookup the pointer on entry. Incidentally cleans up some macros that are longer to type than the open-coded equivalent: isci_host_from_sas_ha isci_dev_from_domain_dev Signed-off-by: Dan Williams commit 037afc7812e2b202fbc18218e6c0eff34dad36ed Author: Dan Williams Date: Thu Mar 31 13:10:42 2011 -0700 isci: cleanup isci_remote_device[_not]_ready interface Require a valid isci_host in support of the general cleanup to not re-lookup the host via potentially fragile methods when more robust methods are available. Also cleans up some more casting that should be using container_of() to up-cast a base structure in a more type-safe manner. Signed-off-by: Dan Williams commit ed8a72d108bd951909b28fa4a89aad6489f414e1 Author: Jeff Skirvin Date: Thu Mar 31 13:10:40 2011 -0700 isci: Qualify when the host lock is managed for STP/SATA callbacks. In the case of internal discovery related STP/SATA I/O started through sas_execute_task the host lock is not taken by libsas before calling lldd_execute_task, so the lock should not be managed before calling back to libsas through task->task_done or sas_task_abort. Signed-off-by: Jeff Skirvin Signed-off-by: Dan Williams commit 26e953bc6ec11c9e81ad8e9a59b14cf260776007 Author: Jeff Skirvin Date: Thu Mar 31 13:10:38 2011 -0700 isci: Fix use of SATA soft reset state machine. The driver SATA LUN reset function incorrectly sent an SRST deassert FIS, which is unnecessary because the core initiates the entire SATA soft reset state machine from the assert request. Signed-off-by: Jeff Skirvin Signed-off-by: Dan Williams commit ce4f75def3999fbe454da9aa733ed322bc671b06 Author: Jeff Skirvin Date: Thu Mar 31 13:10:36 2011 -0700 isci: Free host lock for SATA/STP abort escalation at submission time. In the case of I/O requests that fail at submit time because of a pending reset condition, the host lock for SATA/STP devices must be managed for any SCSI-initiated I/O before sas_task_abort is called. Signed-off-by: Jeff Skirvin Signed-off-by: Dan Williams commit f219f010a355487638bf2fff4724a420e7158fd2 Author: Jeff Skirvin Date: Thu Mar 31 13:10:34 2011 -0700 isci: Properly handle requests in the "aborting" state. When a TMF times-out, the request is set back to "aborting". Requests in the "aborting" state must be terminated when LUN and device resets occur. Signed-off-by: Jeff Skirvin Signed-off-by: Dan Williams commit de728b7d72089330603819a74255a0469780fd0e Author: Dave Jiang Date: Sat Mar 26 17:14:07 2011 -0700 isci: Remove "screaming" data types Converting the all CAPS data types to lower case. Reported-by: Christoph Hellwig Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit 2828dc0b55da8937439121eaa82e9ee80c520f53 Author: Dan Williams Date: Sat Mar 26 16:56:55 2011 -0700 isci: remove unused "remote_device_started" These routines are just stubs, re-add them when / if they are needed. Also cleanup remote_device_stopped. Signed-off-by: Dan Williams commit 35173d579a08c0d145b3020039d3ba33fbf2c184 Author: Dan Williams Date: Sat Mar 26 16:43:01 2011 -0700 isci: namespacecheck cleanups * mark needlessly global routines static * delete unused functions * move kernel-doc blocks from header files to source * reorder some functions to delete declarations * more default handler cleanups phy Signed-off-by: Dan Williams commit 068b2c03635bf50c9b408b21435e23e7a0b89b0f Author: Dan Williams Date: Sat Mar 26 16:30:35 2011 -0700 isci: kill some long macros Delete some macros that are longer to type than the open coded operation that they perform. scic_sds_phy_get_base_state_machine scic_sds_phy_get_starting_substate_machine scic_sds_port_get_base_state_machine scic_sds_port_get_ready_substate_machine scic_sds_remote_device_get_base_state_machine scic_sds_remote_device_get_ready_substate_machine scic_sds_remote_node_context_set_remote_node_index scic_sds_controller_get_base_state_machine Also performs some collateral cleanups like killing casts that assume structure member ordering, and consolidating a lot of duplicated default handler code (the primary callers of the *_get_base_state_machine macros) via a helper. Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit f942f32ea05eff727c41e1a1112cab305b836377 Author: Dan Williams Date: Sat Mar 26 16:30:06 2011 -0700 isci: reorder init to cleanup unneeded declarations Just move isci_pci_driver below the function definitions and delete the declarations. A couple other whitespace fixups, and unused symbol deletions. Reported-by: Christoph Hellwig Signed-off-by: Dan Williams commit 09d7da135b34bc74a7996b5db373521557ddf3d4 Author: Dave Jiang Date: Sat Mar 26 16:11:51 2011 -0700 isci: Remove event_* calls as they are just wrappers Removed isci_event_* calls and call those functions directly. Reported-by: Christoph Hellwig Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit 52ae18ac80fbdd268720b0daa27ac797a801500c Author: Dan Williams Date: Fri Mar 25 10:05:58 2011 -0700 isci: fix a build warning Use min_t to address: drivers/scsi/isci/probe_roms.c: In function ‘isci_get_efi_var’: drivers/scsi/isci/probe_roms.c:241: warning: comparison of distinct pointer types lacks a cast Reported-by: David Milburn Signed-off-by: Dan Williams commit 4eefd2518aa04e1c69118252dc23e3444e694bc1 Author: Dan Williams Date: Fri Mar 25 09:58:15 2011 -0700 isci: fix apc mode definition The original apc mode definition is the correct one, the fix from commit 4711ba10 "isci: fix oem parameter initialization and mode detection" was based on a typo from a specification update. Signed-off-by: Dan Williams commit b5f18a201ed82ed3776c9950646689b93713ae57 Author: Dave Jiang Date: Wed Mar 16 14:57:23 2011 -0700 isci: exposing user parameters via module params Exposing the user config parameters through the kernel module parameters. The kernel module params will have the default values set and we will no longer pulling the default values for user params from the core. Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit 4711ba10b13891edf228944a9d0a21dfe7fe90f0 Author: Dan Williams Date: Fri Mar 11 10:43:57 2011 -0800 isci: fix oem parameter initialization and mode detection 1/ Since commit 858d4aa7 "isci: Move firmware loading to per PCI device" we have been silently falling back to built-in defaults for the parameter settings by skipping the call to scic_oem_parameters_set(). 2/ The afe parameters from the firmware were not being honored 3/ The latest oem parameter definition flips the mode_type values which are now 0: for APC 1: for MPC. For APC we need to make sure all the phys default to the same address otherwise strict_wide_ports will cause duplicate domains. 4/ Fix up the driver announcement to indicate the source of the parameters. 5/ Fix up the sas addresses to be unique per controller (in the fallback case) Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit 2e8320f751030a12efc3e64ee857bfa4647f81fe Author: Dave Jiang Date: Fri Mar 11 14:04:43 2011 -0800 isci: Fixup for OEM parameter EFI variable retrieval Updating the EFI variable OEM parameter retrieval after examining the EFI variable exported via sysfs. Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit 3b67c1f376acb24b7c6679f75275ac5a96792986 Author: Dan Williams Date: Tue Mar 8 09:53:51 2011 -0800 isci: fixup with testing from isci OROM in BIOS Added fixups for the OROM parsing code after testing with BIOS OROM Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit 02839a8b51002d90e4b7c52bf37531834b063f71 Author: Dave Jiang Date: Thu Feb 24 17:45:57 2011 -0800 isci: copy the oem parameters instead of assign Since the data structure for oem from orom/efi/firmware is the same as what the core uses, we can just do a direct copy instead of assignment. Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit ca507b98e65f539e0b3866b6aa8efd76c13be285 Author: Dave Jiang Date: Thu Feb 24 13:09:39 2011 -0700 isci: update efi variable name and guid These are the finalized values that the driver can expect to see in production. Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit 07373a5caa29e4159ef1ea5e72985ddaf013519a Author: Henryk Dembkowski Date: Wed Feb 23 16:55:11 2011 -0800 isci: add support for 2 more oem parmeters 1/ add OEM paramater support for mode_type (MPC vs APC) 2/ add OEM parameter support for max_number_concurrent_device_spin_up 3/ cleanup scic_sds_controller_start_next_phy todo: hook up the amp control afe parameters into the afe init code Signed-off-by: Henryk Dembkowski Signed-off-by: Jacek Danecki [cleaned up scic_sds_controller_start_next_phy] Signed-off-by: Dan Williams commit 8db37aabaceb3dcd18754c1e782d4474e4052c81 Author: Dave Jiang Date: Wed Feb 23 00:02:24 2011 -0800 isci: Adding EFI variable skeletal support Adding EFI variable retrieving for OEM parameters. Still need GUID and variable name. Also updated the data struct for oem parameters and hex file for firmware Signed-off-by: Dave Jiang [fix CONFIG_EFI=n compile error] Signed-off-by: Dan Williams commit d044af17aacd03a1f4fced1af4b7570d205c8fd9 Author: Dan Williams Date: Tue Mar 8 09:52:49 2011 -0800 isci: Add support for probing OROM for OEM params We need to scan the OROM for signature and grab the OEM parameters. We also need to do the same for EFI. If all fails then we resort to user binary blob, and if that fails then we go to the defaults. Share the format with the create_fw utility so that all possible sources of the parameters are in-sync. Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit 9affa289e2f9ef4721e85edbde86466524bfe957 Author: Dan Williams Date: Wed Mar 23 17:31:27 2011 -0700 isci: reset hardware at init Don't assume the hardware is in a known state at init. Signed-off-by: Dan Williams commit ce0b89f35636f3a69fbde851aff8a284c4b4c22b Author: Dan Williams Date: Thu Mar 17 08:04:43 2011 -0700 isci: task.h compile and checkpatch fixes A usage of "FALSE" leaked in as well as some checkpatch escapes. Signed-off-by: Dan Williams commit c4b9e24c4be67aeed44cd46ef5ea92948d02a426 Author: Jeff Skirvin Date: Wed Mar 16 09:41:59 2011 -0700 isci: don't hold scic_lock over calls to sas_task_abort() In the case where submitted I/Os fail with the status code SCI_FAILURE_REMOTE_DEVICE_RESET_REQUIRED, the execute function now waits until scic_lock is cleared before calling the helper function "isci_request_signal_device_reset" which sets the flag for the pending reset condition on the I/O. Signed-off-by: Jeff Skirvin Signed-off-by: Dan Williams commit 1077a574103177bff22b7cdd155d960f46ac1e8f Author: Dan Williams Date: Fri Mar 11 10:13:51 2011 -0800 isci: fix incorrect assumptions about task->dev and task->dev->port being NULL A domain_device has the same lifetime as its related scsi_target. The scsi_target is reference counted based on outstanding commands, therefore it is safe to assume that if we have a valid sas_task that the ->dev pointer is also valid. The asd_sas_port of a domain_device has the same lifetime as the driver so it can also never be NULL as long as the sas_task is valid and the driver is loaded. This also cleans up isci_task_complete_for_upper_layer(), renames it to isci_task_refuse() and notices that the isci_completion_selection parameter was set to isci_perform_normal_io_completion by all callers. Signed-off-by: Dan Williams commit 34cad85d18d6da1cc11e410046d7572e65b19fcf Author: Dan Williams Date: Thu Mar 10 00:01:43 2011 -0800 isci: add "isci_id" attribute Allow each controller to be identified via sysfs. # cat /sys/class/scsi_host/host13/isci_id 1 Signed-off-by: Dan Williams commit 6e2802a7fc246b53f919efbf1c011da2d0a4ff30 Author: Jeff Skirvin Date: Tue Mar 8 20:32:16 2011 -0700 isci: All pending requests are terminated before stopping the device. Make sure all pending I/O including any in the libsas error handler process is cleaned-up. Signed-off-by: Jeff Skirvin Signed-off-by: Dan Williams commit aa14510295d3d87431c915c0b2bc5dd3af7f2c35 Author: Jeff Skirvin Date: Mon Mar 7 16:40:47 2011 -0700 isci: Always set response/status for requests going into the error path. In the case of I/O requests being failed because of a required device reset condition, set the response and status to indicate an I/O failure. Signed-off-by: Jeff Skirvin Signed-off-by: Dan Williams commit 50e7f9b5a9ae4a763b2c27500807cf237faca9b0 Author: Dan Williams Date: Wed Mar 9 21:27:46 2011 -0800 isci: Errors in the submit path for SATA devices manage the ap lock. Since libsas takes the domain device sata_dev.ap->lock before submitting a task, error completions in the submit path for SATA devices must unlock/relock when completing the sas_task back to libsas. Signed-off-by: Jeff Skirvin Signed-off-by: Dan Williams commit 70957a94d70cb82459bd3aea171c54d0a5cd6dbb Author: Jeff Skirvin Date: Fri Mar 4 14:06:58 2011 -0800 isci: Fixed BUG_ON in isci_abort_task_process_cb callback. The request may be in the "aborted" or the "completed" state when performing a task management operation on it. Signed-off-by: Jeff Skirvin Signed-off-by: Dan Williams commit c3f42feb0c3d20dc7007336e7de949408b93afef Author: Jeff Skirvin Date: Fri Mar 4 14:06:56 2011 -0800 isci: Fix TMF build for SAS/SATA LUN reset cases. In the case where a SAS or SATA LUN reset TMF is built a NULL pointer dereference occurred because of the (unused) callback data pointer. Signed-off-by: Jeff Skirvin Signed-off-by: Dan Williams Signed-off-by: Jacek Danecki commit 4dc043c41037fc6e369270daaa626465a8766565 Author: Jeff Skirvin Date: Fri Mar 4 14:06:52 2011 -0800 isci: Termination handling cleanup, added termination timeouts. Added a request "dead" state for use when a termination wait times-out. isci_terminate_pending_requests now detaches the device's pending list and terminates each entry on the detached list. Signed-off-by: Jeff Skirvin Signed-off-by: Dan Williams commit cbb65c665b341e560b7a3b37cc616376031b3ee5 Author: Jeff Skirvin Date: Fri Mar 4 14:06:50 2011 -0800 isci: Code review change for completion pointer cleanup. Since the request structure contains a pointer to the completion to be used if the request is being aborted or terminated, there is no reason to pass the completion as a pointer to isci_terminate_request_core(). Signed-off-by: Jeff Skirvin Signed-off-by: Jacek Danecki Signed-off-by: Dan Williams commit f0846c68912545d70da16b2fbedded37ea4394d8 Author: Jeff Skirvin Date: Tue Mar 8 19:22:07 2011 -0700 isci: Cleaning up task execute path. Made sure the device ready check accounts for all states. Moved the aborted task check into the loop of pulling task requests off of the submitted list. Signed-off-by: Jeff Skirvin Signed-off-by: Jacek Danecki [remove host and device starting state checks] Signed-off-by: Dan Williams commit 1fad9e934a43407c1ba397b1b6b8882aa8a2cafd Author: Jeff Skirvin Date: Fri Mar 4 14:06:46 2011 -0800 isci: save the i/o tag outside the scic request structure. The pointer to the core representation of a request is marked NULL at completion, but we need to save the i/o tag for task management. Signed-off-by: Jeff Skirvin Signed-off-by: Jacek Danecki [revise changelog] Signed-off-by: Dan Williams commit ec6c9638b0d0537430f78a3e20503b5e68a537b6 Author: Jeff Skirvin Date: Fri Mar 4 14:06:44 2011 -0800 isci: Any reset indicated on an I/O completion escalates it to the error path. If there is a pending device reset, the I/O is used to accomplish the reset by setting the RESET bit in the task status, and then putting the task into the error handler path using sas abort task. Signed-off-by: Jeff Skirvin Signed-off-by: Jacek Danecki Signed-off-by: Dan Williams commit a5fde225364df30507ba1a5aafeec85e595000d3 Author: Jeff Skirvin Date: Fri Mar 4 14:06:42 2011 -0800 isci: fix completion / abort path. Corrected use of the request state_lock in the completion callback. In the case where an abort (or reset) thread is trying to terminate an I/O request, it sets the request state to "aborting" (or "terminating") if the state is still "starting". One of the bugs was to never set the state to "completed". Another was to not correctly recognize the situation where the I/O had completed but the sas_task was still pending callback to task_done - this was typically a problem in the LUN and device reset cases. It is now possible that we leave isci_task_abort_task() with request->io_request_completion pointing to localy allocated aborted_io_completion struct. It may result in a system crash. Signed-off-by: Jeff Skirvin Signed-off-by: Maciej Trela Signed-off-by: Jacek Danecki Signed-off-by: Dan Williams commit 11b00c194cfbd0eb0d90f32c096508b2bb8be6ec Author: Jeff Skirvin Date: Fri Mar 4 14:06:40 2011 -0800 isci: Changes in isci_host_completion_routine Changes to move management of the reqs_in_process entry for the request here. Made changes to note when the task is already in the abort path and cannot be completed through callbacks. Signed-off-by: Jeff Skirvin Signed-off-by: Jacek Danecki Signed-off-by: Dan Williams commit 18d3d72a42a846d46b71131982c51d63eba2b7b3 Author: Jeff Skirvin Date: Fri Mar 4 14:06:38 2011 -0800 isci: isci_request_cleanup_completed_loiterer checks task before task_done In the condition where outstanding I/Os are being cleaned from the device requests in process list, the cleanup function needs to check that the request is actually a sas-task and not a task management function. Signed-off-by: Jeff Skirvin Signed-off-by: Dan Williams commit 5409bc3a20b239d1b3919db451ee4f6513e64ed1 Author: Dan Williams Date: Tue Mar 8 21:30:28 2011 -0800 isci: cleanup debug leftovers in isci.h Reported-by: James Bottomley Signed-off-by: Dan Williams commit 1a38045ba88ed3bee6c57444670fb639c8b61be7 Author: Dan Williams Date: Thu Mar 3 18:01:43 2011 -0800 isci: replace remote_device_lock with scic_lock The remote_device_lock is currently used to protect a controller global resource (RNCs), but the remote_device_lock is per-port. Signed-off-by: Dan Williams commit d9c37390c4f02153188a64a7a89fa6798dc3ffc2 Author: Dan Williams Date: Thu Mar 3 17:59:32 2011 -0800 isci: preallocate remote devices Until we synchronize against device removal this limits the damage of use after free bugs to the driver's own objects. Unless we implement reference counting we need to ensure at least a subset of a remote device is valid at all times. We follow the lead of other libsas drivers that also preallocate devices. This also enforces maximum remote device accounting at the lldd layer, but the core may still run out of RNC's before we hit this limit. Signed-off-by: Dan Williams commit 6ad31fec306d532031b2f778f8656385df1b9d8f Author: Dan Williams Date: Fri Mar 4 12:10:29 2011 -0800 isci: replace isci_remote_device completion with event queue Replace the device completion infrastructure with the controller wide event queue. There was a potential for the stop and ready notifications to corrupt each other, now that cannot happen. The stop pending flag cannot be used until devices are statically allocated. We temporarily need to maintain a completion to handle waiting for an object that has disappeared, but we can at least stop scribbling on freed memory. A future change will also get rid of the "stopping" state as it should not be exposed to the rest of the driver. Signed-off-by: Dan Williams commit 8acaec1593526f922ff46812d99abf9aab5c8b43 Author: Dan Williams Date: Mon Mar 7 14:47:35 2011 -0800 isci: kill "host quiesce" mechanism The midlayer is already throttling i/o in the places where host_quiesce was trying to prevent further i/o to the device. It's also problematic in that it holds a lock over GFP_KERNEL allocations. Signed-off-by: Dan Williams commit 3a97eec6d7876c541950e23811efd40e0bcd04a0 Author: Dan Williams Date: Fri Mar 4 11:51:43 2011 -0800 isci: remove sci_device_handle It belies the fact that isci_remote_device and scic_sds_remote_device are one in same object with the same lifetime rules. Signed-off-by: Dan Williams commit b329aff107543c3c4db26c1572405034c3baf906 Author: Dan Williams Date: Mon Mar 7 16:02:25 2011 -0800 isci: kill isci_host list in favor of an array isci_host_by_id() should have been a clue that an array would have been a simpler approach. Reported-by: James Bottomley Signed-off-by: Dan Williams commit 52bed8eab5d392183b77426b96551011f3521ef8 Author: Dan Williams Date: Thu Mar 3 17:59:25 2011 -0800 isci: enable isci for dmar builds Now that phys_to_virt() and virt_to_phys() have been removed we are no longer violating the dma mapping (or kmap apis). Signed-off-by: Dan Williams commit fe9a643157747cf85ecc07cd341e448c5849364f Author: Dan Williams Date: Thu Mar 3 14:58:11 2011 -0800 isci: pad stp and smp request sizes Ross says: "The memory allocation for these requests doesn’t take into account the additional memory needed when the code in scic_sds_s[mst]p_request_assign_buffers() shifts the struct scu_task_context so that it is cache line aligned: In an example from my machine, total buffer that I’ve given to SCIC goes from 0x410024566f84 to 0x410024567308. From this same example, this call shifts my task_context_buffer from 0x410024567208 to 0x410024567240. This means that the task_context_buffer that used to range from 0x410024567208 to 0x410024567308 instead now goes from 0x410024567240 to 0x410024567340. When the memset() call at the end of scic_task_request_construct() clears out this task_context_buffer, it does so from 0x410024567240 to 0x410024567340, effectively killing whatever buffer follows this allocation in memory." djbw: Use the kernel's PTR_ALIGN instead of scic_sds_request_align_task_context_buffer() and SMP_CACHE_BYTES instead of the local CACHE_LINE_SIZE definition. TODO: These allocations really want to be better defined in a union rather than opaque buffers carved up by macros. Reported-by: Ross Zwisler Signed-off-by: Jacek Danecki Signed-off-by: Dan Williams commit 27ce51df9a333ca7e05e09f6d25becf26ac1ff45 Author: Dan Williams Date: Wed Mar 2 16:45:18 2011 -0800 isci: fix hang after target reset When aborting a task context we need to be sure that the hardware has acted on this request (retrieved the task context) before invalidating the remote node context. In the case of the "dummy" task context and remote node we do not have the full state machine that goes through the complete tc abort and rnc invalidate states. Instead we ensure the hardware has seen and acted on Signed-off-by: Jacek Danecki Signed-off-by: Dan Williams commit d7628d052242d634dc1e2584c422e690578918a3 Author: Dave Jiang Date: Wed Mar 2 13:10:45 2011 -0800 isci: Cleanup warning messages for phy resets Moving some of the chattiness of warning messages to debug so only the Linux system messages are shown. Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit 4d07f7f367f2c2d5547684893e61a7a796c1547f Author: Dave Jiang Date: Wed Mar 2 12:31:24 2011 -0800 isci: Adding support for phy enable and disable Adding support for PHY_FUNC_LINK_RESET and PHY_FUNC_DISABLE. This allow the sysfs knob enable (both 0 and 1) and link_reset to work properly. Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit c658b109d3a9444293700471a278a741a1e5033d Author: Pawel Marek Date: Tue Mar 1 12:31:06 2011 -0800 isci: controller stop/start fixes Core reworks to support stopping and re-starting the controller, lays the groundwork for phy disable / re-enable and fixes other bugs around port/phy setup/teardown. Signed-off-by: Pawel Marek Signed-off-by: Dan Williams commit 3ff0121a704172aa4bca9c4026b419ddfe1921c8 Author: Piotr Sawicki Date: Fri Feb 25 13:07:38 2011 -0800 isci: handle cases where a d2h fis is used report an ncq error Observed that some devices return a d2h fis, treat like an sdb error fis. Signed-off-by: Piotr Sawicki Signed-off-by: Dan Williams commit a8d4b9fe911c7d48f7a75c37eb1bfa3273547d97 Author: Tomasz Chudy Date: Fri Feb 25 02:25:09 2011 -0800 isci: workaround port task scheduler starvation issue There is a condition whereby TCs (task contexts) can jump to the head of the round robin queue causing indefinite starvation of pending tasks. Posting a TC to a suspended RNC (remote node context) causes the hardware to select that task first, but since the RNC is suspended the scheduler proceeds to the next task in the expected round robin fashion, restoring TC arbitration fairness. Signed-off-by: Tomasz Chudy Signed-off-by: Dan Williams commit 7c40a8035815479c7c12ab0cdcea71e0f4c3a9c8 Author: Dan Williams Date: Wed Mar 2 11:49:26 2011 -0800 isci: rework timer api Prepare the timer api for the arrival of dynamic creation and destruction events from the core. It pretended to do this previously but the core to date only used it in a static init-time only fashion. This is an interim fix until a cleaner event queue can be developed. 1/ make all locking external to the api (add WARN_ONCE to verify) 2/ add a timer_destroy interface (to be used by the core) 3/ use del_timer_sync() prior to deallocating timer data 4/ delete the "timer_list" indirection, we only have timers allocated for the isci_host 5/ fix detection of timer list allocation errors Signed-off-by: Dan Williams commit 150fc6fc725055b400a8865e6785dc8dd0a2225d Author: Dan Williams Date: Fri Feb 25 10:25:21 2011 -0800 isci: fix sas address reporting Undo the open coded and incorrect translation of the oem parameter sas address to its libsas expected format. Signed-off-by: Dan Williams commit 7392d27580df2d14b5c3b1a1d7989c06457a819d Author: Dave Jiang Date: Wed Feb 23 15:57:33 2011 -0800 isci: Removing deprecated functions Removed all callbacks in the deprecated.c. Core will call the appropriate functions directly. Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit a1914059f1434b0cdf113ebf16df627fd85689d0 Author: Dave Jiang Date: Wed Feb 23 15:57:30 2011 -0800 isci: Change event notify calls from scic_cb_* to isci_event_* Renaming the callbacks to apparopriate event notify calls for the LLDD. Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit 6389a77596f36cf04ad8b1c7d43ec1d6cdfe89cb Author: Dave Jiang Date: Wed Feb 23 15:57:27 2011 -0800 isci: have the driver use native SG calls and DMA-API Remove abstraction for SG building and get rid of callbacks for getting DMA memory mapping. Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit 103a00c200ab3bb9e598923eb7ba3354fcb3de8d Author: Dave Jiang Date: Wed Feb 23 15:57:24 2011 -0800 isci: Make the driver copy data directly from and to sg for PIO We can copy the data directly to and from sg for SATA PIO read operations. There is no reason to involve the hardware SGL. In the process we also need to kmap the sg because we don't know where that can come from. We also do to not call phys_to_virt(). The driver already has the information. We can just calculcate the appropriate offets. Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit f7885c8490717b010115d6413b339702c64d8a3b Author: Dave Jiang Date: Tue Feb 22 16:39:32 2011 -0700 isci: Removed special macros that does 64bit address math These macros are not necessary. We can do 64bit math directly. Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit b3824292cb93d4e45b87fe76d8774cbde9e43200 Author: Piotr Sawicki Date: Wed Feb 23 00:09:14 2011 -0800 isci: fix for asserts during aborts/resets to SAS/SATA in APC mode Sending aborts/resets to SAS/SATA targets in APC mode eventually causes an assert in scic_sds_apc_agent_link_up(). We need to handle the hard reset case for apc mode ports. Signed-off-by: Piotr Sawicki Signed-off-by: Dan Williams commit 52b957c80c3be9bab2748b0ac59ed3c3e8ffe196 Author: Tomasz Chudy Date: Wed Feb 23 00:09:04 2011 -0800 isci: Add Support for new TC completion codes Update the SCI Core to comprehend the changes in the TC completion codes from A0 to B0. Specifically, there isnew R_ER code differences for command and data FISes. Changes are as follows: 1) 0x16 now additionally indicates an R_ERR received for a COMMAND FIS being sent to a SATA target. 0x16 for SSP still indicates a NAK received for a COMMAND frame. Fix is to retry TC to be compliant with SATA spec or ensure proper error handling of return value (not spec compliant I don't believe). 2) 0x1B was previously called DONE_BREAK_RCVD for STP and DONE_LL_ABORT_ERR for SSP. Now it is universally called DONE_LL_ABORT_ERR. This is purely a superficial change. 3) 0x32 is no longer a reserved code. Now it indicates DONE_CMD_SDMA_ERR for STP/SSP. There was a fatal error on the SDMA for a command IU (includes Raw frames). Consider retry, but at a minimum gracefully fail the request. 4) 0x33 is no longer a reserved code. Now it indicates DONE_CMD_LL_ABORT_ERR for SSP. There was a break receivd during transmission of a command IU. Consider retry, but at a minimum gracefully fail the request. Signed-off-by: Tomasz Chudy Signed-off-by: Jacek Danecki Signed-off-by: Dan Williams commit 3c06c2839dac6db56a1e6bd11924db38eddfb2ed Author: Dan Williams Date: Wed Feb 23 00:09:01 2011 -0800 isci: clean up remaining silicon revision ifdefs in phy init Use the dynamic revision detection code in scic_sds_phy_link_layer_initialization() and apply some coding style fixups (long deref chains). The compile time max link rate setting is removed in favor of honoring the user-parameter max. Reported-by: Krzysztof Wierzbicki Signed-off-by: Dan Williams commit d9def184b39b966b7496dfbfad126808d3cd701b Author: Jacek Danecki Date: Wed Feb 23 00:08:58 2011 -0800 isci: Add support for user parameters in SCIC layer Add support for the following parameters in SCIC: /** * This field specifies the NOTIFY (ENABLE SPIN UP) primitive * insertion frequency for this phy index. */ u32 notify_enable_spin_up_insertion_frequency; /** * This method specifies the number of transmitted DWORDs within which * to transmit a single ALIGN primitive. This value applies regardless * of what type of device is attached or connection state. A value of * 0 indicates that no ALIGN primitives will be inserted. */ u16 align_insertion_frequency; /** * This method specifies the number of transmitted DWORDs within which * to transmit 2 ALIGN primitives. This applies for SAS connections * only. A minimum value of 3 is required for this field. */ u16 in_connection_align_insertion_frequency; Signed-off-by: Krzysztof Wierzbicki Signed-off-by: Dan Williams commit 246214667f275a952b05a42b3c45a6fcb520bd28 Author: Henryk Dembkowski Date: Wed Feb 23 00:08:52 2011 -0800 isci: Move transport layer registers from port to phy At init and RNC resume we need to touch every phy in a port to be sure we have initialized STP properties in the case where port_index != phy_index. Also add some missing __iomem annotations. Signed-off-by: Henryk Dembkowski Signed-off-by: Dan Williams commit 06fdb3286270a45d05b15db46416b2fe2f52583a Author: Tomasz Chudy Date: Wed Feb 23 00:08:49 2011 -0800 isci: fix "no outbound task timeout" default value The default should be 5us. The hardware encodes it in 256ns increments, so the value should be 20 to approximate a 5us timeout. Signed-off-by: Tomasz Chudy Signed-off-by: Jacek Danecki Signed-off-by: Dan Williams commit 8f31550c77849250ec49d1509b6bb63b4ddc59e4 Author: Dan Williams Date: Wed Feb 23 00:14:06 2011 -0800 isci: phy state machine cleanup step1 c99 the struct initializers: 1/ allows grep to consistently show method name associations. The naming is mostly consistent (except when it isn't) so this guarantees coverage of present and future exception cases. 2/ let's the compiler guarantee that the state table array entry correlates with an actual state name and detect accidental reordering or deletion of states. / allows default handler's to be identified easily Signed-off-by: Jacek Danecki Signed-off-by: Dan Williams commit 858d4aa741c80fb7579cda3517853f0cffc73772 Author: Dave Jiang Date: Tue Feb 22 01:27:03 2011 -0800 isci: Move firmware loading to per PCI device Moved the firmware loading from per adapter to per PCI device. This should prevent firmware from being loaded twice becuase of 2 SCU controller per PCI device. We do have to do it per PCI device because request_firmware() requires a struct device passed in. Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit 92cd51153d5c18af027ddf42547d59ba4167873c Author: Havard Skinnemoen Date: Fri Feb 18 18:32:08 2011 -0800 isci: Initialize proc_name field in scsi_host_template The proc_name field in struct scsi_host_template is exported through sysfs and allows userspace tools to identify the driver behind a particular SCSI host controller. Initialize this field so that userspace tools can easily identify isci host controllers through sysfs. Signed-off-by: Havard Skinnemoen Signed-off-by: Dan Williams commit 5d147e73836723b81fd72b078e78887598999d5a Author: Edmund Nadolski Date: Fri Feb 18 09:25:17 2011 -0800 isci: remove scic_controller_get_handler_methods and ilk This removes scic_controller_get_handler_methods and its associated unused code. Signed-off-by: Edmund Nadolski [djbw: kill off the legacy handler, now that we have basic error isr support] Signed-off-by: Dan Williams commit 83f5eeef59581faed6f002432bafe24da8cbf401 Author: Dan Williams Date: Fri Feb 18 09:25:15 2011 -0800 isci: debug fixes Some of the chain walks to get back to our dev are invalid. isci_remote_device_change_state: delete rather than adding conditional deref chain walking isci_request_change_state: fix, it was being called too early isci_request_ssp_io_request_get_lun: fix compile breakage hidden by ifdef DEBUG Signed-off-by: Maciej Trela Signed-off-by: Dan Williams commit 83e514301ec73b16fb258618c9f9b443cca3744a Author: Dan Williams Date: Fri Feb 18 09:25:13 2011 -0800 isci: advertise linkrate Inform libsas of the linkrate of direct attached links. Reported-by: Haavard Skinnemoen Signed-off-by: Dan Williams commit 92f4f0f544a6a75979bace0c43fee9c4fb95830c Author: Dan Williams Date: Fri Feb 18 09:25:11 2011 -0800 isci: implement error isr Add basic support for handling/reporting error interrupts. Signed-off-by: Dan Williams commit 77950f51f5299c1b4f4fa4a19974128da720d199 Author: Edmund Nadolski Date: Fri Feb 18 09:25:09 2011 -0800 isci: enable interrupts during controller start, and flush discovery Polling the event queue during scan is an unneeded holdover from the original driver. Signed-off-by: Edmund Nadolski [djbw: ensure we flush all port events and domain discovery] Signed-off-by: Dan Williams commit 0cf89d1d27c1bdd0abf1714096f98ea44704dcff Author: Dan Williams Date: Fri Feb 18 09:25:07 2011 -0800 isci: cleanup "starting" state handling The lldd actively disallows requests in the "starting" state. Retrying or holding off commands in this state is sub-optimal: 1/ it adds another state check to the fast path 2/ retrying can cause libsas to give up However, isci's ->lldd_dev_found() routine already waits for controller start to complete before allowing further progress. Checking the "starting" state in isci_task_execute_task and the isr is redundant and misleading. Clean this up and introduce a controller-wide event queue to start reeling in "completion" proliferation in the driver. The "stopping" state cleanups are in a similar vein, rely on the the isr and other paths being precluded from occurring rather than implementing state checking logic. Reported-by: Christoph Hellwig Cc: Jeff Garzik Signed-off-by: Edmund Nadolski Signed-off-by: Dan Williams commit c7ef4031f01301298bbaba2666740183cd399f8c Author: Dan Williams Date: Fri Feb 18 09:25:05 2011 -0800 isci: bypass scic_controller_get_handler_methods() The indirection is unecessary and broken in the current case that assigns the handlers based on a not up-to-date pdev->msix_enabled value. Route the handlers directly to the requisite core routines. Todo: hook up error interrupt handling Reported-by: Jeff Garzik Cc: Christoph Hellwig Signed-off-by: Edmund Nadolski Signed-off-by: Dan Williams commit 11c88986290712fc3ae6993af85a0f9a15886278 Author: Dan Williams Date: Thu Feb 17 15:01:46 2011 -0800 isci: remove SCIC_DEBUG_ENABLED, and fixup an odd macro This will be replaced by state machine tracepoints and should have been a part of the logger removal. Ran across scic_sds_port_decrement_request_count() which is an ugly macro which silently hides accounting errors. Turn it into a WARN_ONCE to see if it ever triggers. Signed-off-by: Dan Williams commit f7d36e1872c0d79ea9e31445c3b1b70602dbac4b Author: Dan Williams Date: Sat Feb 12 11:50:15 2011 -0800 isci: kill a callback cast Callbacks are already type unsafe, obfuscating things further by casting the callback routine is less safe because now function argument number changes will not be caught by the compiler. Signed-off-by: Dan Williams commit 27d42e3e794523c3cec02a17fb221ade00e98648 Author: Henryk Dembkowski Date: Sat Feb 12 11:50:13 2011 -0800 isci: coding style changes for remote device Change names from upper to low letters Signed-off-by: Henryk Dembkowski Signed-off-by: Dan Williams commit e574a8c18069bcc04537c4a3d7c5dbab2265007c Author: Dan Williams Date: Sat Feb 12 11:50:11 2011 -0800 isci: cleanup core consolidation leftovers Remove duplicated license and header file includes that were leftover from commit 4c1db2d0 "isci: consolidate core" (in the isci.git historical branch). Signed-off-by: Dan Williams commit db48255b32a2664d8b321a51f46084a669e11ac6 Author: Henryk Dembkowski Date: Sat Feb 12 11:50:09 2011 -0800 isci: c99 tables cleanup step1 scic_sds_stp_remote_device_ready_substate_handler_table[] scic_sds_smp_remote_device_ready_substate_handler_table[] c99 the struct initializers: 1/ allows grep to consistently show method name associations. The naming is mostly consistent (except when it isn't) so this guarantees coverage of present and future exception cases. 2/ let's the compiler guarantee that the state table array entry correlates with an actual state name and detect accidental reordering or deletion of states. 3/ allows default handler's to be identified easily Signed-off-by: Henryk Dembkowski Signed-off-by: Dan Williams commit 2f02f556abd4411d4d348b3bd9ce4d21c316f447 Author: Henryk Dembkowski Date: Sat Feb 12 11:50:07 2011 -0800 isci: coding style changes for remote device Change names from upper to low letters Signed-off-by: Henryk Dembkowski Signed-off-by: Dan Williams commit 7fbafaa51960cd2f2a7afa63829b4135c9682a75 Author: Henryk Dembkowski Date: Sat Feb 12 11:50:05 2011 -0800 isci: remote device and node cleanup step1 c99 the struct initializers (scic_sds_remote_device_state_handler_table[]): 1/ allows grep to consistently show method name associations. The naming is mostly consistent (except when it isn't) so this guarantees coverage of present and future exception cases. 2/ let's the compiler guarantee that the state table array entry correlates with an actual state name and detect accidental reordering or deletion of states. 3/ allows default handler's to be identified easily Change names from upper to low letters Cleanup empty lines Signed-off-by: Henryk Dembkowski Signed-off-by: Dan Williams commit 6e473dd112f95806a4bfd12eced5b73632d6c032 Author: Dave Jiang Date: Fri Feb 11 18:04:28 2011 -0800 isci: removing unused loglevel module param We no longer use the loglevel parameter. Remove. Signed-off-by: Dave Jiang Signed-off-by: Dan Williams commit b5739b60507af0607fe99f1582b2dce4aa70e0b8 Author: Edmund Nadolski Date: Tue Feb 8 09:31:55 2011 -0700 isci: kill sci_types.h Signed-off-by: Edmund Nadolski [rebased after killing SCI_IO_REQUEST_DATA_DIRECTION] Signed-off-by: Dan Williams commit 82d29928c1c1c6a6605895f8240a9943394244d7 Author: Dan Williams Date: Tue Feb 8 17:53:10 2011 -0800 isci: kill SCI_IO_REQUEST_DATA_DIRECTION It's an unnecessary typedef that mirrors the kernel's enum dma_data_direction. Also cleanup some long variable names along the way. Signed-off-by: Dan Williams commit a7e536c7d6f1796e8727f5c90d33765ae7cfd8d8 Author: Edmund Nadolski Date: Tue Feb 8 09:28:42 2011 -0700 isci: remove SCI_INVALID_HANDLE Replace SCI_INVALID_HANDLE with NULL Signed-off-by: Edmund Nadolski Signed-off-by: Dan Williams commit 74ea9c163a5c09638b453208cd129b686b85e91e Author: Edmund Nadolski Date: Tue Feb 8 08:09:10 2011 -0700 isci: remove unused SC_LIBRARY_HANDLE_T typedef Signed-off-by: Edmund Nadolski Signed-off-by: Dan Williams commit 6f231dda68080759f1aed3769896e94c73099f0f Author: Dan Williams Date: Sat Jul 2 22:56:22 2011 -0700 isci: Intel(R) C600 Series Chipset Storage Control Unit Driver Support for the up to 2x4-port 6Gb/s SAS controllers embedded in the chipset. This is a snapshot of the first publicly available version of the driver, commit 4c1db2d0 in the 'historical' branch. git://git.kernel.org/pub/scm/linux/kernel/git/djbw/isci.git historical Signed-off-by: Maciej Trela Signed-off-by: Dave Jiang Signed-off-by: Edmund Nadolski Signed-off-by: Dan Williams commit 9508d80530add1281ac4d5032ab650eaf0b41aa4 Merge: 8aa7ad9 0e502ec Author: Linus Torvalds Date: Sat Jul 2 16:39:50 2011 -0700 Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging: hwmon: (pmbus) Auto-detect temp2 and temp3 registers/attributes hwmon: (pmbus) Improve fan detection hwmon: (adm1275) Free allocated memory if probe function fails hwmon: (pmbus) Drop check for PMBus revision register in probe function commit 8aa7ad9018d7fa1e52d2ee350a2f62c5485d3fec Merge: 6e13904 4f3c7a1 Author: Linus Torvalds Date: Sat Jul 2 09:26:53 2011 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: ALSA: sb16 - Fix build errors on MIPS and others with 13bit ioctl size ALSA: hdspm - Fix compile warnings with PPC ALSA: cs5535 - Fix invalid big-endian conversions ALSA: HDMI - fix ELD monitor name length ALSA: atmel - update author email for ABDAC, AC97C and AT73C213 ALSA: HDA: Add model=auto quirk for Acer Aspire 3830TG ALSA: HDA: Add a new Conexant codec ID (506c) commit 6e139047e2eecd0ccf8bc2f1564e82747cb6e56c Merge: c66a86d 6002525 Author: Linus Torvalds Date: Sat Jul 2 09:08:56 2011 -0700 Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: Revert "drm/nvc0: recognise 0xdX chipsets as NV_C0" drm/radeon/kms: fix typo in cayman reg offset drm/radeon/kms: use correct reg on fusion when reading back mem config commit f5da24dbed213d103f00aa9ef26e010b50d2db24 Author: Rafael J. Wysocki Date: Sat Jul 2 14:27:11 2011 +0200 PM / Runtime: Update documentation regarding driver removal Commit e1866b33b1e89f077b7132daae3dfd9a594e9a1a (PM / Runtime: Rework runtime PM handling during driver removal) forgot to update the documentation in Documentation/power/runtime_pm.txt to match the new code in drivers/base/dd.c. Update that documentation to match the code it describes. Signed-off-by: Rafael J. Wysocki Reviewed-by: Kevin Hilman commit 5efb54cc3fc104585cda81c44676f05115bd9ddd Author: Kevin Hilman Date: Thu Jun 30 15:07:31 2011 -0700 PM: Documentation: fix typo: pm_runtime_idle_sync() doesn't exist. Replace reference to pm_runtime_idle_sync() in the driver core with pm_runtime_put_sync() which is used in the code. Signed-off-by: Kevin Hilman Signed-off-by: Rafael J. Wysocki commit c66a86d0cdce3bad2da794f114cc37377d242c3d Merge: c9e0b84 2b1ecb7 Author: Linus Torvalds Date: Fri Jul 1 16:38:59 2011 -0700 Merge branch 'drm-intel-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/keithp/linux-2.6 * 'drm-intel-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/keithp/linux-2.6: drm/i915: apply HWSTAM writes to Ivy Bridge as well drm/i915: move IRQ function table init to i915_irq.c drm/i915/overlay: Fix unpinning along init error paths drm/i915: Don't call describe_obj on NULL pointers drm/i915: Hold struct_mutex during i915_save_state/i915_restore_state commit 0e502ec889d33bfcb348e420d7e105bc61c45eb4 Author: Guenter Roeck Date: Thu Jun 30 06:57:41 2011 -0700 hwmon: (pmbus) Auto-detect temp2 and temp3 registers/attributes Additional temperature attribute support is easy to detect, so do it. Signed-off-by: Guenter Roeck Reviewed-by: Robert Coulson Cc: stable.kernel.org # 2.6.39 commit 81ae68142a0483b3791cba99eab268859858f508 Author: Guenter Roeck Date: Thu Jun 30 06:54:05 2011 -0700 hwmon: (pmbus) Improve fan detection Some PMBus devices return no error when reading fan speed registers, but don't really support fans. Strengthen fan detection by also checking if fan configuration registers exist. Signed-off-by: Guenter Roeck Reviewed-by: Robert Coulson Cc: stable.kernel.org # 2.6.39 commit 3b33ca41227a54a78446fb0d7a6fdb9862f563db Author: Guenter Roeck Date: Thu Jun 30 02:30:03 2011 -0700 hwmon: (adm1275) Free allocated memory if probe function fails Probe function did not free allocated memory if it failed. Fix it. Signed-off-by: Guenter Roeck Reviewed-by: Robert Coulson commit 7f2c0662e5cfd05f12ca49109e8f787bf2d87b66 Author: Guenter Roeck Date: Sat Jun 25 12:42:14 2011 -0700 hwmon: (pmbus) Drop check for PMBus revision register in probe function Some PMBus devices do not support the PMBus revision register, so don't check if it exists. Signed-off-by: Guenter Roeck Reviewed-by: Robert Coulson Cc: stable.kernel.org # 2.6.39 commit 6002525170df5f72c92ab946b6ebf1656aaec74d Author: Ben Skeggs Date: Fri Jul 1 18:00:51 2011 +1000 Revert "drm/nvc0: recognise 0xdX chipsets as NV_C0" Oh boy. That was a bad gamble. PDISP has changed. This reverts commit cdf81a235f11c8a55023c6b181d21d519a8a5967. Signed-off-by: Dave Airlie commit 2498c41e1b6aaa1929d13cae9ff1cb6226887078 Author: Alex Deucher Date: Fri Jul 1 12:58:54 2011 -0400 drm/radeon/kms: fix typo in cayman reg offset Signed-off-by: Alex Deucher Signed-off-by: Dave Airlie commit 8208441be21eb3df448e171c4e5cf92756f287da Author: Alex Deucher Date: Fri Jul 1 13:18:28 2011 -0400 drm/radeon/kms: use correct reg on fusion when reading back mem config Signed-off-by: Alex Deucher Signed-off-by: Dave Airlie commit 2b1ecb7337592a7bf0989efac46a5b52daab769e Author: Jesse Barnes Date: Fri Jul 1 11:08:56 2011 -0700 drm/i915: apply HWSTAM writes to Ivy Bridge as well In an attempt to fix 38862 and 38863. Signed-off-by: Jesse Barnes Tested-by: Kenneth Graunke Signed-off-by: Keith Packard commit c9e0b8454582b413bc64c16693c7979417cad3eb Merge: 0466dcb 155a16f Author: Linus Torvalds Date: Fri Jul 1 13:25:56 2011 -0700 Merge branch 'stable/bug.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen * 'stable/bug.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen: xen/pci: Use the INT_SRC_OVR IRQ (instead of GSI) to preset the ACPI SCI IRQ. xen/mmu: Fix for linker errors when CONFIG_SMP is not defined. commit 0466dcbeda72e6a2753cd7e81f0a190054bd2233 Author: Jesper Juhl Date: Fri Jul 1 12:46:56 2011 +0200 Update version number references in README When 3.0 is released I believe the README should reflect the new numbering. Signed-off-by: Jesper Juhl Signed-off-by: Linus Torvalds commit ee1b3ea9e6171d7a842527a44873f9f51e6f239b Author: Jeff Layton Date: Tue Jun 21 07:18:26 2011 -0400 cifs: set socket send and receive timeouts before attempting connect Benjamin S. reported that he was unable to suspend his machine while it had a cifs share mounted. The freezer caused this to spew when he tried it: -----------------------[snip]------------------ PM: Syncing filesystems ... done. Freezing user space processes ... (elapsed 0.01 seconds) done. Freezing remaining freezable tasks ... Freezing of tasks failed after 20.01 seconds (1 tasks refusing to freeze, wq_busy=0): cifsd S ffff880127f7b1b0 0 1821 2 0x00800000 ffff880127f7b1b0 0000000000000046 ffff88005fe008a8 ffff8800ffffffff ffff880127cee6b0 0000000000011100 ffff880127737fd8 0000000000004000 ffff880127737fd8 0000000000011100 ffff880127f7b1b0 ffff880127736010 Call Trace: [] ? sk_reset_timer+0xf/0x19 [] ? tcp_connect+0x43c/0x445 [] ? tcp_v4_connect+0x40d/0x47f [] ? schedule_timeout+0x21/0x1ad [] ? _raw_spin_lock_bh+0x9/0x1f [] ? release_sock+0x19/0xef [] ? inet_stream_connect+0x14c/0x24a [] ? autoremove_wake_function+0x0/0x2a [] ? ipv4_connect+0x39c/0x3b5 [cifs] [] ? cifs_reconnect+0x1fc/0x28a [cifs] [] ? cifs_demultiplex_thread+0x397/0xb9f [cifs] [] ? perf_event_exit_task+0xb9/0x1bf [] ? cifs_demultiplex_thread+0x0/0xb9f [cifs] [] ? cifs_demultiplex_thread+0x0/0xb9f [cifs] [] ? kthread+0x7a/0x82 [] ? kernel_thread_helper+0x4/0x10 [] ? kthread+0x0/0x82 [] ? kernel_thread_helper+0x0/0x10 Restarting tasks ... done. -----------------------[snip]------------------ We do attempt to perform a try_to_freeze in cifs_reconnect, but the connection attempt itself seems to be taking longer than 20s to time out. The connect timeout is governed by the socket send and receive timeouts, so we can shorten that period by setting those timeouts before attempting the connect instead of after. Adam Williamson tested the patch and said that it seems to have fixed suspending on his laptop when a cifs share is mounted. Reported-by: Benjamin S Tested-by: Adam Williamson Signed-off-by: Jeff Layton Signed-off-by: Steve French commit 724d4c03066cec0e23b44344ad384fb4ebb7419d Author: Henrik Ahlgren Date: Fri Jul 1 01:48:35 2011 +0300 CREDITS: Fix typo David Brownell's CREDITS entry should have N: (name) instead of M: (email). Signed-off-by: Henrik Ahlgren Signed-off-by: Linus Torvalds commit daf54f1f363a61c618662ef66d4bf09d2b090941 Author: Alex Deucher Date: Thu Jun 30 08:59:55 2011 -0400 drm/radeon/kms: Fix chremap setup on RV770 CE CE variant requires a different chremap setup. Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=35472 Signed-off-by: Alex Deucher Cc: stable@kernel.org Signed-off-by: Dave Airlie commit 0e90ed0e8b9b1c25040442f1d20c799751b1e727 Merge: 5fc3054 16adf5d Author: Linus Torvalds Date: Thu Jun 30 10:44:52 2011 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (24 commits) usbnet: Remove over-broad module alias from zaurus. MAINTAINERS: drop Michael from bfin_mac driver net/can: activate bit-timing calculation and netlink based drivers by default rionet: fix NULL pointer dereference in rionet_remove net+crypto: Use vmalloc for zlib inflate buffers. netfilter: Fix ip_route_me_harder triggering ip_rt_bug ipv4: Fix IPsec slowpath fragmentation problem ipv4: Fix packet size calculation in __ip_append_data cxgb3: skb_record_rx_queue now records the queue index relative to the net_device. bridge: Only flood unregistered groups to routers qlge: Add maintainer. MAINTAINERS: mark socketcan-core lists as subscribers-only MAINTAINERS: Remove Sven Eckelmann from BATMAN ADVANCED r8169: fix wrong register use. net/usb/kalmia: signedness bug in kalmia_bind() net/usb: kalmia: Various fixes for better support of non-x86 architectures. rtl8192cu: Fix missing firmware load udp/recvmsg: Clear MSG_TRUNC flag when starting over for a new packet ipv6/udp: Use the correct variable to determine non-blocking condition netconsole: fix build when CONFIG_NETCONSOLE_DYNAMIC is turned on ... commit 5fc3054d76a05633ae7341163b8c22a51e63483e Merge: 3b775e2 e336f61 Author: Linus Torvalds Date: Thu Jun 30 10:44:13 2011 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt/avr32-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt/avr32-2.6: MAINTAINERS: update AVR32 and AT32AP maintainers commit 3b775e2246ae861daec276d3229a7de2af69b7db Merge: c8618d1 aeb0aea Author: Linus Torvalds Date: Thu Jun 30 10:43:57 2011 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog * git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog: watchdog: update author email for at32ap700x_wdt watchdog: gef_wdt: fix MODULE_ALIAS watchdog: Intel SCU Watchdog: Fix build and remove duplicate code watchdog: mtx1-wdt: fix section mismatch watchdog: mtx1-wdt: fix GPIO toggling watchdog: mtx1-wdt: request gpio before using it watchdog: Handle multiple wm831x watchdogs being registered commit c8618d16f91f58c01be4bdbec4d724efe426a081 Merge: 427e3df 9ab3a15 Author: Linus Torvalds Date: Thu Jun 30 10:43:22 2011 -0700 Merge branch 'sh-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-3.x * 'sh-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-3.x: sh: use printk_ratelimited instead of printk_ratelimit sh: Fix up unmet dependency warnings with USB EHCI/OHCI selects. sh: fix the value of sh_dmae_slave_config in setup-sh7757 sh: fix the INTC vector for IRQ and IRL in setup-sh7757 sh: add to select the new configuration for USB EHCI/OHCI sh: add platform_device of EHCI/OHCI to setup-sh7757 sh: fix compile error using sh7757lcr_defconfig commit 427e3df6f22f919134adec42e5c9c889b7397196 Merge: ca56a95 4d4d6fb Author: Linus Torvalds Date: Thu Jun 30 10:43:04 2011 -0700 Merge branch 'rmobile-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-3.x * 'rmobile-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-3.x: ARM: mach-shmobile: make a struct in board-ap4evb.c static ARM: mach-shmobile: ag5evm: consistently name sdhi info structures ARM: mach-shmobile: mackerel: change usbhs devices order commit 155a16f21923bc2f04161ac92acca986371ef27b Author: Konrad Rzeszutek Wilk Date: Thu Jun 30 09:18:27 2011 -0400 xen/pci: Use the INT_SRC_OVR IRQ (instead of GSI) to preset the ACPI SCI IRQ. In the past we would use the GSI value to preset the ACPI SCI IRQ which worked great as GSI == IRQ: ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 low level) While that is most often seen, there are some oddities: ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 20 low level) which means that GSI 20 (or pin 20) is to be overriden for IRQ 9. Our code that presets the interrupt for ACPI SCI however would use the GSI 20 instead of IRQ 9 ending up with: xen: sci override: global_irq=20 trigger=0 polarity=1 xen: registering gsi 20 triggering 0 polarity 1 xen: --> pirq=20 -> irq=20 xen: acpi sci 20 .. snip.. calling acpi_init+0x0/0xbc @ 1 ACPI: SCI (IRQ9) allocation failed ACPI Exception: AE_NOT_ACQUIRED, Unable to install System Control Interrupt handler (20110413/evevent-119) ACPI: Unable to start the ACPI Interpreter as the ACPI interpreter made a call to 'acpi_gsi_to_irq' which got nine. It used that value to request an IRQ (request_irq) and since that was not present it failed. The fix is to recognize that for interrupts that are overriden (in our case we only care about the ACPI SCI) we should use the IRQ number to present the IRQ instead of the using GSI. End result is that we get: xen: sci override: global_irq=20 trigger=0 polarity=1 xen: registering gsi 20 triggering 0 polarity 1 xen: --> pirq=20 -> irq=9 (gsi=9) xen: acpi sci 9 which fixes the ACPI interpreter failing on startup. CC: stable@kernel.org Reported-by: Liwei Tested-by: Liwei [http://lists.xensource.com/archives/html/xen-devel/2011-06/msg01727.html] Signed-off-by: Konrad Rzeszutek Wilk commit 4f3c7a18d9e8a287d31f828a259d713fe4859471 Author: Takashi Iwai Date: Thu Jun 30 15:08:04 2011 +0200 ALSA: sb16 - Fix build errors on MIPS and others with 13bit ioctl size One of ioctl definition in sound/sb16_csp.h contains the data size over 8kB, and this causes build errors on architectures like MIPS, which define _IOC_SIZEBITS=13. For avoiding this build errors but keeping the compatibility, manually expand with _IOC() instead of using _IOW() for the problematic ioctl. Signed-off-by: Takashi Iwai commit 32dd11942aeb47f91209a446d6b10063c5b69389 Author: Konrad Rzeszutek Wilk Date: Thu Jun 30 09:12:40 2011 -0400 xen/mmu: Fix for linker errors when CONFIG_SMP is not defined. Simple enough - we use an extern defined symbol which is not defined when CONFIG_SMP is not defined. This fixes the linker dying. CC: stable@kernel.org Signed-off-by: Konrad Rzeszutek Wilk commit 286bed0f0c447b6660e72093d7e778784fdd9ee6 Author: Takashi Iwai Date: Thu Jun 30 12:45:36 2011 +0200 ALSA: hdspm - Fix compile warnings with PPC The char can be unsigned on some architectures. Since the code checks the negative values, they should be declared as signed char explicitly. sound/pci/rme9652/hdspm.c:5449: warning: comparison is always false due to limited range of data type sound/pci/rme9652/hdspm.c:5462: warning: comparison is always false due to limited range of data type Signed-off-by: Takashi Iwai commit 71276410e17653cfacfa238a363475cde9e18fb3 Author: Takashi Iwai Date: Thu Jun 30 12:31:23 2011 +0200 ALSA: cs5535 - Fix invalid big-endian conversions Fix the wrongly converted short values: sound/pci/cs5535audio/cs5535audio_pcm.c:152: warning: large integer implicitly truncated to unsigned type sound/pci/cs5535audio/cs5535audio_pcm.c:160: warning: large integer implicitly truncated to unsigned type Signed-off-by: Takashi Iwai commit e336f61fe238ade68eca7850d64fd6c194bdc998 Author: Hans-Christian Egtvedt Date: Tue Jun 28 08:43:29 2011 +0200 MAINTAINERS: update AVR32 and AT32AP maintainers This alters the maintenance of the AVR32 architecture and the AT32AP machine code to be shared between Haavard Skinnemoen and me. The status is also changed to maintained, as we no longer are being paid to look after this architecture. Signed-off-by: Hans-Christian Egtvedt Acked-by: Haavard Skinnemoen commit 9ab3a15d95809a5d4feecda58b3749c53590e1b2 Author: Paul Mundt Date: Thu Jun 30 15:10:06 2011 +0900 sh: use printk_ratelimited instead of printk_ratelimit Follows the powerpc change, for much the same rationale. Signed-off-by: Paul Mundt commit 7b61ca5d94baf2c31971871fa875750f90fce098 Author: Paul Mundt Date: Thu Jun 30 15:04:38 2011 +0900 sh: Fix up unmet dependency warnings with USB EHCI/OHCI selects. Signed-off-by: Paul Mundt commit 4d4d6fbb7c3125f17a4864215191e54b975cfb4f Author: Guennadi Liakhovetski Date: Wed Jun 29 10:13:04 2011 +0000 ARM: mach-shmobile: make a struct in board-ap4evb.c static struct soc_camera_link imx074_link in board-ap4evb.c doesn't have to be global. Signed-off-by: Guennadi Liakhovetski Signed-off-by: Paul Mundt commit f71d4af4cd475aced6d9ec9730b03885ac80b833 Author: Jesse Barnes Date: Tue Jun 28 13:00:41 2011 -0700 drm/i915: move IRQ function table init to i915_irq.c This lets us make the various IRQ functions static and helps avoid problems like the one fixed in "drm/i915: Use chipset-specific irq installers" where one of the exported functions was called rather than the chipset specific version. This also fixes a UMS-mode bug -- the correct irq functions for IRL and later chips were only getting loaded in the KMS path. Signed-off-by: Jesse Barnes Reviewed-by: Ben Widawsky Signed-off-by: Keith Packard commit 79d2427338e8da362678de32a1c8af1dc8a9810a Author: Chris Wilson Date: Tue Jun 28 11:27:47 2011 +0100 drm/i915/overlay: Fix unpinning along init error paths As pointed out by Dan Carpenter, it was seemingly possible to hit an error whilst mapping the buffer for the regs (except the only likely error returns should not happen during init) and so leak a pin count on the bo. To handle this we would need to reacquire the struct mutex, so for simplicity rearrange for the lock to be held for the entire function. For extra pedagogy, test that we only call init once. Signed-off-by: Chris Wilson Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit ca56a95eedcc95f8fea7b49c87565cd961d74fe2 Merge: 0e47427 b271a98 Author: Linus Torvalds Date: Wed Jun 29 18:18:48 2011 -0700 Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: drm/radeon/kms: increase rom size for atrm method commit 0e47427bc50bd34bd405e207ccf5235f3b78b551 Merge: c017d0d a18b989 Author: Linus Torvalds Date: Wed Jun 29 18:10:54 2011 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: caam - fix operator precedence in shared descriptor allocation commit b271a988eb9c3944c50fb62c21ac61860090d3ba Author: Alex Deucher Date: Fri Jun 24 13:15:38 2011 +0000 drm/radeon/kms: increase rom size for atrm method The vbios rom is >64k on a lot of modern asics. Increase the fetch size for atrm to make sure we don't miss part of a larger rom. Signed-off-by: Alex Deucher Signed-off-by: Dave Airlie commit a18b989a5c12ca82ed37f94279273ddbc073758a Author: Kim Phillips Date: Thu May 26 13:30:34 2011 +1000 crypto: caam - fix operator precedence in shared descriptor allocation setkey allocates 16 bytes (CAAM_CMD_SZ * DESC_AEAD_SHARED_TEXT_LEN) shy of what is needed to store the shared descriptor, resulting in memory corruption. Fix this. Signed-off-by: Kim Phillips Signed-off-by: Herbert Xu commit dc501fbc4389f6c15a8da14684b5926e0d9553da Author: Ben Widawsky Date: Wed Jun 29 11:41:51 2011 -0700 drm/i915: Don't call describe_obj on NULL pointers Reported-by: Pavel Roskin Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38777 Cc: Chris Wilson Signed-off-by: Ben Widawsky Signed-off-by: Keith Packard commit d70bed1947772f34d66ada3bd923bfc12ea2452b Author: Keith Packard Date: Wed Jun 29 00:30:34 2011 -0700 drm/i915: Hold struct_mutex during i915_save_state/i915_restore_state Lots of register access in these functions, some of which requires the struct mutex. These functions now hold the struct mutex across the calls to i915_save_display and i915_restore_display, and so the internal mutex calls in those functions have been removed. To ensure that no-one else was calling them (and hence violating the new required locking invarient), those functions have been made static. gen6_enable_rps locks the struct mutex, and so i915_restore_state unlocks the mutex around calls to that function. Reviewed-by: Ben Widawsky Signed-off-by: Keith Packard commit c017d0d1351f916c0ced3f358afc491fdcf490b4 Merge: c773547 cb16c34 Author: Linus Torvalds Date: Wed Jun 29 11:07:20 2011 -0700 Merge branch 'kvm-updates/3.0' of git://git.kernel.org/pub/scm/virt/kvm/kvm * 'kvm-updates/3.0' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: x86 emulator: fix %rip-relative addressing with immediate source operand commit c7735471837b35a6205f6052a34ded3bdc1db505 Merge: 78a3cc3 cd823db Author: Linus Torvalds Date: Wed Jun 29 11:07:02 2011 -0700 Merge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging * 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: i2c/pca954x: Initialize the mux to disconnected state i2c-taos-evm: Fix log messages commit 78a3cc38f72cb0e6938ed8e796041d6d1beb8a28 Merge: 4974317 7646223 Author: Linus Torvalds Date: Wed Jun 29 11:03:27 2011 -0700 Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: arch/powerpc: use printk_ratelimited instead of printk_ratelimit powerpc/rtas-rtc: remove sideeffects of printk_ratelimit powerpc/pseries: remove duplicate SCSI_BNX2_ISCSI in pseries_defconfig powerpc/e500: fix breakage with fsl_rio_mcheck_exception powerpc/p1022ds: fix audio-related properties in the device tree powerpc/85xx: fix NAND_CMD_READID read bytes number commit 49743170556e13156a64f8f20fa412805771b4e1 Author: Linus Torvalds Date: Wed Jun 29 10:10:07 2011 -0700 ahci: change 'masking port_map' printk to KERN_WARNING level It's not so much an error as a warning about normal Marvell crazines. So don't use KERN_ERR that ends up spamming the console even in quiet mode, it's not _that_ critical. Explained by Jeff: "Long explanation, it's a mess: Marvell took standard AHCI, and bastardized it to include a weird mode whereby PATA devices appear inside the AHCI DMA and interrupt infrastructure you're familiar with. So, PATA devices appear via pata_marvell driver, using basic legacy IDE programming interface. But SATA devices, which might also be attached to this chip, either work in under-performing mode or simply don't work at all (e.g. newer 6 Gbps devices or port multiplier attachments, NCQ, ...) On the other hand, 'ahci' driver loads and works with the chip's attached SATA devices quite beautifully, but is completely unable to drive any attached PATA devices, due to the Marvell-specific PATA-under-AHCI interface. The "masking port_map 0x7 -> 0x3" message is the ahci driver "hiding" the PATA port(s) from itself, making sure it will only drive the SATA ports it knows how to drive." Acked-by: Jeff Garzik Signed-off-by: Linus Torvalds commit db111e18ec19bbadbf44a60f73bf2ff5991dc915 Author: Stephen M. Cameron Date: Fri Jun 3 09:57:34 2011 -0500 [SCSI] hpsa: fix potential overrun while memcpy'ing sense data This memcpy: memcpy(cmd->sense_buffer, ei->SenseInfo, ei->SenseLen > SCSI_SENSE_BUFFERSIZE ? SCSI_SENSE_BUFFERSIZE : ei->SenseLen); The ei->SenseLen field is filled in by the Smart Array. For requests to logical drives, it will not exceed 32 bytes, so should be ok, but for physical requests it depends on the target device, not the Smart Array. It's conceivable that this could exceed the 32 byte size of ei->SenseInfo. In that case, the memcpy would read past the end of ei->SenseInfo, copying data from the next command, as if it were sense data, or, if it happened to be the very last command in the block of allocated commands, could fall off the end of the allocated area and crash. I'm not aware of anyone ever encountering this behavior, but it could conceivably happen. This bug was found by Coverity. Signed-off-by: Stephen M. Cameron Signed-off-by: James Bottomley commit c2dd32e02648d77466f320d6edd157b5080e7c99 Author: Stephen M. Cameron Date: Fri Jun 3 09:57:29 2011 -0500 [SCSI] hpsa: fix dma unmap error in hpsa_passthru_ioctl Signed-off-by: Stephen M. Cameron Signed-off-by: James Bottomley commit 38553564dc1052640515ed86be3ccb76cda6eee7 Author: Brian King Date: Fri Jun 3 08:23:20 2011 -0500 [SCSI] ibmvfc: Fix Virtual I/O failover hang If a Virtual I/O server fails in a dual virtual I/O server multipath configuration, ensure we delete all remote ports so that path failover can occur. For a single path configuration, the remote ports will go into devloss state. Signed-off-by: Brian King Signed-off-by: James Bottomley commit 16adf5d07987d93675945f3cecf0e33706566005 Author: Dave Jones Date: Fri Jun 17 20:02:10 2011 -0400 usbnet: Remove over-broad module alias from zaurus. This module and a bunch of dependancies are getting loaded on several of laptops I have (probably picking up the mobile broadband device), that have nothing to do with zaurus. Matching by class without any vendor/device pair isn't the right thing to do here, as it will prevent any other driver from correctly binding to it. (Or in the absense of a driver, will just waste time & memory by unnecessarily loading modules) Signed-off-by: Dave Jones Signed-off-by: David S. Miller commit 1a8690aa50a00670f254282a92caf1401bd30528 Author: Mike Frysinger Date: Mon Jun 27 08:24:07 2011 +0000 MAINTAINERS: drop Michael from bfin_mac driver We want people to just use the list now rather than hitting up people who are no longer responsible for it. Signed-off-by: Mike Frysinger Acked-by: Michael Hennerich Signed-off-by: David S. Miller commit a30d5155a4f80af3cbe1fe0366e9f0c6fdbfd8dd Author: Marc Kleine-Budde Date: Sun Jun 26 21:39:51 2011 +0000 net/can: activate bit-timing calculation and netlink based drivers by default The two options "CAN bit-timing calculation" and "Platform CAN drivers with Netlink support" have a "default Y". In order to activate them by default, change to "default y". Signed-off-by: Marc Kleine-Budde Acked-by: Wolfgang Grandegger Acked-by: Kurt Van Dijck Signed-off-by: David S. Miller commit 55caa9241ece1c07a930e3d05a624061adcf2653 Author: Yinglin Luan Date: Sat Jun 25 18:12:12 2011 +0000 rionet: fix NULL pointer dereference in rionet_remove Function rionet_remove initializes local variable 'ndev' to NULL and do nothing changes before the call to unregister_netdev(ndev), this could cause a NULL pointer dereference. Reported-by: Jesper Juhl Signed-off-by: Yinglin Luan Signed-off-by: David S. Miller commit 7ab24bfdf9a9a9f87ac8e5ad9a25f80b5b947be7 Author: David S. Miller Date: Wed Jun 29 05:48:41 2011 -0700 net+crypto: Use vmalloc for zlib inflate buffers. They are 64K and result in order-4 allocations, even with SLUB. Therefore, just like we always have for the deflate buffers, use vmalloc. Reported-by: Martin Jackson Acked-by: Herbert Xu Signed-off-by: David S. Miller commit ed6e4ef836d425bc35e33bf20fcec95e68203afa Author: Julian Anastasov Date: Sat Jun 18 07:53:59 2011 +0000 netfilter: Fix ip_route_me_harder triggering ip_rt_bug Avoid creating input routes with ip_route_me_harder. It does not work for locally generated packets. Instead, restrict sockets to provide valid saddr for output route (or unicast saddr for transparent proxy). For other traffic allow saddr to be unicast or local but if callers forget to check saddr type use 0 for the output route. The resulting handling should be: - REJECT TCP: - in INPUT we can provide addr_type = RTN_LOCAL but better allow rejecting traffic delivered with local route (no IP address => use RTN_UNSPEC to allow also RTN_UNICAST). - FORWARD: RTN_UNSPEC => allow RTN_LOCAL/RTN_UNICAST saddr, add fix to ignore RTN_BROADCAST and RTN_MULTICAST - OUTPUT: RTN_UNSPEC - NAT, mangle, ip_queue, nf_ip_reroute: RTN_UNSPEC in LOCAL_OUT - IPVS: - use RTN_LOCAL in LOCAL_OUT and FORWARD after SNAT to restrict saddr to be local Signed-off-by: Julian Anastasov Signed-off-by: David S. Miller commit cd823db8b1161ef0d756514d280715a576d65cc3 Author: Petri Gynther Date: Wed Jun 29 11:36:11 2011 +0200 i2c/pca954x: Initialize the mux to disconnected state pca954x power-on default is channel 0 connected. If multiple pca954x muxes are connected to the same physical I2C bus, the parent bus will see channel 0 devices behind both muxes by default. This is bad. Scenario: -- pca954x @ 0x70 -- ch 0 (I2C-bus-101) -- EEPROM @ 0x50 | I2C-bus-1 --- | -- pca954x @ 0x71 -- ch 0 (I2C-bus-111) -- EEPROM @ 0x50 1. Load I2C bus driver: creates I2C-bus-1 2. Load pca954x driver: creates virtual I2C-bus-101 and I2C-bus-111 3. Load eeprom driver 4. Try to read EEPROM @ 0x50 on I2C-bus-101. The transaction will also bleed onto I2C-bus-111 because pca954x @ 0x71 channel 0 is connected by default. Fix: Initialize pca954x to disconnected state in pca954x_probe() Signed-off-by: Petri Gynther Signed-off-by: Jean Delvare Cc: stable@kernel.org commit 9b640f2e154268cb516efcaf9c434f2e73c6783e Author: Jean Delvare Date: Wed Jun 29 11:36:10 2011 +0200 i2c-taos-evm: Fix log messages * Print all error and information messages even when debugging is disabled. * Don't use adapter device to log messages before it is ready. Signed-off-by: Jean Delvare Cc: stable@kernel.org commit 6afba9e7fca5ad6a701c13760639faa0906fe487 Author: Yoshihiro Shimoda Date: Wed Jun 29 04:23:42 2011 +0000 sh: fix the value of sh_dmae_slave_config in setup-sh7757 Fix the value of chcr for SCIF[2-4]_RX and RIIC[0-9]_RX and the value of mid_rid for some RIIC. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Paul Mundt commit b00c2c79d9ceac49d8b3ba3b097e5df33f802d9a Author: Yoshihiro Shimoda Date: Wed Jun 29 04:23:47 2011 +0000 sh: fix the INTC vector for IRQ and IRL in setup-sh7757 Signed-off-by: Yoshihiro Shimoda Signed-off-by: Paul Mundt commit cb16c348760ad2bc79b67b20aefac05529569ed7 Author: Avi Kivity Date: Sun Jun 19 19:21:11 2011 +0300 KVM: x86 emulator: fix %rip-relative addressing with immediate source operand %rip-relative addressing is relative to the first byte of the next instruction, so we need to add %rip only after we've fetched any immediate bytes. Based on original patch by Li Xin . Signed-off-by: Avi Kivity Acked-by: Li Xin Signed-off-by: Marcelo Tosatti commit f5b2d0ef631bb0647ae8ed1752d2127b8fb6da70 Author: Wu Fengguang Date: Wed Jun 29 14:26:07 2011 +0800 ALSA: HDMI - fix ELD monitor name length I noticed that the last character of the ELD monitor name is lost, this fixes the issue. This fix should be confirming to the HDA spec, and works together with the DRM part of the ELD patch. The HDA spec does not mention that Monitor_Name_String is an '\0' ending string, and it allows NML to be 1, which is only valid when MNL does not count the possible ending '\0'. Signed-off-by: Wu Fengguang Signed-off-by: Takashi Iwai commit 76462232c21dc011462522387ddad0598a4f11e4 Author: Christian Dietrich Date: Sat Jun 4 05:36:54 2011 +0000 arch/powerpc: use printk_ratelimited instead of printk_ratelimit Since printk_ratelimit() shouldn't be used anymore (see comment in include/linux/printk.h), replace it with printk_ratelimited. Signed-off-by: Christian Dietrich Signed-off-by: Benjamin Herrenschmidt commit 9a8f99fab02db296815d7f0ae8ba8ce169df0063 Author: Christian Dietrich Date: Sat Jun 4 05:35:47 2011 +0000 powerpc/rtas-rtc: remove sideeffects of printk_ratelimit Don't use printk_ratelimit() as an additional condition for returning on an error. Because when the ratelimit is reached, printk_ratelimit will return 0 and e.g. in rtas_get_boot_time won't check for an error condition. Signed-off-by: Christian Dietrich Signed-off-by: Benjamin Herrenschmidt commit 937c190ccdd29855828529fc2b4b3e5f1282ff23 Author: Michael Neuling Date: Mon Jun 27 19:55:30 2011 +0000 powerpc/pseries: remove duplicate SCSI_BNX2_ISCSI in pseries_defconfig Remove duplicate assignment of SCSI_BNX2_ISCSI in pseries_defconfig introduced by: 37e0c21e powerpc/pseries: Enable iSCSI support for a number of cards causes warning: arch/powerpc/configs/pseries_defconfig:151:warning: override: reassigning to symbol SCSI_BNX2_ISCSI Signed-off-by: Michael Neuling Signed-off-by: Benjamin Herrenschmidt commit aeb0aea143e958d5218162d73b1ed4d6ff0ed7c4 Author: Hans-Christian Egtvedt Date: Tue Jun 28 17:01:14 2011 +0200 watchdog: update author email for at32ap700x_wdt This patch updates the email address of the at32ap700x_wdt driver supported by me to an email account I will use on a more regular basis in the future. Signed-off-by: Hans-Christian Egtvedt Signed-off-by: Wim Van Sebroeck commit 0d72c6fcb5cd215eeab824fac216ea42c5b574aa Merge: c89b857 f01c22f Author: Linus Torvalds Date: Tue Jun 28 11:15:57 2011 -0700 Merge branch 'drm-intel-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/keithp/linux-2.6 * 'drm-intel-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/keithp/linux-2.6: drm/i915: Use chipset-specific irq installers drm/i915: forcewake fix after reset drm/i915: add Ivy Bridge page flip support drm/i915: split page flip queueing into per-chipset functions commit c89b857ce6d803905b2c9d71bc9effdd286c45ed Merge: 2e34b42 663dd6d Author: Linus Torvalds Date: Tue Jun 28 11:15:36 2011 -0700 Merge branch 'driver-core-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6 * 'driver-core-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: Connector: Correctly set the error code in case of success when dispatching receive callbacks Connector: Set the CN_NETLINK_USERS correctly pti: PTI semantics fix in pti_tty_cleanup. pti: ENXIO error case memory leak PTI fix. pti: double-free security PTI fix drivers:misc: ti-st: fix skipping of change remote baud drivers/base/platform.c: don't mark platform_device_register_resndata() as __init_or_module st_kim: Handle case of no device found for ID 0 firmware: fix GOOGLE_SMI kconfig dependency warning commit 2e34b429a404675dc4fc4ad2ee339eea028da3ca Merge: 04b9059 857aab3 Author: Linus Torvalds Date: Tue Jun 28 11:15:17 2011 -0700 Merge branch 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6 * 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: MAINTAINERS: add myself as maintainer of USB/IP usb: r8a66597-hcd: fix cannot detect low/full speed device USB: ehci-ath79: fix a NULL pointer dereference USB: Add new FT232H chip to drivers/usb/serial/ftdi_sio.c usb/isp1760: Fix bug preventing the unlinking of control urbs USB: Fix up URB error codes to reflect implementation. xhci: Always set urb->status to zero for isoc endpoints. xhci: Add reset on resume quirk for asrock p67 host xHCI 1.0: Incompatible Device Error USB: don't let errors prevent system sleep USB: don't let the hub driver prevent system sleep USB: change maintainership of ohci-hcd and ehci-hcd xHCI 1.0: Force Stopped Event(FSE) xhci: Don't warn about zeroed bMaxBurst descriptor field. USB: Free bandwidth when usb_disable_device is called. xhci: Reject double add of active endpoints. USB: TI 3410/5052 USB Serial Driver: Fix mem leak when firmware is too big. usb: musb: gadget: clear TXPKTRDY flag when set FLUSHFIFO usb: musb: host: compare status for negative error values commit 04b905942b482092a547798a2477f21e32a8f65d Merge: d90ce87 3bc46b3 Author: Linus Torvalds Date: Tue Jun 28 11:14:55 2011 -0700 Merge branch 'tty-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6 * 'tty-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: serial: bcm63xx_uart: fix irq storm after rx fifo overrun. amba pl011: platform data for reg lockup and glitch v2 amba pl011: workaround for uart registers lockup tty: n_gsm: improper skb_pull() use was leaking framed data tty: n_gsm: Fixed logic to decode break signal from modem status TTY: ntty, add one more sanity check TTY: ldisc, do not close until there are readers 8250: Fix capabilities when changing the port type 8250_pci: Fix missing const from merges ARM: SAMSUNG: serial: Fix on handling of one clock source for UART serial: ioremap warning fix for jsm driver. 8250_pci: add -ENODEV code for Intel EG20T PCH commit d90ce8711ceb516de823ae878270e5a21d11dede Merge: 505cb6b a73738e Author: Linus Torvalds Date: Tue Jun 28 11:14:22 2011 -0700 Merge branch 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 * 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: Staging: comedi: fix build breakages on some platforms Staging: brcm80211: disable drivers except for X86 or MIPS platforms Staging: brcm80211: disable drivers for PPC platforms Staging: iio: Make IIO depend on GENERIC_HARDIRQS Staging: mei: fix suspend failure Staging: fix iio builds when IIO_RING_BUFFER is not enabled Staging: Comedi: Build only on arches providing PAGE_KERNEL_NOCACHE Staging: fix more iio builds when IIO_RING_BUFFER is not enabled commit 505cb6bc027ea8ae3782d2fdc47aa1915924ba80 Merge: 1d1221f 4274215 Author: Linus Torvalds Date: Tue Jun 28 11:14:00 2011 -0700 Merge branch 'for-linus' of git://neil.brown.name/md * 'for-linus' of git://neil.brown.name/md: md: avoid endless recovery loop when waiting for fail device to complete. commit f01c22fd59aa10a3738ede20fd4b9b6fd1e2eac3 Author: Chris Wilson Date: Tue Jun 28 11:48:51 2011 +0100 drm/i915: Use chipset-specific irq installers Konstantin Belousov pointed out that 4697995b98417 replaced the generic i915_driver_irq_*install() functions with chipset specific routines accessible only through driver->irq_*install(). So update the sanity check in i915_request_wait() to match. Signed-off-by: Chris Wilson Signed-off-by: Keith Packard commit 25732821cb965f00475922ca46e84f78e4bada95 Author: Ben Widawsky Date: Fri Jun 24 14:31:47 2011 -0700 drm/i915: forcewake fix after reset The failure is as follows: 1. Userspace gets forcewake lock, lock count >=1 2. GPU hang/reset occurs (forcewake bit is reset) 3. count is now incorrect The failure can only occur when using the forcewake userspace lock. This has the unfortunate consequence of messing up the driver as well as userspace, unless userspace closes the debugfs file, the kernel will never end up waking the GT since the refcount will be > 1. The solution is to try to recover the correct forcewake state based on the refcount. There is a period of time where userspace reads/writes may occur after the reset, before the GT has been forcewaked. The interface was never designed to be a perfect solution for userspace reads/writes, and the kernel portion is fixed by this patch. Suggested-by: Chris Wilson Signed-off-by: Ben Widawsky Signed-off-by: Keith Packard commit 1d1221f375c94ef961ba8574ac4f85c8870ddd51 Author: Vasiliy Kulikov Date: Fri Jun 24 16:08:38 2011 +0400 proc: restrict access to /proc/PID/io /proc/PID/io may be used for gathering private information. E.g. for openssh and vsftpd daemons wchars/rchars may be used to learn the precise password length. Restrict it to processes being able to ptrace the target process. ptrace_may_access() is needed to prevent keeping open file descriptor of "io" file, executing setuid binary and gathering io information of the setuid'ed process. Signed-off-by: Vasiliy Kulikov Signed-off-by: Linus Torvalds commit 0cfae7c9378cf77434f6be89b5fb65d8f9a5031f Author: Hans-Christian Egtvedt Date: Tue Jun 28 16:59:14 2011 +0200 ALSA: atmel - update author email for ABDAC, AC97C and AT73C213 This patch updates the email address of the sound drivers supported by me to an email account I will use on a more regular basis in the future. Signed-off-by: Hans-Christian Egtvedt Signed-off-by: Takashi Iwai commit 9966db22caf8f74c0e6d84a569e6d7d56332e127 Author: David Henningsson Date: Tue Jun 21 21:01:52 2011 +0200 ALSA: HDA: Add model=auto quirk for Acer Aspire 3830TG Since we're not using the new auto parser as a fallback yet, add it manually as a quirk. Signed-off-by: David Henningsson Signed-off-by: Takashi Iwai commit f0ca89b031d327b80b612a0608d31b8e13e6dc33 Author: David Henningsson Date: Tue Jun 21 20:51:34 2011 +0200 ALSA: HDA: Add a new Conexant codec ID (506c) Conexant ID 506c was found on Acer Aspire 3830TG. As users report no playback, sending to stable should be safe. Cc: stable@kernel.org BugLink: https://bugs.launchpad.net/bugs/783582 Reported-by: andROOM Signed-off-by: David Henningsson Signed-off-by: Takashi Iwai commit ae2a00607463ceb647ada550d7f34ba33177ef38 Author: Axel Lin Date: Mon Jun 27 22:37:16 2011 +0800 watchdog: gef_wdt: fix MODULE_ALIAS Remove the space between "platform:" prefix and the driver name. Signed-off-by: Axel Lin Acked-by: Martyn Welch Signed-off-by: Wim Van Sebroeck commit e376fd664b1547e29e264e3cfb97553a1be9054b Author: Jesper Juhl Date: Thu May 26 11:12:53 2011 +0200 watchdog: Intel SCU Watchdog: Fix build and remove duplicate code Trying to build the Intel SCU Watchdog fails for me with gcc 4.6.0 - $ gcc --version | head -n 1 gcc (GCC) 4.6.0 20110513 (prerelease) like this : CC drivers/watchdog/intel_scu_watchdog.o In file included from drivers/watchdog/intel_scu_watchdog.c:49:0: /home/jj/src/linux-2.6/arch/x86/include/asm/apb_timer.h: In function ‘apbt_time_init’: /home/jj/src/linux-2.6/arch/x86/include/asm/apb_timer.h:65:42: warning: ‘return’ with a value, in function returning void [enabled by default] drivers/watchdog/intel_scu_watchdog.c: In function ‘intel_scu_watchdog_init’: drivers/watchdog/intel_scu_watchdog.c:468:2: error: implicit declaration of function ‘sfi_get_mtmr’ [-Werror=implicit-function-declaration] drivers/watchdog/intel_scu_watchdog.c:468:32: warning: assignment makes pointer from integer without a cast [enabled by default] cc1: some warnings being treated as errors make[1]: *** [drivers/watchdog/intel_scu_watchdog.o] Error 1 make: *** [drivers/watchdog/intel_scu_watchdog.o] Error 2 Additionally, linux/types.h is needlessly being included twice in drivers/watchdog/intel_scu_watchdog.c Signed-off-by: Jesper Juhl Signed-off-by: Wim Van Sebroeck commit db98f89a2807966c6e82601f5c57e1a9c214c91a Author: Florian Fainelli Date: Wed Jun 15 19:15:52 2011 +0200 watchdog: mtx1-wdt: fix section mismatch Fix section mismatch and remove unused variable 'tmp'. Signed-off-by: Florian Fainelli Signed-off-by: Wim Van Sebroeck commit 2ea4e76e997019ae25ac3417aa46e31ddf7ecb17 Author: Florian Fainelli Date: Wed Jun 15 19:15:41 2011 +0200 watchdog: mtx1-wdt: fix GPIO toggling Commit e391be76 (MIPS: Alchemy: Clean up GPIO registers and accessors) changed the way the GPIO was toggled. Prior to this patch, we would always actively drive the GPIO output to either 0 or 1, this patch drove the GPIO active to 0, and put the GPIO in tristate to drive it to 1, unfortunately this does not work, revert back to active driving. Using a signed variable (gstate) to hold the gpio state and using a bit- wise operation on it also resulted in toggling value from 1 to -2 since the variable is signed. This value was then passed on to gpio_direction_ output, which always perform a if (value) ... to set the value to the gpio, so we were always writing a 1 to this GPIO instead of 1 -> 0 -> 1 ... Signed-off-by: Florian Fainelli Signed-off-by: Wim Van Sebroeck Cc: stable commit 9b19d40aa3ebaf1078779da10555da2ab8512422 Author: Florian Fainelli Date: Wed Jun 15 19:15:23 2011 +0200 watchdog: mtx1-wdt: request gpio before using it Otherwise, the gpiolib autorequest feature will produce a WARN_ON(): WARNING: at drivers/gpio/gpiolib.c:101 0x8020ec6c() autorequest GPIO-215 [...] Signed-off-by: Florian Fainelli Signed-off-by: Wim Van Sebroeck Cc: stable commit 076bad7c4d2c51d9484f0ac60d68838139d2bf72 Author: Mark Brown Date: Tue May 31 14:46:55 2011 +0100 watchdog: Handle multiple wm831x watchdogs being registered Due to the whole single instance based watchdog API we use static data for the wm831x watchdog which means that if the system tries to register a second one we end up trying to register the same miscdevice again, corrupting the miscdevice list. Work around this by checking for duplicate registrations until we get a watchdog core. Signed-off-by: Mark Brown Signed-off-by: Wim Van Sebroeck commit 4274215d24633df7302069e51426659d4759c5ed Author: NeilBrown Date: Tue Jun 28 16:59:42 2011 +1000 md: avoid endless recovery loop when waiting for fail device to complete. If a device fails in a way that causes pending request to take a while to complete, md will not be able to immediately remove it from the array in remove_and_add_spares. It will then incorrectly look like a spare device and md will try to recover it even though it is failed. This leads to a recovery process starting and instantly aborting over and over again. We should check if the device is faulty before considering it to be a spare. This will avoid trying to start a recovery that cannot proceed. This bug was introduced in 2.6.26 so that patch is suitable for any kernel since then. Cc: stable@kernel.org Reported-by: Jim Paradis Signed-off-by: NeilBrown commit 353e5c9abd900de3d1a40925386ffe4abf76111e Author: Steffen Klassert Date: Wed Jun 22 01:05:37 2011 +0000 ipv4: Fix IPsec slowpath fragmentation problem ip_append_data() builds packets based on the mtu from dst_mtu(rt->dst.path). On IPsec the effective mtu is lower because we need to add the protocol headers and trailers later when we do the IPsec transformations. So after the IPsec transformations the packet might be too big, which leads to a slowpath fragmentation then. This patch fixes this by building the packets based on the lower IPsec mtu from dst_mtu(&rt->dst) and adapts the exthdr handling to this. Signed-off-by: Steffen Klassert Signed-off-by: David S. Miller commit 33f99dc7fd948bbc808a24a0989c167f8973b643 Author: Steffen Klassert Date: Wed Jun 22 01:04:37 2011 +0000 ipv4: Fix packet size calculation in __ip_append_data Git commit 59104f06 (ip: take care of last fragment in ip_append_data) added a check to see if we exceed the mtu when we add trailer_len. However, the mtu is already subtracted by the trailer length when the xfrm transfomation bundles are set up. So IPsec packets with mtu size get fragmented, or if the DF bit is set the packets will not be send even though they match the mtu perfectly fine. This patch actually reverts commit 59104f06. Signed-off-by: Steffen Klassert Signed-off-by: David S. Miller commit a73738e9f85fa6ba3f1f9a6ea95b5e5fa99579a2 Author: Greg Kroah-Hartman Date: Mon Jun 27 14:43:34 2011 -0700 Staging: comedi: fix build breakages on some platforms Some platforms do not have virt_to_bus(), so properly depend on CONFIG_VIRT_TO_BUS for the Comedi drivers that need this function. Reported-by: Stephen Rothwell Signed-off-by: Greg Kroah-Hartman commit d4620396d7e9759dd3f37a8155827477cf2b5309 Author: Greg Kroah-Hartman Date: Mon Jun 27 14:34:42 2011 -0700 Staging: brcm80211: disable drivers except for X86 or MIPS platforms As David points out, the driver is also broken on SPARC, so might as well just only enable it on platforms where people have reported it working, instead of trying to list all of the ones where it doesn't work, as the working platform list is much smaller... Reported-by: David Miller Reported-by: Stephen Rothwell Cc: Henry Ptasinski Cc: Brett Rudley Cc: Roland Vossen Signed-off-by: Greg Kroah-Hartman commit 15e5201dfd4eebfce5e50b068ed40cb5f574fee6 Author: Greg Kroah-Hartman Date: Thu Jun 9 13:16:13 2011 -0700 Staging: brcm80211: disable drivers for PPC platforms Right now, bad things happen if you try to build these drivers for the PPC platform as it seems that the code only has been tested and built on the MIPS big endian platform. So disable it on the PPC32 and PPC64 platforms for now, hopefully this will be resolved in the future as I'm sure someone will want to use these chips with that platform someday. Reported-by: Stephen Rothwell Cc: Henry Ptasinski Cc: Brett Rudley Cc: Roland Vossen Signed-off-by: Greg Kroah-Hartman commit 928f9111662574c1ac1dfa221c4e502ec713aed9 Author: Geert Uytterhoeven Date: Tue May 31 11:37:40 2011 +0200 Staging: iio: Make IIO depend on GENERIC_HARDIRQS On m68k (which doesn't support generic hardirqs yet): drivers/staging/iio/industrialio-trigger.c: In function ‘iio_trigger_poll’: drivers/staging/iio/industrialio-trigger.c:180: error: implicit declaration of function ‘generic_handle_irq’ drivers/staging/iio/industrialio-trigger.c: In function ‘iio_trigger_poll_chained’: drivers/staging/iio/industrialio-trigger.c:200: error: implicit declaration of function ‘handle_nested_irq’ drivers/staging/iio/industrialio-trigger.c: In function ‘iio_trig_release’: drivers/staging/iio/industrialio-trigger.c:379: error: implicit declaration of function ‘irq_modify_status’ drivers/staging/iio/industrialio-trigger.c:382: error: implicit declaration of function ‘irq_set_chip’ drivers/staging/iio/industrialio-trigger.c:384: error: implicit declaration of function ‘irq_set_handler’ drivers/staging/iio/industrialio-trigger.c:388: error: implicit declaration of function ‘irq_free_descs’ drivers/staging/iio/industrialio-trigger.c: In function ‘iio_trig_subirqmask’: drivers/staging/iio/industrialio-trigger.c:402: error: implicit declaration of function ‘irq_data_get_irq_chip’ drivers/staging/iio/industrialio-trigger.c:402: warning: initialization makes pointer from integer without a cast drivers/staging/iio/industrialio-trigger.c: In function ‘iio_trig_subirqunmask’: drivers/staging/iio/industrialio-trigger.c:411: warning: initialization makes pointer from integer without a cast drivers/staging/iio/industrialio-trigger.c: In function ‘iio_allocate_trigger’: drivers/staging/iio/industrialio-trigger.c:432: error: implicit declaration of function ‘irq_alloc_descs’ drivers/staging/iio/industrialio-trigger.c:455: error: ‘handle_simple_irq’ undeclared (first use in this function) drivers/staging/iio/industrialio-trigger.c:455: error: (Each undeclared identifier is reported only once drivers/staging/iio/industrialio-trigger.c:455: error: for each function it appears in.) Hence IIO_TRIGGER should depend on GENERIC_HARDIRQS. But as IIO_TRIGGER and IIO_RING_BUFFER form a maze of dependencies and selects, just make the whole IIO subsystem depend on GENERIC_HARDIRQS. This dependency also covers !S390, so that one can be removed again. Signed-off-by: Geert Uytterhoeven Acked-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman commit a534bb6eea72c0d082dd2faab85450e5554ba1c8 Author: Tomas Winkler Date: Mon Jun 13 16:39:31 2011 +0300 Staging: mei: fix suspend failure wait_event_interruptible_timeout return value was wrongly used. The remaining timeout was used as the error code. This fix translated wait_event_interruptible_timeout return value into error code that can be propagated. [10291.674121] pci_pm_suspend(): mei_pci_suspend+0x0/0x8b [mei] returns 2500 It's thinkpad t400 with 00:03.0 Communication controller [0780]: Intel Corporation Mobile 4 Series Chipset MEI Controller [8086:2a44] (rev 07) Reported-by: Arkadiusz Miskiewicz Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman commit fdf2df0e8ce634c9ee5f740a9303e8518ca78932 Author: Randy Dunlap Date: Tue Jun 14 15:00:18 2011 -0700 Staging: fix iio builds when IIO_RING_BUFFER is not enabled Fix build by moving enum list outside of #ifdef CONFIG_IIO_RING_BUFFER. drivers/staging/iio/accel/adis16201_core.c:413: error: 'ADIS16201_SCAN_SUPPLY' undeclared here (not in a function) drivers/staging/iio/accel/adis16201_core.c:417: error: 'ADIS16201_SCAN_TEMP' undeclared here (not in a function) drivers/staging/iio/accel/adis16201_core.c:422: error: 'ADIS16201_SCAN_ACC_X' undeclared here (not in a function) drivers/staging/iio/accel/adis16201_core.c:427: error: 'ADIS16201_SCAN_ACC_Y' undeclared here (not in a function) drivers/staging/iio/accel/adis16201_core.c:432: error: 'ADIS16201_SCAN_AUX_ADC' undeclared here (not in a function) drivers/staging/iio/accel/adis16201_core.c:436: error: 'ADIS16201_SCAN_INCLI_X' undeclared here (not in a function) drivers/staging/iio/accel/adis16201_core.c:441: error: 'ADIS16201_SCAN_INCLI_Y' undeclared here (not in a function) vers/staging/iio/accel/adis16203_core.c:374: error: 'ADIS16203_SCAN_SUPPLY' undeclared here (not in a function) drivers/staging/iio/accel/adis16203_core.c:378: error: 'ADIS16203_SCAN_AUX_ADC' undeclared here (not in a function) drivers/staging/iio/accel/adis16203_core.c:382: error: 'ADIS16203_SCAN_INCLI_X' undeclared here (not in a function) drivers/staging/iio/accel/adis16203_core.c:388: error: 'ADIS16203_SCAN_INCLI_Y' undeclared here (not in a function) drivers/staging/iio/accel/adis16203_core.c:392: error: 'ADIS16203_SCAN_TEMP' undeclared here (not in a function) Signed-off-by: Randy Dunlap Acked-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman commit 6fab3e1fbc83e6d61e8c28ceab513274183a96f6 Author: Ralf Baechle Date: Thu Jun 23 12:45:37 2011 +0100 Staging: Comedi: Build only on arches providing PAGE_KERNEL_NOCACHE On architectures that don't define PAGE_KERNEL_NOCACHE, the Comedi driver turns into tragedy: CC [M] drivers/staging/comedi/drivers.o drivers/staging/comedi/drivers.c: In function ‘comedi_buf_alloc’: drivers/staging/comedi/drivers.c:505:41: error: ‘PAGE_KERNEL_NOCACHE’ undeclared (first use in this function) drivers/staging/comedi/drivers.c:505:41: note: each undeclared identifier is rep orted only once for each function it appears in make[3]: *** [drivers/staging/comedi/drivers.o] Error 1 Restrict the driver to only those architectures that define PAGE_KERNEL_NOCACHE. PAGE_KERNEL_NOCACHE is a kludge - some system architectures such as SGI IP27 are even uable to offer uncached operation - at least in the way an unwitting driver might assume. I haven't looked in details how the driver is using the area vmaped with PAGE_KERNEL_NOCACHE but maybe doing it XFS-style using cached memory and the flush_kernel_vmap_range / invalidate_kernel_vmap_range APIs in conjunction with the DMA API is a practical alternative. Signed-off-by: Ralf Baechle Reported-by: David Miller Reported-by: Stephen Rothwell Acked-by: Geert Uytterhoeven Cc: Martyn Welch Signed-off-by: Greg Kroah-Hartman commit 89089158d191ba0195b33ebf35f91ed217d44848 Author: Randy Dunlap Date: Fri Jun 24 09:28:32 2011 -0700 Staging: fix more iio builds when IIO_RING_BUFFER is not enabled Fix lots more build errors in staging/iio when CONFIG_IIO_RING_BUFFER is not enabled by moving enums and defines outside of the CONFIG_IIO_RING_BUFFER ifdef block. Examples (one from each driver; there were 116 total errors): drivers/staging/iio/accel/adis16204_core.c:437: error: 'ADIS16204_SCAN_SUPPLY' undeclared here (not in a function) drivers/staging/iio/accel/adis16209_core.c:410: error: 'ADIS16209_SCAN_SUPPLY' undeclared here (not in a function) drivers/staging/iio/gyro/adis16260_core.c:420: error: 'ADIS16260_SCAN_GYRO' undeclared here (not in a function) drivers/staging/iio/imu/adis16400_core.c:565: error: 'ADIS16400_SCAN_SUPPLY' undeclared here (not in a function) Signed-off-by: Randy Dunlap Acked-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman commit 857aab34f04ff86666aa80e751ee696eff0113dd Author: matt mooney Date: Fri Jun 17 15:50:46 2011 -0700 MAINTAINERS: add myself as maintainer of USB/IP Signed-off-by: matt mooney Signed-off-by: Greg Kroah-Hartman commit 87abd0a92c72eea71542d6c972c67e39e584e989 Author: Yoshihiro Shimoda Date: Tue Jun 21 13:24:42 2011 +0900 usb: r8a66597-hcd: fix cannot detect low/full speed device This controller can control "Transaction Translators", but the hcd->has_tt is not set. Since the commit d199c96d41d80a567493e12b8e96ea056a1350c1 ("USB: prevent buggy from crashing the USB stack") has checked it, the driver could not work the low/full speed device. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Greg Kroah-Hartman commit c27d5368ef1f7ea40bcd1fb2626f4c99d77e0080 Author: Gabor Juhos Date: Mon Jun 20 17:22:36 2011 +0200 USB: ehci-ath79: fix a NULL pointer dereference Loading the ehci-hcd module on the ath79 platform causes a NULL pointer dereference: CPU 0 Unable to handle kernel paging request at virtual address 00000000, epc == c0252928, ra == c00de968 Oops[#1]: Cpu 0 $ 0 : 00000000 00000070 00000001 00000000 $ 4 : 802cf870 0000117e ffffffff 8019c7bc $ 8 : 0000000a 00000002 00000001 fffffffb $12 : 8026ef20 0000000f ffffff80 802dad3c $16 : 8077a2d4 8077a200 c00f3484 8019ed84 $20 : c00f0000 00000003 000000a0 80262c2c $24 : 00000002 80079da0 $28 : 80788000 80789c80 80262b14 c00de968 Hi : 00000000 Lo : b61f0000 epc : c0252928 __mod_vermagic5+0xc260/0xc7e8 [ehci_hcd] Not tainted ra : c00de968 usb_add_hcd+0x2a4/0x858 [usbcore] Status: 1000c003 KERNEL EXL IE Cause : 00800008 BadVA : 00000000 PrId : 00019374 (MIPS 24Kc) Modules linked in: ehci_hcd(+) pppoe pppox ipt_REJECT xt_TCPMSS ipt_LOG xt_comment xt_multiport xt_mac xt_limit iptable_mangle iptable_filte r ip_tables xt_tcpudp x_tables ppp_async ppp_generic slhc ath mac80211 usbcore nls_base input_polldev crc_ccitt cfg80211 compat input_core a rc4 aes_generic crypto_algapi Process insmod (pid: 379, threadinfo=80788000, task=80ca2180, tls=77fe52d0) Stack : c0253184 80c57d80 80789cac 8077a200 00000001 8019edc0 807fa800 8077a200 8077a290 c00f3484 8019ed84 c00f0000 00000003 000000a0 80262c2c c00de968 802d0000 800878cc c0253228 c02528e4 c0253184 80c57d80 80bf6800 80ca2180 8007b75c 00000000 8077a200 802cf830 802d0000 00000003 fffffff4 00000015 00000348 00000124 800b189c c024bb4c c0255000 801a27e8 c0253228 c02528e4 ... Call Trace: [] __mod_vermagic5+0xc260/0xc7e8 [ehci_hcd] It is caused by: commit c430131a02d677aa708f56342c1565edfdacb3c0 Author: Jan Andersson Date: Tue May 3 20:11:57 2011 +0200 USB: EHCI: Support controllers with big endian capability regs The two first HC capability registers (CAPLENGTH and HCIVERSION) are defined as one 8-bit and one 16-bit register. Most HC implementations have selected to treat these registers as part of a 32-bit register, giving the same layout for both big and small endian systems. This patch adds a new quirk, big_endian_capbase, to support controllers with big endian register interfaces that treat HCIVERSION and CAPLENGTH as individual registers. Signed-off-by: Jan Andersson Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman The reading of the HC capability register has been moved by that commit to a place where the ehci->caps field is not initialized yet. This patch moves the reading of the register back to the original place. Acked-by: Jan Andersson Cc: Alan Stern Signed-off-by: Gabor Juhos Signed-off-by: Greg Kroah-Hartman commit 309427b6351b763917caac3e4b2ab5651df99823 Author: Uwe Bonnes Date: Fri Jun 17 17:30:23 2011 +0200 USB: Add new FT232H chip to drivers/usb/serial/ftdi_sio.c appended patch adds support for the new FTDI FT232H chip. This chip is a single channel version of the dual FT2232H/quad FT4232H, coming with it's own default PID 0x6014 (FT2232H uses the same PID 0x6010 like FT2232C, FT4232H has also it's own PID). The patch was checked on an UM232H module and a terminal program with TX/RX shorted to that typing in the terminal reproduced the characters. Signed-off-by: Uwe Bonnes Cc: stable Signed-off-by: Greg Kroah-Hartman commit 8b1ab60c767f33d79894ef66037ef851a7a88fc8 Author: Arvid Brodin Date: Fri Jun 17 18:45:37 2011 +0200 usb/isp1760: Fix bug preventing the unlinking of control urbs Both control and bulk transfers use isp1760 slots of type ATL, but the driver unlink code for ATL slots only acts on urbs describing a bulk transfer, letting the code for INT slots take care of the unlink instead, which often ended up removing the interrupt transfer for root hub events instead. That's not good, and gets fixed by this patch. Signed-off-by: Arvid Brodin Cc: Sebastian Andrzej Siewior Signed-off-by: Greg Kroah-Hartman commit 95a2424ff9221624c3944f3732f6cfacbb522ae4 Merge: 0af212b a9e7586 Author: Greg Kroah-Hartman Date: Mon Jun 27 13:35:23 2011 -0700 Merge branch 'for-usb-linus' of git+ssh://master.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into usb-linus * 'for-usb-linus' of git+ssh://master.kernel.org/pub/scm/linux/kernel/git/sarah/xhci: USB: Fix up URB error codes to reflect implementation. xhci: Always set urb->status to zero for isoc endpoints. xhci: Add reset on resume quirk for asrock p67 host xHCI 1.0: Incompatible Device Error xHCI 1.0: Force Stopped Event(FSE) xhci: Don't warn about zeroed bMaxBurst descriptor field. USB: Free bandwidth when usb_disable_device is called. xhci: Reject double add of active endpoints. commit 7c9017e5b77118439952fe8dc22809bae4fae4b6 Author: Jesse Barnes Date: Thu Jun 16 12:18:54 2011 -0700 drm/i915: add Ivy Bridge page flip support Use the blit ring for submitting flips since the render ring doesn't generate flip complete interrupts. Fixes bugs: https://bugs.freedesktop.org/show_bug.cgi?id=38362 https://bugs.freedesktop.org/show_bug.cgi?id=38392 https://bugs.freedesktop.org/show_bug.cgi?id=38393 Signed-off-by: Jesse Barnes Reviewed-by: Daniel Vetter Reviewed-by: Kenneth Graunke Reviewed-by: Ben Widawsky Tested-by: Jian J Zhao Signed-off-by: Keith Packard commit 8c9f3aaf8e174ca914889ab7a916586f8fd1e641 Author: Jesse Barnes Date: Thu Jun 16 09:19:13 2011 -0700 drm/i915: split page flip queueing into per-chipset functions This makes things a little clearer and prevents us from running old code on a new chipset that may not be supported. Signed-off-by: Jesse Barnes Reviewied-by: Ben Widawsky Signed-off-by: Keith Packard commit c5efefac659870744f6e203e28abd095ac0f590b Author: Joachim Eastwood Date: Thu Jun 2 01:36:09 2011 +0200 at91: Use "pclk" as con_id on at91cap9 and at91rm9200 Hello, I am not 100% sure this is the right thing to do, but it makes the atmel-ssc driver happy on my at91rm9200 board. This unifies the con_id across all at91 machines. The atmel-ssc driver expects the con_id to be "pclk" or it will fail probing. Signed-off-by: Joachim Eastwood Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD commit 9d87159e571d73ccf87adf1ee3691b861253d900 Author: Jean-Christophe PLAGNIOL-VILLARD Date: Tue Jun 21 14:24:33 2011 +0800 at91: fix udc, ehci and mmc clock device name for cap9/9g45/9rl Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD Acked-by: Nicolas Ferre commit deba1a0d58b54905a5201cb9e1aa878cfc74ff70 Author: Jean-Christophe PLAGNIOL-VILLARD Date: Tue Jun 21 12:17:00 2011 +0800 atmel_serial: fix internal port num the atmel_ports is link to the console number and not the device id this was not detected on at91 as we always register the dbgu on the console as ttyS0 tested on at91sam9263 by setting the dbgu as ttyS1 and use as console diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c index 70e5646..9b8a14f 100644 - a/arch/arm/mach-at91/board-sam9263ek.c + b/arch/arm/mach-at91/board-sam9263ek.c @@ -58,14 +58,14 @@ static void __init ek_init_early(void) /* Initialize processor: 16.367 MHz crystal */ at91_initialize(16367660); - /* DBGU on ttyS0. (Rx & Tx only) */ - at91_register_uart(0, 0, 0); + /* DBGU on ttyS1. (Rx & Tx only) */ + at91_register_uart(0, 1, 0); - /* USART0 on ttyS1. (Rx, Tx, RTS, CTS) */ - at91_register_uart(AT91SAM9263_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS); + /* USART0 on ttyS0. (Rx, Tx, RTS, CTS) */ + at91_register_uart(AT91SAM9263_ID_US0, 0, ATMEL_UART_CTS | ATMEL_UART_RTS); - /* set serial console to ttyS0 (ie, DBGU) */ - at91_set_serial_console(0); + /* set serial console to ttyS1 (ie, DBGU) */ + at91_set_serial_console(1); } /* Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD Cc: Nicolas Ferre Cc: Alan Cox Cc: Hans-Christian Egtvedt commit 5c1f9668692061b97125e343721c7514ca05a8bb Author: Jean-Christophe PLAGNIOL-VILLARD Date: Tue Jun 21 11:24:33 2011 +0800 at91: fix at91_set_serial_console: use platform device id Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD commit d6fe5f4eccc2a7d2ad885ecb26a192b08dcc7cd1 Author: John (Jay) Hernandez Date: Thu Jun 23 14:39:12 2011 +0000 cxgb3: skb_record_rx_queue now records the queue index relative to the net_device. Fixed call to skb_record_rx_queue where we were passing the queue index relative to the adapter when it should have been relative to the net_device. Signed-off-by: John (Jay) Hernandez Signed-off-by: Divy Le Ray Reported-by: Shawn Bohrer Signed-off-by: David S. Miller commit bd4265fe365c0f3945dd5ff1527e52bbe2bedfa2 Author: Herbert Xu Date: Thu Jun 23 02:39:12 2011 +0000 bridge: Only flood unregistered groups to routers The bridge currently floods packets to groups that we have never seen before to all ports. This is not required by RFC4541 and in fact it is not desirable in environment where traffic to unregistered group is always present. This patch changes the behaviour so that we only send traffic to unregistered groups to ports marked as routers. The user can always force flooding behaviour to any given port by marking it as a router. Note that this change does not apply to traffic to 224.0.0.X as traffic to those groups must always be flooded to all ports. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller commit b997d79a91f7b6be952b98cf9d9585b124558f5b Author: Ron Mercer Date: Wed Jun 22 06:35:45 2011 +0000 qlge: Add maintainer. Signed-off-by: Ron Mercer Signed-off-by: David S. Miller commit 7cacd43cdd2e4ebba9574635f05538f4053fd725 Author: Mike Frysinger Date: Fri Jun 24 17:42:14 2011 -0700 MAINTAINERS: mark socketcan-core lists as subscribers-only The socketcan-core lists require subscription, so mark them as such. Signed-off-by: Mike Frysinger Signed-off-by: David S. Miller commit a6b3ff9f0d7275e9e2ba3295f585d01f99aeb295 Author: Sven Eckelmann Date: Tue Jun 21 03:13:03 2011 +0000 MAINTAINERS: Remove Sven Eckelmann from BATMAN ADVANCED I cannot speak on behalf of the batman-adv developers due to conflicts in the opinion about the ongoing development. The batman-adv module is still maintained by Marek Lindner and Simon Wunderlich. Those are the main persons behind the visions of batman-adv. Therefore, the state of module hasn't changed. Signed-off-by: Sven Eckelmann Cc: b.a.t.m.a.n@lists.open-mesh.org Signed-off-by: David S. Miller commit 4d03b446d2f09469cb731200577322eff660b204 Merge: acc468f 1e4e82b Author: David S. Miller Date: Fri Jun 24 14:33:01 2011 -0700 Merge branch 'davem.r8169' of git://git.kernel.org/pub/scm/linux/kernel/git/romieu/netdev-2.6 commit acc468f5f9616ba564b772ac8a3aef218bff6bb3 Merge: 5c18e80 9935d12 Author: John W. Linville Date: Fri Jun 24 14:00:24 2011 -0400 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into for-davem commit 1e4e82baee8c2a8d753cbf6aa1a77326b71e59f0 Author: Francois Romieu Date: Fri Jun 24 19:52:13 2011 +0200 r8169: fix wrong register use. Signed-off-by: Francois Romieu Cc: Realtek linux nic maintainers commit 6935d131dec9a85afe80512b5a12541592802e48 Author: Yoshihiro Shimoda Date: Tue Mar 1 07:58:47 2011 +0000 sh: add to select the new configuration for USB EHCI/OHCI Because the USB EHCI/OHCI driver has new configuration for SH, the patch enables the EHCI and/or OHCI driver of the on-chip for some CPUs. Signed-off-by: Yoshihiro Shimoda Signed-off-by: Paul Mundt commit 17e8c4e1ebf139743e3830439fa65fd906af4a43 Author: Loïc Minier Date: Mon Jun 20 20:44:17 2011 +0000 fbdev: amba: Link fb device to its parent Some pieces of userspace like debian-installer expect to find the fb0 driver name by readlink-ing /sys/class/graphics/fb0/device/driver but this was broken with amba-clcd as it sets up fb_info manually and missed the .device parent pointer. Signed-off-by: Loïc Minier Cc: Russell King Signed-off-by: Paul Mundt commit 39785eb1d3e6c58cc8bf8f6990956a58037ecc75 Author: Timur Tabi Date: Thu Jun 23 20:20:26 2011 +0000 fsl-diu-fb: remove check for pixel clock ranges The Freescale DIU framebuffer driver defines two constants, MIN_PIX_CLK and MAX_PIX_CLK, that are supposed to represent the lower and upper limits of the pixel clock. These values, however, are true only for one platform clock rate (533MHz) and only for the MPC8610. So the actual range for the pixel clock is chip-specific, which means the current values are almost always wrong. The chance of an out-of-range pixel clock being used are also remote. Rather than try to detect an out-of-range clock in the DIU driver, we depend on the board-specific pixel clock function (e.g. p1022ds_set_pixel_clock) to clamp the pixel clock to a supported value. Signed-off-by: Timur Tabi Signed-off-by: Paul Mundt commit 9377c51752970c305fae29ac634501fde44378cb Author: William Katsak Date: Thu Jun 23 13:16:29 2011 +0000 udlfb: Correct sub-optimal resolution selection. The situation in which the problem occurred was with a Plugable UGA-2K-A connected to a Samsung EX2220X display. The driver indicates that 1920x1080 is a valid mode (the first mode available, in fact), but proceeds to set the framebuffer size to 1600x1200. The patch corrects what seems to be a logic error, regarding unsetting the FB_MISC_1ST_DETAIL flag, if the first (top/best) mode is invalid. The existing code unset the flag if ANY mode was invalid. Signed-off-by: William Katsak Signed-off-by: Paul Mundt commit 2bceec57fa7d660dffd4fbe423d84411cafb1acf Merge: 2916001 06c8a6a Author: Paul Mundt Date: Fri Jun 24 17:00:57 2011 +0900 Merge branch 'common/fbdev-meram' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-3.x into fbdev-fixes-for-linus commit 291600193e5c0c3f0a9af1f23a8076dd7417c02a Author: Pavel Shved Date: Fri Jun 17 16:25:12 2011 +0000 hecubafb: add module_put on error path in hecubafb_probe() In hecubafb_probe(), after a successful try_module_get, vzalloc may fail and make the hecubafb_probe return, but the module is not put on this error path. This patch adds an exit point that calls module_put in such situation. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Pavel Shved Signed-off-by: Paul Mundt commit 9845afc8fa32de145d56c8e69b7900e10371255d Author: Randy Dunlap Date: Thu Jun 16 19:32:40 2011 +0000 sm501fb: fix section mismatch warning Fix section mismatch warning in sm501fb: WARNING: drivers/video/sm501fb.o(.text+0x21d6): Section mismatch in reference from the function sm501fb_init_fb() to the variable .devinit.data:sm501_default_mode The function sm501fb_init_fb() references the variable __devinitdata sm501_default_mode. This is often because sm501fb_init_fb lacks a __devinitdata annotation or the annotation of sm501_default_mode is wrong. Signed-off-by: Randy Dunlap Signed-off-by: Paul Mundt commit 3535ed3fa7a87244410696880000e03bc224315d Author: Randy Dunlap Date: Thu Jun 16 19:31:19 2011 +0000 gx1fb: Fix section mismatch warnings Fix a chain of section mismatches in geode driver, beginning with: WARNING: drivers/video/geode/gx1fb.o(.data+0x70): Section mismatch in reference from the variable gx1fb_driver to the function .init.text:gx1fb_probe() The variable gx1fb_driver references the function __init gx1fb_probe() If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console Making the changes that Paul pointed out resulted in a few more changes being needed, so they are all included here. Signed-off-by: Randy Dunlap Signed-off-by: Paul Mundt commit 06c8a6a3e40265ff580428bbf51991617477f65b Author: Damian Hobson-Garcia Date: Wed Jun 22 07:46:25 2011 +0000 fbdev: sh_mobile_meram: Correct pointer check for YCbCr chroma plane The check was intended to test if we have a valid pointer to write into, but it mistakenly checks the pointer contents instead. Since a valid pointer is mandatory for the chroma data if a YCbCr format is used, the pointer check has been removed. Signed-off-by: Damian Hobson-Garcia Signed-off-by: Paul Mundt commit 5c18e80be9ff362f6523b097d495bb2e2f939946 Author: Dan Carpenter Date: Thu Jun 23 03:15:39 2011 -0700 net/usb/kalmia: signedness bug in kalmia_bind() "status" should be an int here for the error handling to work. Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller commit 7cdfa4a348b6b199a3189604f2085f1b214b6458 Author: Marius B. Kotsbak Date: Wed Jun 22 05:26:16 2011 +0000 net/usb: kalmia: Various fixes for better support of non-x86 architectures. -Support for big endian. -Do not use USB buffers at the stack. -Safer/more efficient code for local constants. Signed-off-by: Marius B. Kotsbak Signed-off-by: David S. Miller commit 9935d12651c9e54ad266e17cd542ec717ccd0fc8 Author: Larry Finger Date: Tue Jun 21 10:48:31 2011 -0500 rtl8192cu: Fix missing firmware load In commit 3ac5e26a1e935469a8bdae1d624bc3b59d1fcdc5 entitled "rtlwifi: rtl8192c-common: Change common firmware routines for addition of rtl8192se and rtl8192de", the firmware loading code was moved. Unfortunately, some necessary code was dropped for rtl8192cu. The dmesg output shows the following: rtl8192c: Loading firmware file rtlwifi/rtl8192cufw.bin rtl8192c_common:_rtl92c_fw_free_to_go():<0-0> Polling FW ready fail!! REG_MCUFWDL:0x00000006 . rtl8192c_common:rtl92c_download_fw():<0-0> Firmware is not ready to run! In addition, the interface will authenticate and associate, but cannot transfer data. This is reported as Kernel Bug #38012. Signed-off-by: Larry Finger Signed-off-by: John W. Linville commit 82a9a4809f4cb4ce3f17da99a8150df8455fa096 Author: Scott Wood Date: Thu Jun 16 14:09:17 2011 -0500 powerpc/e500: fix breakage with fsl_rio_mcheck_exception The wrong MCSR bit was being used on e500mc. MCSR_BUS_RBERR only exists on e500v1/v2. Use MCSR_LD on e500mc, and remove all MCSR checking in fsl_rio_mcheck_exception as we now no longer call that function if the appropriate bit in MCSR is not set. If RIO support was enabled at compile-time, but was never probed, just return from fsl_rio_mcheck_exception rather than dereference a NULL pointer. TODO: There is still a remaining, though comparitively minor, issue in that this recovery mechanism will falsely engage if there's an unrelated MCSR_LD event at the same time as a RIO error. Signed-off-by: Scott Wood Signed-off-by: Kumar Gala commit f3fed682f78dfab384d3dc3f9ca7a7338a93c142 Author: Timur Tabi Date: Wed Jun 8 14:03:05 2011 -0500 powerpc/p1022ds: fix audio-related properties in the device tree On the Freescale P1022DS reference board, the SSI audio controller is connected in "asynchronous" mode to the codec's clocks, so the device tree needs an "fsl,ssi-asynchronous" property. Also remove the clock-frequency property from the wm8776 node, because the clock is enabled only if U-Boot enables it, and U-Boot will set the property if the clock is enabled. A future version of the P1022DS audio driver will configure the clock itself, but for now, the driver should not be told that the clock is running when it isn't. Also fix the FIFO depth to 15, instead of 16. Signed-off-by: Timur Tabi Signed-off-by: Kumar Gala commit c02a02ee4db5cd8b95ee3cc705b535f443612583 Author: Shaohui Xie Date: Mon Jun 13 10:23:12 2011 +0800 powerpc/85xx: fix NAND_CMD_READID read bytes number when nand_get_flash_type() is called, it will read 8 bytes of ID instead of 5, but the driver only read 5 bytes, so kernel will dump error messages like: fsl-lbc ffe124000.localbus: read_byte beyond end of buffer fsl-lbc ffe124000.localbus: read_byte beyond end of buffer fsl-lbc ffe124000.localbus: read_byte beyond end of buffer Signed-off-by: Shaohui Xie Acked-by: Scott Wood Signed-off-by: Kumar Gala commit 9cfaa8def1c795a512bc04f2aec333b03724ca2e Author: Xufeng Zhang Date: Tue Jun 21 10:43:40 2011 +0000 udp/recvmsg: Clear MSG_TRUNC flag when starting over for a new packet Consider this scenario: When the size of the first received udp packet is bigger than the receive buffer, MSG_TRUNC bit is set in msg->msg_flags. However, if checksum error happens and this is a blocking socket, it will goto try_again loop to receive the next packet. But if the size of the next udp packet is smaller than receive buffer, MSG_TRUNC flag should not be set, but because MSG_TRUNC bit is not cleared in msg->msg_flags before receive the next packet, MSG_TRUNC is still set, which is wrong. Fix this problem by clearing MSG_TRUNC flag when starting over for a new packet. Signed-off-by: Xufeng Zhang Signed-off-by: Paul Gortmaker Signed-off-by: David S. Miller commit 32c90254ed4a0c698caa0794ebb4de63fcc69631 Author: Xufeng Zhang Date: Tue Jun 21 10:43:39 2011 +0000 ipv6/udp: Use the correct variable to determine non-blocking condition udpv6_recvmsg() function is not using the correct variable to determine whether or not the socket is in non-blocking operation, this will lead to unexpected behavior when a UDP checksum error occurs. Consider a non-blocking udp receive scenario: when udpv6_recvmsg() is called by sock_common_recvmsg(), MSG_DONTWAIT bit of flags variable in udpv6_recvmsg() is cleared by "flags & ~MSG_DONTWAIT" in this call: err = sk->sk_prot->recvmsg(iocb, sk, msg, size, flags & MSG_DONTWAIT, flags & ~MSG_DONTWAIT, &addr_len); i.e. with udpv6_recvmsg() getting these values: int noblock = flags & MSG_DONTWAIT int flags = flags & ~MSG_DONTWAIT So, when udp checksum error occurs, the execution will go to csum_copy_err, and then the problem happens: csum_copy_err: ............... if (flags & MSG_DONTWAIT) return -EAGAIN; goto try_again; ............... But it will always go to try_again as MSG_DONTWAIT has been cleared from flags at call time -- only noblock contains the original value of MSG_DONTWAIT, so the test should be: if (noblock) return -EAGAIN; This is also consistent with what the ipv4/udp code does. Signed-off-by: Xufeng Zhang Signed-off-by: Paul Gortmaker Signed-off-by: David S. Miller commit 58fa45973117ab7a79d5b6818275a887867fc4d7 Author: Randy Dunlap Date: Tue Jun 21 08:01:20 2011 +0000 netconsole: fix build when CONFIG_NETCONSOLE_DYNAMIC is turned on When NETCONSOLE_DYNAMIC=y and CONFIGFS_FS=m, there are build errors in netconsole: drivers/built-in.o: In function `drop_netconsole_target': netconsole.c:(.text+0x1a100f): undefined reference to `config_item_put' drivers/built-in.o: In function `make_netconsole_target': netconsole.c:(.text+0x1a10b9): undefined reference to `config_item_init_type_name' drivers/built-in.o: In function `write_msg': netconsole.c:(.text+0x1a11a4): undefined reference to `config_item_get' netconsole.c:(.text+0x1a1211): undefined reference to `config_item_put' drivers/built-in.o: In function `netconsole_netdev_event': netconsole.c:(.text+0x1a12cc): undefined reference to `config_item_put' netconsole.c:(.text+0x1a12ec): undefined reference to `config_item_get' netconsole.c:(.text+0x1a1366): undefined reference to `config_item_put' drivers/built-in.o: In function `init_netconsole': netconsole.c:(.init.text+0x953a): undefined reference to `config_group_init' netconsole.c:(.init.text+0x9560): undefined reference to `configfs_register_subsystem' drivers/built-in.o: In function `dynamic_netconsole_exit': netconsole.c:(.exit.text+0x809): undefined reference to `configfs_unregister_subsystem' so fix the NETCONSOLE_DYNAMIC depends clause to prevent this. Based on email suggestion from Ben Hutchings. Thanks. Fixes https://bugzilla.kernel.org/show_bug.cgi?id=37992 Reported-by: David Hill Signed-off-by: Randy Dunlap Cc: Ben Hutchings Signed-off-by: David S. Miller commit 9e05cdde0c6bb8c3c3ee12e6d6123c6f9f85eea6 Author: Simon Horman Date: Mon Jun 20 23:00:11 2011 +0000 ARM: mach-shmobile: ag5evm: consistently name sdhi info structures Name the SDHI1 instance sh_sdhi1_info to be consistent with sh_sdhi0_info. Signed-off-by: Simon Horman Signed-off-by: Paul Mundt commit 5a5685525dbadbe31b8efb113c0d41be8cddda09 Author: Kuninori Morimoto Date: Fri Jun 17 04:33:13 2011 +0000 ARM: mach-shmobile: mackerel: change usbhs devices order USB1 can use IRQ interrupt and notify function for usbhs driver, but USB0 is using polling for it. The priority of usbhs devices order USB1 > USB0 is good idea Signed-off-by: Kuninori Morimoto Reviewed-by: Simon Horman Signed-off-by: Paul Mundt commit f2b9726105824fdeea32a339e5072a358f89a25b Author: Yoshihiro Shimoda Date: Tue Jun 21 08:28:27 2011 +0000 sh: add platform_device of EHCI/OHCI to setup-sh7757 Signed-off-by: Yoshihiro Shimoda Signed-off-by: Paul Mundt commit bf69d8484cbba2a59dd73cdd20b8d5e79cedce1f Author: Yoshihiro Shimoda Date: Tue Jun 21 08:03:25 2011 +0000 sh: fix compile error using sh7757lcr_defconfig Fix the complie error in ehci-hcd.c because it needs an additional configuration. CC drivers/usb/host/ehci-hcd.o drivers/usb/host/ehci-hcd.c:1288:2: error: #error "missing bus glue for ehci-hcd" make[3]: *** [drivers/usb/host/ehci-hcd.o] Error 1 make[2]: *** [drivers/usb/host] Error 2 make[1]: *** [drivers/usb] Error 2 make: *** [drivers] Error 2 Signed-off-by: Yoshihiro Shimoda Signed-off-by: Paul Mundt commit fa7ccfb17033bfb5bca86f6b909cab0b807efbc0 Author: Larry Finger Date: Sat Jun 18 22:49:53 2011 -0500 rtlwifi: rtl8192se: Handle duplicate PCI ID 0x10ec:0x8192 conflict with r8192e_pci There are two devices with PCI ID 0x10ec:0x8192, namely RTL8192E and RTL8192SE. The method of distinguishing them is by the revision ID at offset 0x8 of the PCI configuration space. If the value is 0x10, then the device uses rtl8192se for a driver. Signed-off-by: Larry Finger Signed-off-by: John W. Linville commit 40fad6bad416fe337a4be194f524dd941e423cb9 Merge: 3373b28 3306054 Author: John W. Linville Date: Mon Jun 20 14:54:20 2011 -0400 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/padovan/bluetooth-2.6 commit a9e758634f464ffb09344821a9f0b5a5c6df2b3e Author: Sarah Sharp Date: Thu Jun 16 13:06:04 2011 -0700 USB: Fix up URB error codes to reflect implementation. Documentation/usb/error-codes.txt mentions that urb->status can be set to -EXDEV, if the isochronous transfer was not fully completed. However, in practice, EHCI, UHCI, and OHCI all only set -EXDEV in the individual frame status, never in the URB status. Those host controller actually always pass in a zero status to usb_hcd_giveback_urb, and rely on the core to set the appropriate status value. The xHCI driver ran into issues with the uvcvideo driver when it tried to set -EXDEV in urb->status, because the driver refused to submit URBs, and the userspace camera application's video froze. Clean up the documentation to reflect the actual implementation. Signed-off-by: Sarah Sharp Acked-by: Alan Stern commit b3df3f9c7df9a8d85e03e158d35487618a160901 Author: Sarah Sharp Date: Wed Jun 15 19:57:46 2011 -0700 xhci: Always set urb->status to zero for isoc endpoints. When the xHCI driver encounters a Missed Service Interval event for an isochronous endpoint ring, it means the host controller skipped over one or more isochronous TDs. For TD that is skipped, skip_isoc_td() is called. This sets the frame descriptor status to -EXDEV, and also sets the value stored in the int pointed to by status to -EXDEV. If the isochronous TD happens to be the last TD in an URB, handle_tx_event() will use the status variable to give back the URB to the USB core. That means drivers will see urb->status as -EXDEV. It turns out that EHCI, UHCI, and OHCI always set urb->status to zero for an isochronous urb, regardless of what the frame status is. See itd_complete() in ehci-sched.c: } else { /* URB was too late */ desc->status = -EXDEV; } } /* handle completion now? */ if (likely ((urb_index + 1) != urb->number_of_packets)) goto done; /* ASSERT: it's really the last itd for this urb list_for_each_entry (itd, &stream->td_list, itd_list) BUG_ON (itd->urb == urb); */ /* give urb back to the driver; completion often (re)submits */ dev = urb->dev; ehci_urb_done(ehci, urb, 0); ehci_urb_done() completes the URB with the status of the third argument, which is always zero in this case. It turns out that many USB webcam drivers, such as uvcvideo, cannot handle urb->status set to a non-zero value. They will not resubmit their isochronous URBs in that case, and userspace will see a frozen video. Change the xHCI driver to be consistent with the EHCI and UHCI driver, and always set urb->status to 0 for isochronous URBs. This patch should be backported to kernels as old as 2.6.36 Signed-off-by: Sarah Sharp Cc: "Xu, Andiry" Cc: stable@kernel.org commit c877b3b2ad5cb9d4fe523c5496185cc328ff3ae9 Author: Maarten Lankhorst Date: Wed Jun 15 23:47:21 2011 +0200 xhci: Add reset on resume quirk for asrock p67 host The asrock p67 xhci controller completely dies on resume, add a quirk for this, to bring the host back online after a suspend. This should be backported to stable kernels as old as 2.6.37. Signed-off-by: Maarten Lankhorst Signed-off-by: Sarah Sharp Cc: stable@kernel.org commit f6ba6fe2d913da6707a71a413d6ec8ae98d6ce18 Author: Alex He Date: Wed Jun 8 18:34:06 2011 +0800 xHCI 1.0: Incompatible Device Error It is one new TRB Completion Code for the xHCI spec v1.0. Asserted if the xHC detects a problem with a device that does not allow it to be successfully accessed, e.g. due to a device compliance or compatibility problem. This error may be returned by any command or transfer, and is fatal as far as the Slot is concerned. Return -EPROTO by urb->status or frame->status of ISOC for transfer case. And return -ENODEV for configure endpoint command, evaluate context command and address device command if there is an incompatible Device Error. The error codes will be sent back to the USB core to decide how to do. It's unnecessary for other commands because after the three commands run successfully means that the device has been accepted. Signed-off-by: Alex He Signed-off-by: Sarah Sharp commit 3bc46b312b1486b1fe2db4246a34a30160d26d8d Author: Maxime Bizon Date: Fri Jun 10 23:17:58 2011 +0200 serial: bcm63xx_uart: fix irq storm after rx fifo overrun. RX fifo reset is required to clear irq. Signed-off-by: Maxime Bizon Signed-off-by: Greg Kroah-Hartman commit 1a7d4369b3fe1f8e5efe7f11a1c482055693852f Author: Shreshtha Kumar Sahu Date: Mon Jun 13 10:11:44 2011 +0200 amba pl011: platform data for reg lockup and glitch v2 This patch provides platform data for following - uart reset function to assist uart register lockup workaround - init/exit function to fix glitch in the tx pin in tty_open when tty port0 is opened a glitch is seen in the tx line of uart0. This happens in pl011_startup() when tx fifo interrupt is provoked into asserting. Now uart0 pins are enabled (alt function) only when init is complete and turned back to gpio when closed. Signed-off-by: Shreshtha Kumar Sahu Signed-off-by: Linus Walleij Signed-off-by: Greg Kroah-Hartman commit c16d51a32bbb61ac8fd96f78b5ce2fccfe0fb4c3 Author: Shreshtha Kumar Sahu Date: Mon Jun 13 10:11:33 2011 +0200 amba pl011: workaround for uart registers lockup This workaround aims to break the deadlock situation which raises during continuous transfer of data for long duration over uart with hardware flow control. It is observed that CTS interrupt cannot be cleared in uart interrupt register (ICR). Hence further transfer over uart gets blocked. It is seen that during such deadlock condition ICR don't get cleared even on multiple write. This leads pass_counter to decrease and finally reach zero. This can be taken as trigger point to run this UART_BT_WA. Workaround backups the register configuration, does soft reset of UART using BIT-0 of PRCC_K_SOFTRST_SET/CLEAR registers and restores the registers. This patch also provides support for uart init and exit function calls if present. Signed-off-by: Shreshtha Kumar Sahu Signed-off-by: Linus Walleij Signed-off-by: Greg Kroah-Hartman commit 57f2104f39995bac332ddc492fbf60aa28e0c35e Author: Russ Gorby Date: Tue Jun 14 13:23:29 2011 -0700 tty: n_gsm: improper skb_pull() use was leaking framed data gsm_dlci_data_output_framed() was doing: memcpy(dp, skb_pull(dlci->skb, len), len); The problem is skb_pull() returns the post-increment data ptr so the first chunk of dlci->skb->data is leaked. Signed-off-by: Russ Gorby Signed-off-by: Greg Kroah-Hartman commit 7263287af93db4d5cf324a30546f2143419b7900 Author: Russ Gorby Date: Tue Jun 14 13:23:28 2011 -0700 tty: n_gsm: Fixed logic to decode break signal from modem status The modem status can be one or 2 octets and contains the V.24 signals and in the 2 octet case also the break signal. We were improperly decoding the break signal from the modem in the 2 octet case. Signed-off-by: Russ Gorby Signed-off-by: Greg Kroah-Hartman commit 0af212ba8f123c2eba151af7726c34a50b127962 Author: Alan Stern Date: Wed Jun 15 16:27:43 2011 -0400 USB: don't let errors prevent system sleep This patch (as1464) implements the recommended policy that most errors during suspend or hibernation should not prevent the system from going to sleep. In particular, failure to suspend a USB driver or a USB device should not prevent the sleep from succeeding: Failure to suspend a device won't matter, because the device will automatically go into suspend mode when the USB bus stops carrying packets. (This might be less true for USB-3.0 devices, but let's not worry about them now.) Failure of a driver to suspend might lead to trouble later on when the system wakes up, but it isn't sufficient reason to prevent the system from going to sleep. Signed-off-by: Alan Stern CC: Signed-off-by: Greg Kroah-Hartman commit cbb330045e5df8f665ac60227ff898421fc8fb92 Author: Alan Stern Date: Wed Jun 15 16:29:16 2011 -0400 USB: don't let the hub driver prevent system sleep This patch (as1465) continues implementation of the policy that errors during suspend or hibernation should not prevent the system from going to sleep. In this case, failure to turn on the Suspend feature for a hub port shouldn't be reported as an error. There are situations where this does actually occur (such as when the device plugged into that port was disconnected in the recent past), and it turns out to be harmless. There's no reason for it to prevent a system sleep. Also, don't allow the hub driver to fail a system suspend if the downstream ports aren't all suspended. This is also harmless (and should never happen, given the change mentioned above); printing a warning message in the kernel log is all we really need to do. Signed-off-by: Alan Stern CC: Signed-off-by: Greg Kroah-Hartman commit 578333ab95f70db13951d30a9ad6b565b61639a9 Author: Alan Stern Date: Wed Jun 15 16:32:46 2011 -0400 USB: change maintainership of ohci-hcd and ehci-hcd Following the loss of David Brownell, I volunteer to maintain the ohci-hcd and ehci-hcd drivers. This patch (as1472) makes it official. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit e1cf486d881d853d710e2d86a7adfc5fd260990f Author: Alex He Date: Fri Jun 3 15:58:25 2011 +0800 xHCI 1.0: Force Stopped Event(FSE) FSE shall occur on the TD natural boundary. The software ep_ring dequeue pointer exceed the hardware ep_ring dequeue pointer in these cases of Table-3. As a result, the event_trb(pointed by hardware dequeue pointer) of the FSE can't be found in the current TD(pointed by software dequeue pointer). What should we do is to figured out the FSE case and skip over it. Signed-off-by: Alex He Signed-off-by: Sarah Sharp commit d23336329fa4c157ed6256d4279a73b87486a1b6 Author: Sarah Sharp Date: Mon Jun 6 00:53:47 2011 -0700 xhci: Don't warn about zeroed bMaxBurst descriptor field. The USB 3.0 specification says that the bMaxBurst field in the SuperSpeed Endpoint Companion descriptor is supposed to indicate how many packets a SS device can handle before it needs to wait for an explicit handshake from the host controller. A zero value means the device can only handle one packet before it needs a handshake. Remove a warning in the xHCI driver that implies this is an invalid value. Signed-off-by: Sarah Sharp commit fccf4e86200b8f5edd9a65da26f150e32ba79808 Author: Sarah Sharp Date: Sun Jun 5 23:22:22 2011 -0700 USB: Free bandwidth when usb_disable_device is called. Tanya ran into an issue when trying to switch a UAS device from the BOT configuration to the UAS configuration via the bConfigurationValue sysfs file. Before installing the UAS configuration, set_bConfigurationValue() calls usb_disable_device(). That function is supposed to remove all host controller resources associated with that device, but it leaves some state in the xHCI host controller. Commit 0791971ba8fbc44e4f476079f856335ed45e6324 usb: allow drivers to use allocated bandwidth until unbound added a call to usb_disable_device() in usb_set_configuration(), before the xHCI bandwidth functions were invoked. That commit fixed a bug, but also introduced a bug that is triggered when a configured device is switched to a new configuration. usb_disable_device() goes through all the motions of unbinding the drivers attached to active interfaces and removing the USB core structures associated with those interfaces, but it doesn't actually remove the endpoints from the internal xHCI host controller bandwidth structures. When usb_disable_device() calls usb_disable_endpoint() with reset_hardware set to true, the entries in udev->ep_out and udev->ep_in will be set to NULL. Usually, when the USB core installs a new configuration, usb_hcd_alloc_bandwidth() will drop all non-NULL endpoints in udev->ep_out and udev->ep_in before adding any new endpoints. However, when the new UAS configuration was added, all those entries were null, so none of the old endpoints in the BOT configuration were dropped. The xHCI driver blindly added the UAS configuration endpoints, and some of the endpoint addresses overlapped with the old BOT configuration endpoints. This caused the xHCI host to reject the Configure Endpoint command. Now that the xHCI driver code is cleaned up to reject a double-add of active endpoints, we need to fix the USB core to properly drop old endpoints in usb_disable_device(). If the host controller driver needs bandwidth checking support, make usb_disable_device() call usb_disable_endpoint() with reset_hardware set to false, drop the endpoints from the xHCI host controller, and then call usb_disable_endpoint() again with reset_hardware set to true. The first call to usb_disable_endpoint() will cancel any pending URBs and wait on them to be freed in usb_hcd_disable_endpoint(), but will keep the pointers in udev->ep_out and udev->ep in intact. Then usb_hcd_alloc_bandwidth() will use those pointers to know which endpoints to drop. The final call to usb_disable_endpoint() will do two things: 1. It will call usb_hcd_disable_endpoint() again, which should be harmless since the ep->urb_list should be empty after the first call to usb_disable_endpoint() returns. 2. It will set the entries in udev->ep_out and udev->ep in to NULL, and call usb_hcd_disable_endpoint(). That call will have no effect, since the xHCI driver doesn't set the endpoint_disable function pointer. Note that usb_disable_device() will now need to be called with hcd->bandwidth_mutex held. This should be backported to kernels as old as 2.6.32. Signed-off-by: Sarah Sharp Reported-by: Tanya Brokhman Cc: ablay@codeaurora.org Cc: Alan Stern Cc: stable@kernel.org commit fa75ac379e63c2864e9049b5e8615e40f65c1e70 Author: Sarah Sharp Date: Sun Jun 5 23:10:04 2011 -0700 xhci: Reject double add of active endpoints. While trying to switch a UAS device from the BOT configuration to the UAS configuration via the bConfigurationValue file, Tanya ran into an issue in the USB core. usb_disable_device() sets entries in udev->ep_out and udev->ep_out to NULL, but doesn't call into the xHCI bandwidth management functions to remove the BOT configuration endpoints from the xHCI host's internal structures. The USB core would then attempt to add endpoints for the UAS configuration, and some of the endpoints had the same address as endpoints in the BOT configuration. The xHCI driver blindly added the endpoints again, but the xHCI host controller rejected the Configure Endpoint command because active endpoints were added without being dropped. Make the xHCI driver reject calls to xhci_add_endpoint() that attempt to add active endpoints without first calling xhci_drop_endpoint(). This should be backported to kernels as old as 2.6.31. Signed-off-by: Sarah Sharp Reported-by: Tanya Brokhman Cc: stable@kernel.org commit 330605423ca6eafafb8dcc27502bce1c585d1b06 Author: Ilia Kolomisnky Date: Wed Jun 15 06:52:26 2011 +0300 Bluetooth: Fix L2CAP connection establishment In hci_conn_security ( which is used during L2CAP connection establishment ) test for HCI_CONN_ENCRYPT_PEND state also sets this state, which is bogus and leads to connection time-out on L2CAP sockets in certain situations (especially when using non-ssp devices ) Signed-off-by: Ilia Kolomisnky Signed-off-by: Gustavo F. Padovan commit 357f45db920393aac983a137bd74095f612d5a01 Author: Jesper Juhl Date: Mon Jun 13 22:50:41 2011 +0200 USB: TI 3410/5052 USB Serial Driver: Fix mem leak when firmware is too big. If the size of the firmware exceeds TI_FIRMWARE_BUF_SIZE we'll leak 'fw_p' by failing to call release_firmware(). This patch fixes the leak. Signed-off-by: Jesper Juhl Signed-off-by: Greg Kroah-Hartman commit 869e9e567fe6bba859e1d761250d160a9216498a Merge: 2c53b43 4858f06 Author: Greg Kroah-Hartman Date: Tue Jun 14 14:17:59 2011 -0700 Merge branch 'for-greg' of master.kernel.org:/pub/scm/linux/kernel/git/balbi/usb into usb-linus * 'for-greg' of master.kernel.org:/pub/scm/linux/kernel/git/balbi/usb: usb: musb: gadget: clear TXPKTRDY flag when set FLUSHFIFO usb: musb: host: compare status for negative error values commit df3c3931ec58cca3409c71b18ad6da0cd71fe163 Author: Johan Hedberg Date: Tue Jun 14 12:48:19 2011 +0300 Bluetooth: Fix accepting connect requests for defer_setup When authentication completes we shouldn't blindly accept any pending L2CAP connect requests. If the socket has the defer_setup feature enabled it should still wait for user space acceptance of the connect request. The issue only happens for non-SSP connections since with SSP the L2CAP Connect request may not be sent for non-SDP PSMs before authentication has completed successfully. Signed-off-by: Johan Hedberg Signed-off-by: Gustavo F. Padovan commit 6fdf658c9a0e51e6663f2769f6d310c2843a862b Author: Luiz Augusto von Dentz Date: Mon Jun 13 15:37:35 2011 +0300 Bluetooth: Fix L2CAP security check With older userspace versions (using hciops) it might not have the key type to check if the key has sufficient security for any security level so it is necessary to check the return of hci_conn_auth to make sure the connection is authenticated Signed-off-by: Luiz Augusto von Dentz Acked-by: Johan Hedberg Signed-off-by: Gustavo F. Padovan commit 4858f06e7d92ed2ebdb29ccbc079c127e675a89c Author: Yauheni Kaliuta Date: Wed Jun 8 17:12:02 2011 +0300 usb: musb: gadget: clear TXPKTRDY flag when set FLUSHFIFO Fixes mis-use of MUSB's hardware feature where it won't flush FIFOs when TXPKTRDY flag was set before and we are flushing setting both FLUSHFIFO and TXPKTRDY. In other words, we need to ensure that when we try to flush FIFOs, we don't accidentaly set TXPKTRDY bit too due to a read-back of the register. The MUSB Programming Guide says "May be set simultaneously with TxPktRdy to abort the packet that is currently being loaded into the FIFO". This is a situation where TXPKTRDY hasn't been set yet, but some data already loaded into the fifo. It looks, that if TXPKTRDY has been set before, and there is no loading in progress, but we set FLUSHFIFO with the TXPKTRDY, controller tries to use the same logic to abort loading and as the result just does nothing (because there is no packet been loaded currently) Signed-off-by: Yauheni Kaliuta [ balbi@ti.com : fixed one whitespace git complained about improved the commit log slightly ] Signed-off-by: Felipe Balbi commit 72887c8644384c0cc43b9298ae0659de383f2e9c Author: Márton Németh Date: Mon May 30 20:45:42 2011 +0200 usb: musb: host: compare status for negative error values Variable d is a struct usb_iso_packet_descriptor. The status filed is usually negative when an error happens. Signed-off-by: Márton Németh Signed-off-by: Felipe Balbi commit 663dd6dcaf7e95526e469e91f41972a9c0cca30c Author: K. Y. Srinivasan Date: Tue May 17 15:25:38 2011 -0700 Connector: Correctly set the error code in case of success when dispatching receive callbacks The recent changes to the connector code introduced this bug where even when a callback was invoked, we would return an error resulting in double freeing of the skb. This patch fixes this bug. Signed-off-by: K. Y. Srinivasan Acked-by: Evgeniy Polyakov Cc: stable [.39] Signed-off-by: Greg Kroah-Hartman commit ea2c00095c022846dd8dfd211de05154d3e4e1b8 Author: K. Y. Srinivasan Date: Tue May 17 15:25:37 2011 -0700 Connector: Set the CN_NETLINK_USERS correctly The CN_NETLINK_USERS must be set to the highest valid index +1. Thanks to Evgeniy for pointing this out. Signed-off-by: K. Y. Srinivasan Acked-by: Evgeniy Polyakov Cc: stable [.39] Signed-off-by: Greg Kroah-Hartman commit 2872628680bad71a6734e7d379168f990a91cc09 Author: Jiri Slaby Date: Sun Jun 5 14:16:17 2011 +0200 TTY: ntty, add one more sanity check With the previous patch, we fixed another bug where read_buf was freed while we still was in n_tty_read. We currently check whether read_buf is NULL at the start of the function. Add one more check after we wake up from waiting for input. Signed-off-by: Jiri Slaby Cc: Alan Cox Signed-off-by: Greg Kroah-Hartman commit 92f6fa09bd453ffe3351fa1f1377a1b7cfa911e6 Author: Jiri Slaby Date: Sun Jun 5 14:16:16 2011 +0200 TTY: ldisc, do not close until there are readers We restored tty_ldisc_wait_idle in 100eeae2c5c (TTY: restore tty_ldisc_wait_idle). We used it in the ldisc changing path to fix the case where there are tasks in n_tty_read waiting for data and somebody tries to change ldisc. Similar to the case above, there may be also tasks waiting in n_tty_read while hangup is performed. As 65b770468e98 (tty-ldisc: turn ldisc user count into a proper refcount) removed the wait-until-idle from all paths, hangup path won't wait for them to disappear either now. So add it back even to the hangup path. There is a difference, we need uninterruptible sleep as there is obviously HUP signal pending. So tty_ldisc_wait_idle now sleeps without possibility to be interrupted. This is what original tty_ldisc_wait_idle did. After the wait idle reintroduction (100eeae2c5c), we have had interruptible sleeps for the ldisc changing path. But as there is a 5s timeout anyway, we don't allow it to be interrupted from now on. It's not worth the added complexity of deciding what kind of sleep we want. Before 65b770468e98 tty_ldisc_release was called also from tty_ldisc_release. It is called from tty_release, so I don't think we need to restore that one. This is nicely reproducible after constifying the timing when drivers/tty/n_tty.c is patched as follows ("TTY: ntty, add one more sanity check" patch is needed to actually see it explode): %% -1548,6 +1549,7 @@ static int n_tty_open(struct tty_struct *tty) /* These are ugly. Currently a malloc failure here can panic */ if (!tty->read_buf) { + msleep(100); tty->read_buf = kzalloc(N_TTY_BUF_SIZE, GFP_KERNEL); if (!tty->read_buf) return -ENOMEM; %% -1785,6 +1788,7 @@ do_it_again: break; } timeout = schedule_timeout(timeout); + msleep(20); continue; } __set_current_state(TASK_RUNNING); ===== With a process: ===== while (1) { int fd = open(argv[1], O_RDWR); read(fd, buf, sizeof(buf)); close(fd); } ===== and its child: ===== setsid(); while (1) { int fd = open(tty, O_RDWR|O_NOCTTY); ioctl(fd, TIOCSCTTY, 1); vhangup(); close(fd); usleep(100 * (10 + random() % 1000)); } ===== EOF ===== References: https://bugzilla.novell.com/show_bug.cgi?id=693374 References: https://bugzilla.novell.com/show_bug.cgi?id=694509 Signed-off-by: Jiri Slaby Cc: Alan Cox Cc: Linus Torvalds Cc: stable [32, 33, 34, 39] Signed-off-by: Greg Kroah-Hartman commit 1312ba40c0d00f0a5cfcfe3afc222fcef2a90b56 Author: J Freyensee Date: Wed May 25 14:56:43 2011 -0700 pti: PTI semantics fix in pti_tty_cleanup. This patch fixes a semantics issue in the pti_tty_cleanup() routine. Signed-off-by: J Freyensee Signed-off-by: Greg Kroah-Hartman commit 1dae42bff57f7a61577ee881265985a660d35c07 Author: J Freyensee Date: Wed May 25 14:45:40 2011 -0700 pti: ENXIO error case memory leak PTI fix. This patch fixes a memory leak that can occur in the error case ENXIO is returned in the pti_tty_install() routine. Signed-off-by: J Freyensee Signed-off-by: Greg Kroah-Hartman commit 29021bccea0dc42d7d101004058438a9a4e693b1 Author: J Freyensee Date: Wed May 25 14:38:18 2011 -0700 pti: double-free security PTI fix This patch fixes a double-free error that will not always be seen unless /dev/pti char interface is stressed. Signed-off-by: J Freyensee Signed-off-by: Greg Kroah-Hartman commit 9d031d94da453077bbc6108b7822fc751ac85299 Author: Shahar Lev Date: Mon May 23 11:36:11 2011 +0300 drivers:misc: ti-st: fix skipping of change remote baud Before the incrementing of ptr in skip_change_remote_baud, it points to cur_action, but the increment is done by the size of nxt_action instead. This could cause ptr to not point to a bts_action structure, which is harmful for the increment of ptr done in download_firmware. Therefore, the skipping is first done for cur_action. Signed-off-by: Shahar Lev Signed-off-by: Greg Kroah-Hartman commit bb2b43fefab723f4a0760146e7bed59d41a50e53 Author: Andrew Morton Date: Mon May 23 14:44:19 2011 -0700 drivers/base/platform.c: don't mark platform_device_register_resndata() as __init_or_module This reverts 737a3bb9416ce2a7c7a4 ("Driver core: move platform device creation helpers to .init.text (if MODULE=n)"). That patch assumed that platform_device_register_resndata() is only ever called from __init code but that isn't true in the case ioctl->drm_ioctl->radeon_cp_init(). Addresses https://bugzilla.kernel.org/show_bug.cgi?id=35192 Cc: Uwe Kleine-König Reported-by: Anthony Basile Cc: Greg KH Cc: David Airlie Cc: Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit 7316a9f2a94c14e66e9421a777dffc509a2fe0e3 Author: Steven Rostedt Date: Mon May 23 16:45:32 2011 -0400 st_kim: Handle case of no device found for ID 0 Running ktest.pl, I hit this bug: [ 19.780654] BUG: unable to handle kernel NULL pointer dereference at 0000000c [ 19.780660] IP: [] dev_get_drvdata+0xc/0x46 [ 19.780669] *pdpt = 0000000031daf001 *pde = 0000000000000000 [ 19.780673] Oops: 0000 [#1] SMP [ 19.780680] Dumping ftrace buffer:^M [ 19.780685] (ftrace buffer empty) [ 19.780687] Modules linked in: ide_pci_generic firewire_ohci firewire_core evbug crc_itu_t e1000 ide_core i2c_i801 iTCO_wdt [ 19.780697] [ 19.780700] Pid: 346, comm: v4l_id Not tainted 2.6.39-test-02740-gcaebc16-dirty #4 /DG965MQ [ 19.780706] EIP: 0060:[] EFLAGS: 00010202 CPU: 0 [ 19.780709] EIP is at dev_get_drvdata+0xc/0x46 [ 19.780712] EAX: 00000008 EBX: f1e37da4 ECX: 00000000 EDX: 00000000 [ 19.780715] ESI: f1c3f200 EDI: c33ec95c EBP: f1e37d80 ESP: f1e37d80 [ 19.780718] DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 [ 19.780721] Process v4l_id (pid: 346, ti=f1e36000 task=f2bc2a60 task.ti=f1e36000) [ 19.780723] Stack: [ 19.780725] f1e37d8c c117d395 c33ec93c f1e37db4 c117a0f9 00000002 00000000 c1725e54 [ 19.780732] 00000001 00000007 f2918c90 f1c3f200 c33ec95c f1e37dd4 c1789d3d 22222222 [ 19.780740] 22222222 22222222 f2918c90 f1c3f200 f29194f4 f1e37de8 c178d5c4 c1725e54 [ 19.780747] Call Trace: [ 19.780752] [] st_kim_ref+0x28/0x41 [ 19.780756] [] st_register+0x29/0x562 [ 19.780761] [] ? v4l2_open+0x111/0x1e3 [ 19.780766] [] fmc_prepare+0x97/0x424 [ 19.780770] [] fm_v4l2_fops_open+0x70/0x106 [ 19.780773] [] ? v4l2_open+0x111/0x1e3 [ 19.780777] [] v4l2_open+0x158/0x1e3 [ 19.780782] [] chrdev_open+0x22c/0x276 [ 19.780787] [] __dentry_open+0x35c/0x581 [ 19.780792] [] nameidata_to_filp+0x7c/0x96 [ 19.780795] [] ? cdev_put+0x57/0x57 [ 19.780800] [] do_last+0x743/0x9d4 [ 19.780804] [] ? path_init+0x1ee/0x596 [ 19.780808] [] path_openat+0x10c/0x597 [ 19.780813] [] ? trace_hardirqs_off+0x27/0x37 [ 19.780817] [] ? local_clock+0x78/0xc7 [ 19.780821] [] do_filp_open+0x39/0xc2 [ 19.780827] [] ? _raw_spin_unlock+0x4c/0x5d^M [ 19.780831] [] ? alloc_fd+0x19e/0x1b7 [ 19.780836] [] do_sys_open+0xb7/0x1bd [ 19.780840] [] ? sys_munmap+0x78/0x8d [ 19.780844] [] sys_open+0x36/0x58 [ 19.780849] [] sysenter_do_call+0x12/0x38 [ 19.780852] Code: d8 2f 20 c3 01 83 15 dc 2f 20 c3 00 f0 ff 00 83 05 e0 2f 20 c3 01 83 15 e4 2f 20 c3 00 5d c3 55 89 e5 3e 8d 74 26 00 85 c0 74 28 <8b> 40 04 83 05 e8 2f 20 c3 01 83 15 ec 2f 20 c3 00 85 c0 74 13 ^M [ 19.780889] EIP: [] dev_get_drvdata+0xc/0x46 SS:ESP 0068:f1e37d80 [ 19.780894] CR2: 000000000000000c [ 19.780898] ---[ end trace e7d1d0f6a2d1d390 ]--- The id of 0 passed to st_kim_ref() found no device, keeping pdev null, and causing pdev->dev cause a NULL pointer dereference. After having st_kim_ref() check for NULL, the st_unregister() function needed to be updated to handle the case that st_gdata was not set by the st_kim_ref(). Signed-off-by: Steven Rostedt Signed-off-by: Greg Kroah-Hartman commit 5daf538a0313509ecdeb5b7a61257f39881f9361 Author: Randy Dunlap Date: Sun May 22 17:38:02 2011 -0700 firmware: fix GOOGLE_SMI kconfig dependency warning Is it meaningful/useful to enable EFI_VARS but not EFI? That's what GOOGLE_SMI does. Make it enable EFI also. Fixes this kconfig dependency warning: warning: (GOOGLE_SMI) selects EFI_VARS which has unmet direct dependencies (EFI) Signed-off-by: Randy Dunlap Acked-by: Mike Waychison Signed-off-by: Greg Kroah-Hartman commit cb01ece3ea5dec16ac7bab30069c7736b59f7dea Author: leitao@linux.vnet.ibm.com Date: Thu May 26 11:18:39 2011 -0300 8250: Fix capabilities when changing the port type When changing the port type, the capabilities flags should be changed also, otherwise the capabilities will not correspond to the port type, which make set_sleep() crash on rmmod. This patch just assign the correct capabilites when the port changes. Signed-off-by: Breno Leitao CC: Michael Reed Signed-off-by: Greg Kroah-Hartman commit 1798ca13bfae8cc7c0ef82c034c3c4951ecaeb88 Author: Alan Cox Date: Tue May 24 12:35:48 2011 +0100 8250_pci: Fix missing const from merges Signed-off-by: Alan Cox Signed-off-by: Antony Pavlov Signed-off-by: Borislav Petkov Signed-off-by: Vasily Averin Signed-off-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman commit 470f22975448a65a1084a6f0721fa5df15323f02 Author: Boojin Kim Date: Fri May 27 19:04:03 2011 -0700 ARM: SAMSUNG: serial: Fix on handling of one clock source for UART This patch fixes the way of comparison for handling of two or more clock sources for UART. For example, if just only one clock source is defined even though there are two clock sources for UART, the serial driver does not set proper clock up. Of course, it is problem. So this patch changes the condition of comparison to avoid useless setup clock and adds a flag 'NO_NEED_CHECK_CLKSRC' which means selection of source clock is not required. In addition, since the Exynos4210 has only one clock source for UART this patch adds the flag into its common_init_uarts(). Signed-off-by: Boojin Kim Signed-off-by: Kukjin Kim Cc: stable Signed-off-by: Greg Kroah-Hartman commit af99d6f0037d970084b03d9690f50e34d6f70dae Author: Lennart Sorensen Date: Wed Jun 1 14:38:41 2011 -0400 serial: ioremap warning fix for jsm driver. I saw a warning about ioremap from the jsm driver on a system which looked like this: resource map sanity check conflict: 0xe0200800 0xe02017ff 0xe0200800 0xe0200fff 0000:01:08.0 Turns out the warning is valid. The jsm driver has been asking to ioremap 0x1000 forever, but in fact only 8 port chips have 0x1000 bytes of memory. 4 port chips have 0x800 and 2 port chips have 0x400 according to the data sheet. It makes more sense to map the size of the region rather than a hard coded value. If you happen to have the region legitimately mapped to a base address that is not 4K aligned, ioremap complains otherwise. Signed-off-by: Len Sorensen Acked-by: Alan Cox Signed-off-by: Greg Kroah-Hartman commit 163baa33552bb1c08b6bf109319505570658a8f3 Merge: eb7073d 59c5f46 Author: Greg Kroah-Hartman Date: Mon Jun 6 08:08:28 2011 -0700 Merge 3.0-rc2 into tty-linus This is needed to catch the tty patch revert in the 3.0-rc2 tree. Signed-off-by: Greg Kroah-Hartman commit eb7073db1076777496495483854993165e14790f Author: Tomoya MORINAGA Date: Thu Jun 2 11:31:29 2011 +0900 8250_pci: add -ENODEV code for Intel EG20T PCH Intel EG20T PCH has UART device which is compatible with 8250. Currently, with general configuration, the PCH UART driver is not loaded but 8250 standard driver is loaded. Therefore, in case of using PCH UART driver, need to disable 8250 pci function. However, this procedure is not best solution. This patch, in 8250_pci, if the device is the PCH or the family IOH, '-ENODEV' is returned. As a result, disabling 8250-pci processing becomes unnecessary. Signed-off-by: Tomoya MORINAGA Signed-off-by: Greg Kroah-Hartman