linux-stable/drivers/scsi/aic94xx
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
..
aic94xx.h
aic94xx_dev.c
aic94xx_dump.c aix94xx: Use angle brackets for system includes 2011-09-15 14:02:57 +02:00
aic94xx_dump.h
aic94xx_hwi.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
aic94xx_hwi.h
aic94xx_init.c [SCSI] libsas: introduce sas_drain_work() 2012-02-19 13:48:51 -06:00
aic94xx_reg.c
aic94xx_reg.h
aic94xx_reg_def.h Fix common misspellings 2011-03-31 11:26:23 -03:00
aic94xx_sas.h
aic94xx_scb.c [SCSI] isci: export phy events via ->lldd_control_phy() 2011-10-02 13:24:26 -05:00
aic94xx_sds.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
aic94xx_sds.h
aic94xx_seq.c tree-wide: fix comment/printk typos 2010-11-01 15:38:34 -04:00
aic94xx_seq.h
aic94xx_task.c [SCSI] Unify SAM_ and SAM_STAT_ macros 2010-07-28 09:07:49 -05:00
aic94xx_tmf.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
Kconfig
Makefile scsi: change to new flag variable 2011-03-17 14:05:35 +01:00