summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci/host.c
Commit message (Collapse)AuthorAgeFilesLines
* isci: exposing user parameters via module paramsDave Jiang2011-07-031-1/+27
| | | | | | | | | 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 <dave.jiang@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* isci: fix oem parameter initialization and mode detectionDan Williams2011-07-031-18/+12
| | | | | | | | | | | | | | | | | | | | | 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 <dave.jiang@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* isci: Add support for probing OROM for OEM paramsDan Williams2011-07-031-27/+20
| | | | | | | | | | | | 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 <dave.jiang@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* isci: Any reset indicated on an I/O completion escalates it to the error path.Jeff Skirvin2011-07-031-11/+0
| | | | | | | | | | 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 <jeffrey.d.skirvin@intel.com> Signed-off-by: Jacek Danecki <Jacek.Danecki@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* isci: Changes in isci_host_completion_routineJeff Skirvin2011-07-031-14/+61
| | | | | | | | | | 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 <jeffrey.d.skirvin@intel.com> Signed-off-by: Jacek Danecki <Jacek.Danecki@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* isci: preallocate remote devicesDan Williams2011-07-031-8/+13
| | | | | | | | | | | | | 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 <dan.j.williams@intel.com>
* isci: replace isci_remote_device completion with event queueDan Williams2011-07-031-1/+1
| | | | | | | | | | | | | | | | 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 <dan.j.williams@intel.com>
* isci: kill isci_host list in favor of an arrayDan Williams2011-07-031-1/+2
| | | | | | | | isci_host_by_id() should have been a clue that an array would have been a simpler approach. Reported-by: James Bottomley <James.Bottomley@suse.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* isci: workaround port task scheduler starvation issueTomasz Chudy2011-07-031-7/+0
| | | | | | | | | | | | 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 <tomasz.chudy@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* isci: rework timer apiDan Williams2011-07-031-16/+16
| | | | | | | | | | | | | | | | 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 <dan.j.williams@intel.com>
* isci: fix sas address reportingDan Williams2011-07-031-5/+0
| | | | | | | Undo the open coded and incorrect translation of the oem parameter sas address to its libsas expected format. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* isci: Move firmware loading to per PCI deviceDave Jiang2011-07-031-159/+42
| | | | | | | | | | 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 <dave.jiang@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* isci: implement error isrDan Williams2011-07-031-0/+16
| | | | | | Add basic support for handling/reporting error interrupts. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* isci: enable interrupts during controller start, and flush discoveryEdmund Nadolski2011-07-031-20/+9
| | | | | | | | | Polling the event queue during scan is an unneeded holdover from the original driver. Signed-off-by: Edmund Nadolski <edmund.nadolski@intel.com> [djbw: ensure we flush all port events and domain discovery] Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* isci: cleanup "starting" state handlingDan Williams2011-07-031-96/+49
| | | | | | | | | | | | | | | | | | | | | | 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 <hch@infradead.org> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Edmund Nadolski <edmund.nadolski@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* isci: bypass scic_controller_get_handler_methods()Dan Williams2011-07-031-124/+34
| | | | | | | | | | | | | | 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 <jeff@garzik.org> Cc: Christoph Hellwig <hch@infradead.org> Signed-off-by: Edmund Nadolski <edmund.nadolski@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* isci: Intel(R) C600 Series Chipset Storage Control Unit DriverDan Williams2011-07-021-0/+781
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 <maciej.trela@intel.com> Signed-off-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Edmund Nadolski <edmund.nadolski@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
OpenPOWER on IntegriCloud