From: Tejun Heo Date: Wed, 31 Oct 2007 01:17:06 +0000 (+0900) Subject: libata: request PHY speed configuration on SControl access failure X-Git-Tag: v2.6.24-rc2~48^2~1 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=db64bcf387aae6c7afad122a529d7d0513d3c5db;p=~emulex%2Finfiniband.git 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 Signed-off-by: Jeff Garzik --- diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 24b3bd63621..3a1ec4e715e 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) u32 scontrol; if (sata_scr_read(link, SCR_CONTROL, &scontrol)) - return 0; + return 1; return __sata_set_spd_needed(link, &scontrol); }