aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-12-21 15:19:56 -0800
committerJames Bottomley <JBottomley@Parallels.com>2012-02-29 12:55:12 -0600
commit3a9c5560f677690f65038f399f4f598c79b83186 (patch)
tree1e15d427fd86260fc26670bc4ceff61d51ef025e /drivers
parent[SCSI] libsas: don't mark expanders as gone when a child device is removed (diff)
downloadlinux-dev-3a9c5560f677690f65038f399f4f598c79b83186.tar.xz
linux-dev-3a9c5560f677690f65038f399f4f598c79b83186.zip
[SCSI] libsas: check for 'gone' expanders in smp_execute_task()
No sense in issuing or retrying commands to an expander that has been removed. Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to '')
-rw-r--r--drivers/scsi/libsas/sas_expander.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c
index 7701ab588404..6fb1f3afd1e0 100644
--- a/drivers/scsi/libsas/sas_expander.c
+++ b/drivers/scsi/libsas/sas_expander.c
@@ -74,6 +74,11 @@ static int smp_execute_task(struct domain_device *dev, void *req, int req_size,
mutex_lock(&dev->ex_dev.cmd_mutex);
for (retry = 0; retry < 3; retry++) {
+ if (test_bit(SAS_DEV_GONE, &dev->state)) {
+ res = -ECOMM;
+ break;
+ }
+
task = sas_alloc_task(GFP_KERNEL);
if (!task) {
res = -ENOMEM;