From: Tejun Heo Date: Wed, 23 Apr 2008 03:14:05 +0000 (+0900) Subject: sata_nv: make hardreset return -EAGAIN on success X-Git-Tag: v2.6.26-rc1~1060^2~14 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=a0b9f4bc1ec2ea25e47e7958e544fef0d122e012;p=linux-2.6-omap-h63xx.git sata_nv: make hardreset return -EAGAIN on success sata_nv hardreset can't classify but was left out while unifying follow-up SRST request mechanism[1]. This caused detection failures on those controllers. Fix it. Reported and bisected by Roland Dreier, Petr Vandrovec and Marc Dionne. Thanks guys. [1] 305d2a1ab137d11d573319c315748a87060fe82d Signed-off-by: Tejun Heo Cc: Roland Dreier Cc: Petr Vandrovec Cc: Marc Dionne Signed-off-by: Jeff Garzik --- diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c index 109b0749572..858f70610ed 100644 --- a/drivers/ata/sata_nv.c +++ b/drivers/ata/sata_nv.c @@ -1591,13 +1591,16 @@ static void nv_mcp55_thaw(struct ata_port *ap) static int nv_hardreset(struct ata_link *link, unsigned int *class, unsigned long deadline) { - unsigned int dummy; + int rc; /* SATA hardreset fails to retrieve proper device signature on - * some controllers. Don't classify on hardreset. For more - * info, see http://bugzilla.kernel.org/show_bug.cgi?id=3352 + * some controllers. Request follow up SRST. For more info, + * see http://bugzilla.kernel.org/show_bug.cgi?id=3352 */ - return sata_sff_hardreset(link, &dummy, deadline); + rc = sata_sff_hardreset(link, class, deadline); + if (rc) + return rc; + return -EAGAIN; } static void nv_adma_error_handler(struct ata_port *ap)