aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libata-core.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2006-03-11 22:34:35 -0500
committerJeff Garzik <jeff@garzik.org>2006-03-12 12:51:11 -0500
commitfb21f0d0ec7e31cc814165e1a9d2662d9c9dd980 (patch)
tree6acfd767e12c93b9b710d6b90b47f630fcbecbc2 /drivers/scsi/libata-core.c
parent2044470cccec1bfe6bb819027975df302ff43bf8 (diff)
[PATCH] libata: check Word 88 validity in ata_id_xfer_mask()
Check bit 2 of Word 53 for Word 88 validity before using Word 88 to determine UDMA mask. Note that the original xfer mask implementation using ata_get_mode_mask() didn't consider bit 2 of Word 53. This patch introduces different (correct) behavior. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/scsi/libata-core.c')
-rw-r--r--drivers/scsi/libata-core.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index c17df3f22fd1..439b6db13802 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -819,7 +819,10 @@ static unsigned int ata_id_xfermask(const u16 *id)
819 } 819 }
820 820
821 mwdma_mask = id[ATA_ID_MWDMA_MODES] & 0x07; 821 mwdma_mask = id[ATA_ID_MWDMA_MODES] & 0x07;
822 udma_mask = id[ATA_ID_UDMA_MODES] & 0xff; 822
823 udma_mask = 0;
824 if (id[ATA_ID_FIELD_VALID] & (1 << 2))
825 udma_mask = id[ATA_ID_UDMA_MODES] & 0xff;
823 826
824 return ata_pack_xfermask(pio_mask, mwdma_mask, udma_mask); 827 return ata_pack_xfermask(pio_mask, mwdma_mask, udma_mask);
825} 828}