* [PATCH] libata: fix hw_sata_spd_limit initialization
@ 2007-06-06 7:35 Tejun Heo
2007-06-10 2:42 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Tejun Heo @ 2007-06-06 7:35 UTC (permalink / raw)
To: Jeff Garzik, linux-ide
hw_sata_spd_limit used to be incorrectly initialized to zero instead
of UINT_MAX if SPD is zero in SControl register. This breaks PHY
speed down. Fix it.
Signed-off-by: Tejun Heo <htejun@gmail.com>
---
drivers/ata/libata-core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -6318,7 +6318,8 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht)
/* init sata_spd_limit to the current value */
if (sata_scr_read(ap, SCR_CONTROL, &scontrol) == 0) {
int spd = (scontrol >> 4) & 0xf;
- ap->hw_sata_spd_limit &= (1 << spd) - 1;
+ if (spd)
+ ap->hw_sata_spd_limit &= (1 << spd) - 1;
}
ap->sata_spd_limit = ap->hw_sata_spd_limit;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] libata: fix hw_sata_spd_limit initialization
2007-06-06 7:35 [PATCH] libata: fix hw_sata_spd_limit initialization Tejun Heo
@ 2007-06-10 2:42 ` Jeff Garzik
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2007-06-10 2:42 UTC (permalink / raw)
To: Tejun Heo; +Cc: linux-ide
Tejun Heo wrote:
> hw_sata_spd_limit used to be incorrectly initialized to zero instead
> of UINT_MAX if SPD is zero in SControl register. This breaks PHY
> speed down. Fix it.
>
> Signed-off-by: Tejun Heo <htejun@gmail.com>
> ---
> drivers/ata/libata-core.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
applied
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-06-10 2:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-06 7:35 [PATCH] libata: fix hw_sata_spd_limit initialization Tejun Heo
2007-06-10 2:42 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).