aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorAndres Salomon <dilinger@debian.org>2006-09-11 08:51:05 -0400
committerJeff Garzik <jeff@garzik.org>2006-09-11 08:51:05 -0400
commit62f1d0e6de138b91d55fbd7d579c837ed62e9e31 (patch)
treeb3842135c320101acdd8c457459786537b9ed4ed /drivers/scsi
parentc336923b668fdcf0312efbec3b44895d713f4d81 (diff)
[libata] sata_mv: errata check buglet fix
Fix a buglet; the errata check below this code is assuming the value in the sstatus variable is what was pulled out of the SCR_STATUS register. However, the status checks in the timeout loop clobber everything but the first 4 bits of sstatus, so the errata checks are invalid. This patch changes it to not clobber SStatus. Signed-off-by: Andres Salomon <dilinger@debian.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/sata_mv.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/sata_mv.c b/drivers/scsi/sata_mv.c
index 1053c7c76b7d..fa38a413d16b 100644
--- a/drivers/scsi/sata_mv.c
+++ b/drivers/scsi/sata_mv.c
@@ -1961,8 +1961,7 @@ comreset_retry:
1961 timeout = jiffies + msecs_to_jiffies(200); 1961 timeout = jiffies + msecs_to_jiffies(200);
1962 do { 1962 do {
1963 sata_scr_read(ap, SCR_STATUS, &sstatus); 1963 sata_scr_read(ap, SCR_STATUS, &sstatus);
1964 sstatus &= 0x3; 1964 if (((sstatus & 0x3) == 3) || ((sstatus & 0x3) == 0))
1965 if ((sstatus == 3) || (sstatus == 0))
1966 break; 1965 break;
1967 1966
1968 __msleep(1, can_sleep); 1967 __msleep(1, can_sleep);