Re: [PATCH #upstream-fixes] sata_nv: make hardreset return -EAGAIN on success

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tejun Heo wrote:
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@xxxxxxxxx>
Cc: Roland Dreier <rdreier@xxxxxxxxx>
Cc: Petr Vandrovec <vandrove@xxxxxxxxxx>
Cc: Marc Dionne <marc.c.dionne@xxxxxxxxx>
---
It actually was a single fall out I missed.  This is the proper fix
and verfied on ck804.

diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c
index 109b074..858f706 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;
}

applied


--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux