From 58c83b6013f2583035bd6769caceef8f3f21ecff Mon Sep 17 00:00:00 2001 Message-Id: <58c83b6013f2583035bd6769caceef8f3f21ecff.1167304829.git.robbat2@gentoo.org> From: Tejun Heo Date: Mon, 16 Oct 2006 07:23:54 +0900 Subject: [PATCH 1/18] [PATCH] libata: generate hotplug event on SError read failure ata_eh_autopsy() used to schedule hardreset for phys which failed to return SError, which isn't enough for some cases. Assume the worst and generate hotplug event instead. Note that scr_read() is guaranteed to succeed for host ports. This change affects only PMP links. Signed-off-by: Tejun Heo Signed-off-by: Robin H. Johnson --- drivers/ata/libata-eh.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 6787fbc..2067db0 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c @@ -1327,8 +1327,10 @@ static void ata_eh_autopsy(struct ata_port *ap) if (rc == 0) { ehc->i.serror |= serror; ata_eh_analyze_serror(ap); - } else if (rc != -EOPNOTSUPP) - ehc->i.action |= ATA_EH_HARDRESET; + } else if (rc != -EOPNOTSUPP) { + /* hmmm, assume the worst and generate hotplug event */ + __ata_ehi_hotplugged(&ehc->i); + } /* analyze NCQ failure */ ata_eh_analyze_ncq_error(ap); -- 1.4.4.3