sata_nv: make hardreset return -EAGAIN on success
PATCH 1/1 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
---
It actually was a single fall out I missed. This is the proper fix and verfied on ck804.
drivers/ata/sata_nv.c +0 -0
@@ -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)
Quoted 3 lines
sata_nvhardreset can't classify but was left out while unifying follow-up SRST request mechanism[1]. This caused detection failures on those controllers. Fix it.
Yep, fixes my system too.
Quoted 3 lines · Tejun Heo
sata_nvhardreset can't classify but was left out while unifying follow-up SRST request mechanism[1]. This caused detection failures on those controllers. Fix it.
This works fine for me on CK804.
Thanks,
Marc
Jeff Garzik
AppliedQuoted 30 lines · Tejun Heo
sata_nvhardreset 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]
305d2a1ab137d11d573319c315748a87060fe82dSigned-off-by Tejun Heo <[email protected]>Cc Roland Dreier <[email protected]>Cc Petr Vandrovec <[email protected]>Cc Marc Dionne <[email protected]>---
It actually was a single fall out I missed. This is the proper fix and verfied on ck804.drivers/ata/sata_nv.c +1
-2@@ -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
drivers/ata/sata_nv.c static void nv_mcp55_thaw(struct ata_port *ap) · line 1604
Quoted 10 lines
drivers/ata/sata_nv.c +6
-2-* 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 ; }
applied