Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=afe3cc51ba4be6b25b721c40f178ea4157751161
Commit:     afe3cc51ba4be6b25b721c40f178ea4157751161
Parent:     ef143d577ba98c8a53aee9aa60e7d1f07c32fd7a
Author:     Tejun Heo <[EMAIL PROTECTED]>
AuthorDate: Wed Jun 6 16:35:55 2007 +0900
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Sat Jun 9 22:40:28 2007 -0400

    libata: fix hw_sata_spd_limit initialization
    
    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 <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/ata/libata-core.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index e793716..bf8d3b8 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -6317,7 +6317,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;
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to