Skip to content

Commit

Permalink
libata: request PHY speed configuration on SControl access failure
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Nov 3, 2007
1 parent dfcc173 commit db64bcf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit db64bcf

Please sign in to comment.