From 26a2e68f816ebd736a0484ca293457b280af4ef1 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Mon, 30 Jan 2012 21:40:45 -0800 Subject: [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 Signed-off-by: James Bottomley --- drivers/scsi/aic94xx/aic94xx_tmf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/scsi/aic94xx') diff --git a/drivers/scsi/aic94xx/aic94xx_tmf.c b/drivers/scsi/aic94xx/aic94xx_tmf.c index 50b914ffab9..cf9040933da 100644 --- a/drivers/scsi/aic94xx/aic94xx_tmf.c +++ b/drivers/scsi/aic94xx/aic94xx_tmf.c @@ -192,7 +192,7 @@ int asd_I_T_nexus_reset(struct domain_device *dev) ASD_DPRINTK("sending %s reset to %s\n", reset_type ? "hard" : "soft", dev_name(&phy->dev)); res = sas_phy_reset(phy, reset_type); - if (res == TMF_RESP_FUNC_COMPLETE) { + if (res == TMF_RESP_FUNC_COMPLETE || res == -ENODEV) { /* wait for the maximum settle time */ msleep(500); /* clear all outstanding commands (keep nexus suspended) */ -- cgit v1.2.3-70-g09d2