aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libsas/sas_ata.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2012-01-31 00:40:45 -0500
committerJames Bottomley <JBottomley@Parallels.com>2012-02-29 16:42:51 -0500
commit26a2e68f816ebd736a0484ca293457b280af4ef1 (patch)
tree5fbae208c3bcda21dd1f9f918e811e07c2ce80e8 /drivers/scsi/libsas/sas_ata.c
parent77c309f3cdf9e217032dfe330f5881d352bb0436 (diff)
[SCSI] libsas: don't recover end devices attached to disabled phys
If userspace has decided to disable a phy the kernel should honor that and not inadvertantly re-enable the phy via error recovery. This is more straightforward in the sata case where link recovery (via libata-eh) is separate from sas_task cancelling in libsas-eh. Teach libsas to accept -ENODEV as a successful response from I_T_nexus_reset ('successful' in terms of not escalating further). This is a more comprehensive fix then "libsas: don't recover 'gone' devices in sas_ata_hard_reset()", as it is no longer sata-specific. aic94xx does check the return value from sas_phy_reset() so if the phy is disabled we proceed with clearing the I_T_nexus. Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/libsas/sas_ata.c')
-rw-r--r--drivers/scsi/libsas/sas_ata.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c
index 08d2103a45b7..bc0cecc6ad62 100644
--- a/drivers/scsi/libsas/sas_ata.c
+++ b/drivers/scsi/libsas/sas_ata.c
@@ -407,10 +407,9 @@ static int sas_ata_hard_reset(struct ata_link *link, unsigned int *class,
407 struct domain_device *dev = ap->private_data; 407 struct domain_device *dev = ap->private_data;
408 struct sas_internal *i = dev_to_sas_internal(dev); 408 struct sas_internal *i = dev_to_sas_internal(dev);
409 409
410 if (test_bit(SAS_DEV_GONE, &dev->state))
411 return -ENODEV;
412
413 res = i->dft->lldd_I_T_nexus_reset(dev); 410 res = i->dft->lldd_I_T_nexus_reset(dev);
411 if (res == -ENODEV)
412 return res;
414 413
415 if (res != TMF_RESP_FUNC_COMPLETE) 414 if (res != TMF_RESP_FUNC_COMPLETE)
416 sas_ata_printk(KERN_DEBUG, dev, "Unable to reset ata device?\n"); 415 sas_ata_printk(KERN_DEBUG, dev, "Unable to reset ata device?\n");