aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorBrett Russ <russb@emc.com>2005-09-01 21:53:34 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-09-07 01:54:54 -0400
commit7da79312830e6d9b3f6ee06b86c3a35caba2f6e7 (patch)
treeafd386f0cee850f62fdb9245105e02fe49631d28 /drivers/scsi
parent4706df3d3c42af802597d82c8b1542c3d52eab23 (diff)
[PATCH] libata: fix pio_mask values (take 2)
ata_get_mode_mask() uses bits 3 and 4 in the pio_mask to represent PIO modes 3 and 4. The value read from the drive, which reports support for PIO3 and PIO4 in bits 0 and 1, is shifted left by 3 bits and OR'd with 0x7 (which then corresponds to PIO 2-0 in libata). Thus, the drivers below need adjustments to comply with the way pio_mask is used. I changed the masks from the commented values to all support PIO4-0, since the spec mandates that PIO0-2 are supported and there's no reason not to support PIO3 IMO. Signed-off-by: Brett Russ <russb@emc.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/ahci.c2
-rw-r--r--drivers/scsi/sata_uli.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c
index 31065261de8e..320df6cd3def 100644
--- a/drivers/scsi/ahci.c
+++ b/drivers/scsi/ahci.c
@@ -250,7 +250,7 @@ static struct ata_port_info ahci_port_info[] = {
250 .host_flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | 250 .host_flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
251 ATA_FLAG_SATA_RESET | ATA_FLAG_MMIO | 251 ATA_FLAG_SATA_RESET | ATA_FLAG_MMIO |
252 ATA_FLAG_PIO_DMA, 252 ATA_FLAG_PIO_DMA,
253 .pio_mask = 0x03, /* pio3-4 */ 253 .pio_mask = 0x1f, /* pio0-4 */
254 .udma_mask = 0x7f, /* udma0-6 ; FIXME */ 254 .udma_mask = 0x7f, /* udma0-6 ; FIXME */
255 .port_ops = &ahci_ops, 255 .port_ops = &ahci_ops,
256 }, 256 },
diff --git a/drivers/scsi/sata_uli.c b/drivers/scsi/sata_uli.c
index 1566886815fb..42e13ed8eb5b 100644
--- a/drivers/scsi/sata_uli.c
+++ b/drivers/scsi/sata_uli.c
@@ -125,8 +125,8 @@ static struct ata_port_info uli_port_info = {
125 .sht = &uli_sht, 125 .sht = &uli_sht,
126 .host_flags = ATA_FLAG_SATA | ATA_FLAG_SATA_RESET | 126 .host_flags = ATA_FLAG_SATA | ATA_FLAG_SATA_RESET |
127 ATA_FLAG_NO_LEGACY, 127 ATA_FLAG_NO_LEGACY,
128 .pio_mask = 0x03, //support pio mode 4 (FIXME) 128 .pio_mask = 0x1f, /* pio0-4 */
129 .udma_mask = 0x7f, //support udma mode 6 129 .udma_mask = 0x7f, /* udma0-6 */
130 .port_ops = &uli_ops, 130 .port_ops = &uli_ops,
131}; 131};
132 132