[SCSI] libsas: don't recover end devices attached to disabled phys
authorDan Williams <dan.j.williams@intel.com>
Tue, 31 Jan 2012 05:40:45 +0000 (21:40 -0800)
committerJames Bottomley <JBottomley@Parallels.com>
Wed, 29 Feb 2012 21:42:51 +0000 (15:42 -0600)
commit26a2e68f816ebd736a0484ca293457b280af4ef1
tree5fbae208c3bcda21dd1f9f918e811e07c2ce80e8
parent77c309f3cdf9e217032dfe330f5881d352bb0436
[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>
drivers/scsi/aic94xx/aic94xx_tmf.c
drivers/scsi/libsas/sas_ata.c
drivers/scsi/libsas/sas_init.c
drivers/scsi/libsas/sas_scsi_host.c