提交 cb48d672 编写于 作者: D Dan Williams 提交者: James Bottomley

[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: NDan Williams <dan.j.williams@intel.com>
Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
上级 f41a0c44
...@@ -326,6 +326,9 @@ static int sas_ata_hard_reset(struct ata_link *link, unsigned int *class, ...@@ -326,6 +326,9 @@ static int sas_ata_hard_reset(struct ata_link *link, unsigned int *class,
struct domain_device *dev = ap->private_data; struct domain_device *dev = ap->private_data;
struct sas_internal *i = dev_to_sas_internal(dev); struct sas_internal *i = dev_to_sas_internal(dev);
if (test_bit(SAS_DEV_GONE, &dev->state))
return -ENODEV;
res = i->dft->lldd_I_T_nexus_reset(dev); res = i->dft->lldd_I_T_nexus_reset(dev);
if (res != TMF_RESP_FUNC_COMPLETE) if (res != TMF_RESP_FUNC_COMPLETE)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册