diff options
author | Dan Williams <dan.j.williams@intel.com> | 2011-02-18 18:25:07 +0100 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-07-03 12:55:27 +0200 |
commit | 0cf89d1d27c1bdd0abf1714096f98ea44704dcff (patch) | |
tree | 0bee9fa05aba8a6e1fe4b6b50a3bfc6d0793356f /drivers/scsi/isci/task.c | |
parent | isci: bypass scic_controller_get_handler_methods() (diff) | |
download | linux-0cf89d1d27c1bdd0abf1714096f98ea44704dcff.tar.xz linux-0cf89d1d27c1bdd0abf1714096f98ea44704dcff.zip |
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 <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>
Diffstat (limited to 'drivers/scsi/isci/task.c')
-rw-r--r-- | drivers/scsi/isci/task.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/isci/task.c b/drivers/scsi/isci/task.c index 5e6f55863407..6f98f6c74efb 100644 --- a/drivers/scsi/isci/task.c +++ b/drivers/scsi/isci/task.c @@ -164,8 +164,7 @@ int isci_task_execute_task(struct sas_task *task, int num, gfp_t gfp_flags) * for the quiesce spinlock. */ - if (isci_host_get_state(isci_host) == isci_starting || - (device && ((isci_remote_device_get_state(device) == isci_ready) || + if ((device && ((isci_remote_device_get_state(device) == isci_ready) || (isci_remote_device_get_state(device) == isci_host_quiesce)))) { /* Forces a retry from scsi mid layer. */ |