From 62f1d0e6de138b91d55fbd7d579c837ed62e9e31 Mon Sep 17 00:00:00 2001 From: Andres Salomon Date: Mon, 11 Sep 2006 08:51:05 -0400 Subject: [PATCH] [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 Signed-off-by: Jeff Garzik --- drivers/scsi/sata_mv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/sata_mv.c b/drivers/scsi/sata_mv.c index 1053c7c76b7..fa38a413d16 100644 --- a/drivers/scsi/sata_mv.c +++ b/drivers/scsi/sata_mv.c @@ -1961,8 +1961,7 @@ comreset_retry: timeout = jiffies + msecs_to_jiffies(200); do { sata_scr_read(ap, SCR_STATUS, &sstatus); - sstatus &= 0x3; - if ((sstatus == 3) || (sstatus == 0)) + if (((sstatus & 0x3) == 3) || ((sstatus & 0x3) == 0)) break; __msleep(1, can_sleep); -- 2.11.4.GIT