[SCSI] libsas: don't recover 'gone' devices in sas_ata_hard_reset()
authorDan Williams <dan.j.williams@intel.com>
Thu, 22 Dec 2011 22:58:24 +0000 (14:58 -0800)
committerJames Bottomley <JBottomley@Parallels.com>
Wed, 29 Feb 2012 19:04:59 +0000 (13:04 -0600)
commitcb48d672bfeb4147f3e20d5b16fa2eb6377231e2
treec0c47dce6ce9b815e62ca6896762afa6a2278f71
parentf41a0c441c3fe43e79ebeb75584dbb5bfa83e5cd
[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>
drivers/scsi/libsas/sas_ata.c