aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-core.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-10-30 21:17:06 -0400
committerJeff Garzik <jeff@garzik.org>2007-11-03 08:47:27 -0400
commitdb64bcf387aae6c7afad122a529d7d0513d3c5db (patch)
tree62fcd54c4f1d1c03d0360e37dc7f198a8ab8ae33 /drivers/ata/libata-core.c
parentdfcc173d71b029eb2b10cf99bb5b4e8749e09799 (diff)
libata: request PHY speed configuration on SControl access failure
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>
Diffstat (limited to 'drivers/ata/libata-core.c')
-rw-r--r--drivers/ata/libata-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 24b3bd63621f..3a1ec4e715ed 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -2784,7 +2784,7 @@ int sata_set_spd_needed(struct ata_link *link)
2784 u32 scontrol; 2784 u32 scontrol;
2785 2785
2786 if (sata_scr_read(link, SCR_CONTROL, &scontrol)) 2786 if (sata_scr_read(link, SCR_CONTROL, &scontrol))
2787 return 0; 2787 return 1;
2788 2788
2789 return __sata_set_spd_needed(link, &scontrol); 2789 return __sata_set_spd_needed(link, &scontrol);
2790} 2790}