* [PATCH] libata: fix eh_skip_recovery condition
@ 2006-07-10 14:18 Tejun Heo
2006-07-19 18:07 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Tejun Heo @ 2006-07-10 14:18 UTC (permalink / raw)
To: Jeff Garzik, linux-ide
* (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>
---
drivers/scsi/libata-eh.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
f971658e0eb5636b7ef67cf0d769f6296e44e914
diff --git a/drivers/scsi/libata-eh.c b/drivers/scsi/libata-eh.c
index 640a035..a9dea3d 100644
--- a/drivers/scsi/libata-eh.c
+++ b/drivers/scsi/libata-eh.c
@@ -1864,15 +1864,16 @@ static int ata_eh_skip_recovery(struct a
for (i = 0; i < ata_port_max_devices(ap); i++) {
struct ata_device *dev = &ap->device[i];
- if (ata_dev_absent(dev) || ata_dev_ready(dev))
+ if (!(dev->flags & ATA_DFLAG_SUSPENDED))
break;
}
if (i == ata_port_max_devices(ap))
return 1;
- /* always thaw frozen port and recover failed devices */
- if (ap->pflags & ATA_PFLAG_FROZEN || ata_port_nr_enabled(ap))
+ /* thaw frozen port, resume link and recover failed devices */
+ if ((ap->pflags & ATA_PFLAG_FROZEN) ||
+ (ehc->i.flags & ATA_EHI_RESUME_LINK) || ata_port_nr_enabled(ap))
return 0;
/* skip if class codes for all vacant slots are ATA_DEV_NONE */
--
1.3.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-07-19 18:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-10 14:18 [PATCH] libata: fix eh_skip_recovery condition Tejun Heo
2006-07-19 18:07 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).