aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
* ARM: pxa: enable MULTI_IRQ_HANDLER for all boardsEric Miao2011-07-12
| | | | Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
* ARM: pxa: move declarations from generic.h to <soc>.hEric Miao2011-07-12
| | | | Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
* ARM: pxa: introduce {icip,ichp}_handle_irq() to prepare MULTI_IRQ_HANDLEREric Miao2011-07-12
| | | | | | | Thanks Dmitry for providing a fix to the original code. Signed-off-by: Eric Miao <eric.y.miao@gmail.com> Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
* ARM: pxa: avoid accessing interrupt registers directlyEric Miao2011-07-12
| | | | Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
* ARM: pxa: add common header file for pxa3xxEric Miao2011-07-12
| | | | Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
* ARM: pxa: add clk_set_rate()Haojian Zhuang2011-07-12
| | | | | | | | Since there're mulitple clock rates in some device controllers, enable clk_set_rate() for this usage. Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
* ARM: pxa: enable AUTO_ZRELADDREric Miao2011-07-12
| | | | Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
* ARM: introduce handle_IRQ() not to dump exception stackRussell King - ARM Linux2011-07-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Mon, Jul 11, 2011 at 3:52 PM, Russell King - ARM Linux <linux@arm.linux.org.uk> wrote: ... > The __exception annotation on a function causes this to happen: > > [<c002406c>] (asm_do_IRQ+0x6c/0x8c) from [<c0024b84>] > (__irq_svc+0x44/0xcc) > Exception stack(0xc3897c78 to 0xc3897cc0) > 7c60: 4022d320 4022e000 > 7c80: 08000075 00001000 c32273c0 c03ce1c0 c2b49b78 4022d000 c2b420b4 00000001 > 7ca0: 00000000 c3897cfc 00000000 c3897cc0 c00afc54 c002edd8 00000013 ffffffff > > Where that stack dump represents the pt_regs for the exception which > happened. Any function found in while unwinding will cause this to > be printed. > > If you insert a C function between the IRQ assembly and asm_do_IRQ, > the > dump you get from asm_do_IRQ will be the stack for your function, > not > the pt_regs. That makes the feature useless. > When __irq_svc - or any of the other exception handling assembly code - calls the C code, the stack pointer will be pointing at the pt_regs structure. All the entry points into C code from the exception handling code are marked with __exception or __exception_irq_enter to indicate that they are one of the functions which has pt_regs above them. Normally, when you've entered asm_do_IRQ() you will have this stack layout (higher address towards top): pt_regs asm_do_IRQ frame If you insert a C function between the exception assembly code and asm_do_IRQ, you end up with this stack layout instead: pt_regs your function frame asm_do_IRQ frame This means when we unwind, we'll get to asm_do_IRQ, and rather than dumping out the pt_regs, we'll dump out your functions stack frame instead, because that's what is above the asm_do_IRQ stack frame rather than the expected pt_regs structure. The fix is to introduce handle_IRQ() for no exception stack dump, so it can be called with MULTI_IRQ_HANDLER is selected and a C function is between the assembly code and the actual IRQ handling code. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
* Linux 3.0-rc6Linus Torvalds2011-07-04
|
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6Linus Torvalds2011-07-04
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 ...
| * [SCSI] isci: fix checkpatch errorsJames Bottomley2011-07-03
| | | | | | | | Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| * Merge git://git.kernel.org/pub/scm/linux/kernel/git/djbw/isciJames Bottomley2011-07-03
| |\
| | * isci: Device reset should request sas_phy_reset(phy, true)Jeff Skirvin2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <jeffrey.d.skirvin@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: pare back error messsagesDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | 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 <dan.j.williams@intel.com>
| | * isci: cleanup silicon revision detectionDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: merge scu_unsolicited_frame.h into unsolicited_frame_control.hDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | Does not need its own file. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: merge sata.[ch] into request.cDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | Undo some needless separation. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: kill 'get/set' macrosDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: retire scic_sds_ and scic_ prefixesDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: unify isci_host and scic_sds_controllerDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: unify isci_remote_device and scic_sds_remote_deviceDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | Remove the distinction between these two implementations and unify on isci_remote_device (local instances named idev). Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: unify isci_port and scic_sds_portDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: fix scic_sds_remote_device_terminate_requestsDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <jeffrey.d.skirvin@intel.com> Acked-by: Jeff Skirvin <jeffrey.d.skirvin@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: unify isci_phy and scic_sds_phyDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: unify isci_request and scic_sds_requestDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: rename / clean up scic_sds_stp_requestDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | * Rename scic_sds_stp_request to isci_stp_request * Remove the unused fields and union indirection Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: preallocate requestsDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <dan.j.williams@intel.com>
| | * isci: combine request flagsDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | 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 <dan.j.williams@intel.com>
| | * isci: unify can_queue tracking on the tci_pool, uplevel tag assignmentDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <dan.j.williams@intel.com>
| | * isci: Terminate dev requests on FIS err bit rx in NCQJeff Skirvin2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <jeffrey.d.skirvin@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: fix frame received lockingDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | Updates to the frame_rcvd before need to be atomic with respect to when they are evaluated by libsas. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: possible buffer overflow in isci_parse_oem_parameters fixedMaciej Patelczyk2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <maciej.patelczyk@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: fix isci_task_execute_tmf completionDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <dan.j.williams@intel.com>
| | * isci: fix support for arbitrarily large smp requestsDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | 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 <dan.j.williams@intel.com>
| | * isci: fix dma_unmap_sg usageDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <dan.j.williams@intel.com>
| | * isci: fix smp response frame overrunDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | 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 <dan.j.williams@intel.com>
| | * isci: kill device_sequenceDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | 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 <dan.j.williams@intel.com>
| | * isci: kill isci_remote_device_change_state()Dan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <dan.j.williams@intel.com>
| | * isci: atomic device lookup and reference countingDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <dan.j.williams@intel.com>
| | * isci: fix ssp response iu buffer size in isci_tmfDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <adam.gruchala@intel.com> Tested-by: Edmund Nadolski <edmund.nadolski@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: cleanup request allocationDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | 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 <dan.j.williams@intel.com>
| | * isci: cleanup/optimize queue increment macrosDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <dan.j.williams@intel.com>
| | * isci: cleanup tag macrosDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <dan.j.williams@intel.com>
| | * isci: cleanup/optimize pool implementationDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <dan.j.williams@intel.com>
| | * isci: Disable link layer hang detectionJeff Skirvin2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | Some targets exceed the hang detect timer. Use the OS timeout to catch hung tasks. Signed-off-by: Jeff Skirvin <jeffrey.d.skirvin@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: Hard reset failure will link reset all phys in the portJeff Skirvin2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | 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 <jeffrey.d.skirvin@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: Explicitly decode remote node ready and suspended statesJeff Skirvin2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | The remote node context should only signal a device reset condition in a suspended state. Signed-off-by: Jeff Skirvin <jeffrey.d.skirvin@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: fix isci_terminate_pending() list managementDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <dan.j.williams@intel.com>
| | * isci: Handle timed-out request terminations correctlyJeff Skirvin2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <jeffrey.d.skirvin@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: Requests that do not start must be set to "complete"Jeff Skirvin2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | 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 <jeffrey.d.skirvin@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>