diff options
author | Tejun Heo <htejun@gmail.com> | 2008-04-22 23:14:05 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-04-25 00:45:48 -0400 |
commit | a0b9f4bc1ec2ea25e47e7958e544fef0d122e012 (patch) | |
tree | 26b175215a1a1abad610115ba26f6578760239f3 /drivers/ata/sata_nv.c | |
parent | 15fe982e429e0e6b7466719acb6cfd9dbfe47f0c (diff) |
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 <htejun@gmail.com>
Cc: Roland Dreier <rdreier@cisco.com>
Cc: Petr Vandrovec <vandrove@vc.cvut.cz>
Cc: Marc Dionne <marc.c.dionne@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/sata_nv.c')
-rw-r--r-- | drivers/ata/sata_nv.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c index 109b07495721..858f70610eda 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) | |||
1591 | static int nv_hardreset(struct ata_link *link, unsigned int *class, | 1591 | static int nv_hardreset(struct ata_link *link, unsigned int *class, |
1592 | unsigned long deadline) | 1592 | unsigned long deadline) |
1593 | { | 1593 | { |
1594 | unsigned int dummy; | 1594 | int rc; |
1595 | 1595 | ||
1596 | /* SATA hardreset fails to retrieve proper device signature on | 1596 | /* SATA hardreset fails to retrieve proper device signature on |
1597 | * some controllers. Don't classify on hardreset. For more | 1597 | * some controllers. Request follow up SRST. For more info, |
1598 | * info, see http://bugzilla.kernel.org/show_bug.cgi?id=3352 | 1598 | * see http://bugzilla.kernel.org/show_bug.cgi?id=3352 |
1599 | */ | 1599 | */ |
1600 | return sata_sff_hardreset(link, &dummy, deadline); | 1600 | rc = sata_sff_hardreset(link, class, deadline); |
1601 | if (rc) | ||
1602 | return rc; | ||
1603 | return -EAGAIN; | ||
1601 | } | 1604 | } |
1602 | 1605 | ||
1603 | static void nv_adma_error_handler(struct ata_port *ap) | 1606 | static void nv_adma_error_handler(struct ata_port *ap) |