libata: request PHY speed configuration on SControl access failure
authorTejun Heo <htejun@gmail.com>
Wed, 31 Oct 2007 01:17:06 +0000 (10:17 +0900)
committerJeff Garzik <jeff@garzik.org>
Sat, 3 Nov 2007 12:47:27 +0000 (08:47 -0400)
In sata_set_spd_needed(), if SControl read failed, it returned 0 and
skipped PHY speed configuration.  However, if SControl access fails,
it's far more logical to request PHY speed configuration.  Reverse the
logic.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/ata/libata-core.c

index 24b3bd63621fe20f4ec089373f42f277914f6a77..3a1ec4e715ed656c6f448e1875c96eac7a94bdcd 100644 (file)
@@ -2784,7 +2784,7 @@ int sata_set_spd_needed(struct ata_link *link)
        u32 scontrol;
 
        if (sata_scr_read(link, SCR_CONTROL, &scontrol))
-               return 0;
+               return 1;
 
        return __sata_set_spd_needed(link, &scontrol);
 }