aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libata-eh.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2006-07-10 10:18:23 -0400
committerJeff Garzik <jeff@garzik.org>2006-07-19 14:06:53 -0400
commit7c8c2cff81b2b7f6dd3f9fd7b77033c1be5d7920 (patch)
treece03730193b08639e90f95d3419857053e3d283c /drivers/scsi/libata-eh.c
parent4528e4da79675b4995e085046b8ffbe0415c3261 (diff)
[PATCH] libata: fix eh_skip_recovery condition
* (ata_dev_absent() || ata_dev_ready()) test doesn't indicate SUSPENDED state properly. Fix it. * Link resuming resets shouldn't be skipped. Don't skip recovery on EHI_RESUME_LINK. This doesn't matter for host ports as EHI_RESUME always coincides with EHI_HOTPLUGGED which makes attached disabled devices vacant. However, PMP reset causes non-hotplug link-resuming resets which shouldn't be skipped. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/scsi/libata-eh.c')
-rw-r--r--drivers/scsi/libata-eh.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/scsi/libata-eh.c b/drivers/scsi/libata-eh.c
index 36a801c83325..1dcb2c13ffa9 100644
--- a/drivers/scsi/libata-eh.c
+++ b/drivers/scsi/libata-eh.c
@@ -1843,15 +1843,16 @@ static int ata_eh_skip_recovery(struct ata_port *ap)
1843 for (i = 0; i < ata_port_max_devices(ap); i++) { 1843 for (i = 0; i < ata_port_max_devices(ap); i++) {
1844 struct ata_device *dev = &ap->device[i]; 1844 struct ata_device *dev = &ap->device[i];
1845 1845
1846 if (ata_dev_absent(dev) || ata_dev_ready(dev)) 1846 if (!(dev->flags & ATA_DFLAG_SUSPENDED))
1847 break; 1847 break;
1848 } 1848 }
1849 1849
1850 if (i == ata_port_max_devices(ap)) 1850 if (i == ata_port_max_devices(ap))
1851 return 1; 1851 return 1;
1852 1852
1853 /* always thaw frozen port and recover failed devices */ 1853 /* thaw frozen port, resume link and recover failed devices */
1854 if (ap->pflags & ATA_PFLAG_FROZEN || ata_port_nr_enabled(ap)) 1854 if ((ap->pflags & ATA_PFLAG_FROZEN) ||
1855 (ehc->i.flags & ATA_EHI_RESUME_LINK) || ata_port_nr_enabled(ap))
1855 return 0; 1856 return 0;
1856 1857
1857 /* skip if class codes for all vacant slots are ATA_DEV_NONE */ 1858 /* skip if class codes for all vacant slots are ATA_DEV_NONE */