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>
This commit is contained in:
Tejun Heo 2007-10-31 10:17:06 +09:00 коммит произвёл Jeff Garzik
Родитель dfcc173d71
Коммит db64bcf387
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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);
}