diff options
author | Dan Williams <dan.j.williams@intel.com> | 2011-12-22 17:58:24 -0500 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-02-29 14:04:59 -0500 |
commit | cb48d672bfeb4147f3e20d5b16fa2eb6377231e2 (patch) | |
tree | c0c47dce6ce9b815e62ca6896762afa6a2278f71 /drivers/scsi/libsas | |
parent | f41a0c441c3fe43e79ebeb75584dbb5bfa83e5cd (diff) |
[SCSI] libsas: don't recover 'gone' devices in sas_ata_hard_reset()
The commands that timeout when a disk is forcibly removed may trigger
libata to attempt recovery of the device. If libsas has decided to
remove the device don't permit ata to continue to issue resets to its
last known phy.
The primary motivation for this patch is hotplug testing by writing 0 to
/sys/class/sas_phy/phyX/enable. Without this check this test leads to
libata issuing a reset and re-enabling the device that wants to be torn
down.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/libsas')
-rw-r--r-- | drivers/scsi/libsas/sas_ata.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c index 92f7e78a096c..0cb538f8478a 100644 --- a/drivers/scsi/libsas/sas_ata.c +++ b/drivers/scsi/libsas/sas_ata.c | |||
@@ -326,6 +326,9 @@ static int sas_ata_hard_reset(struct ata_link *link, unsigned int *class, | |||
326 | struct domain_device *dev = ap->private_data; | 326 | struct domain_device *dev = ap->private_data; |
327 | struct sas_internal *i = dev_to_sas_internal(dev); | 327 | struct sas_internal *i = dev_to_sas_internal(dev); |
328 | 328 | ||
329 | if (test_bit(SAS_DEV_GONE, &dev->state)) | ||
330 | return -ENODEV; | ||
331 | |||
329 | res = i->dft->lldd_I_T_nexus_reset(dev); | 332 | res = i->dft->lldd_I_T_nexus_reset(dev); |
330 | 333 | ||
331 | if (res != TMF_RESP_FUNC_COMPLETE) | 334 | if (res != TMF_RESP_FUNC_COMPLETE) |