linux/drivers/scsi/isci
Dan Williams b1124cd3ec [SCSI] libsas: introduce sas_drain_work()
When an lldd invokes ->notify_port_event() it can trigger a chain of libsas
events to:

  1/ form the port and find the direct attached device

  2/ if the attached device is an expander perform domain discovery

A call to flush_workqueue() will only flush the initial port formation work.
Currently libsas users need to call scsi_flush_work() up to the max depth of
chain (which will grow from 2 to 3 when ata discovery is moved to its own
discovery event).  Instead of open coding multiple calls switch to use
drain_workqueue() to flush sas work.

drain_workqueue() does not handle new work submitted during the drain so
libsas needs a bit of infrastructure to hold off unchained work submissions
while a drain is in flight.  A lldd ->notify() event is considered 'unchained'
while a sas_discover_event() is 'chained'.  As Tejun notes:

  "For now, I think it would be best to add private wrapper in libsas to
   support deferring unchained work items while draining."

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-19 13:48:51 -06:00
..
host.c [SCSI] libsas: introduce sas_drain_work() 2012-02-19 13:48:51 -06:00
host.h [SCSI] isci: oem parameter format v1.3 (cable select) 2012-01-16 11:43:04 +04:00
init.c [SCSI] libsas: kill sas_slave_destroy 2012-02-19 13:36:36 -06:00
isci.h [SCSI] isci: oem parameter format v1.3 (cable select) 2012-01-16 11:43:04 +04:00
Makefile isci: merge sata.[ch] into request.c 2011-07-03 04:04:52 -07:00
phy.c [SCSI] isci: fix start OOB 2012-01-16 11:47:27 +04:00
phy.h isci: kill 'get/set' macros 2011-07-03 04:04:52 -07:00
port.c [SCSI] isci: fix, prevent port from getting stuck in the 'configuring' state 2012-01-16 11:48:02 +04:00
port.h [SCSI] isci: fix, prevent port from getting stuck in the 'configuring' state 2012-01-16 11:48:02 +04:00
port_config.c [SCSI] isci: fix io failures while wide port links are coming up 2012-01-16 11:46:59 +04:00
probe_roms.c [SCSI] isci: update afe (analog-front-end) recipe for C1 2012-01-16 11:40:29 +04:00
probe_roms.h [SCSI] isci: oem parameter format v1.3 (cable select) 2012-01-16 11:43:04 +04:00
registers.h [SCSI] isci: enable clock gating 2012-02-19 08:09:00 -06:00
remote_device.c [SCSI] isci: enable wide port targets 2012-01-16 11:45:43 +04:00
remote_device.h [SCSI] isci: No need to manage the pending reset bit on pending requests. 2011-10-31 13:20:28 +04:00
remote_node_context.c isci: kill 'get/set' macros 2011-07-03 04:04:52 -07:00
remote_node_context.h isci: kill 'get/set' macros 2011-07-03 04:04:52 -07:00
remote_node_table.c isci: retire scic_sds_ and scic_ prefixes 2011-07-03 04:04:52 -07:00
remote_node_table.h isci: retire scic_sds_ and scic_ prefixes 2011-07-03 04:04:52 -07:00
request.c [SCSI] isci: T10 DIF support 2012-02-19 09:14:24 -06:00
request.h [SCSI] isci: Remove redundant isci_request.ttype field. 2011-10-31 13:19:47 +04:00
sas.h [SCSI] isci: fix support for large smp requests 2011-10-02 13:07:17 -05:00
scu_completion_codes.h isci: uplevel register hardware data structures and unsolicited frame handling 2011-07-03 04:04:47 -07:00
scu_event_codes.h isci: uplevel register hardware data structures and unsolicited frame handling 2011-07-03 04:04:47 -07:00
scu_remote_node_context.h isci: move remote_device handling out of the core 2011-07-03 04:00:38 -07:00
scu_task_context.h [SCSI] isci: T10 DIF support 2012-02-19 09:14:24 -06:00
task.c [SCSI] isci: remove unused 'isci_tmf->device' field 2012-01-16 11:44:15 +04:00
task.h [SCSI] isci: remove unused 'isci_tmf->device' field 2012-01-16 11:44:15 +04:00
unsolicited_frame_control.c [SCSI] isci: fix 32-bit operation when CONFIG_HIGHMEM64G=n 2011-08-23 19:50:27 -07:00
unsolicited_frame_control.h [SCSI] isci: fix 32-bit operation when CONFIG_HIGHMEM64G=n 2011-08-23 19:50:27 -07:00