Skip to content

Commit

Permalink
[PATCH] libata: fix pio_mask values (take 2)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Brett Russ authored and Jeff Garzik committed Sep 7, 2005
1 parent 4706df3 commit 7da7931
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/scsi/ahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ static struct ata_port_info ahci_port_info[] = {
.host_flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
ATA_FLAG_SATA_RESET | ATA_FLAG_MMIO |
ATA_FLAG_PIO_DMA,
.pio_mask = 0x03, /* pio3-4 */
.pio_mask = 0x1f, /* pio0-4 */
.udma_mask = 0x7f, /* udma0-6 ; FIXME */
.port_ops = &ahci_ops,
},
Expand Down
4 changes: 2 additions & 2 deletions drivers/scsi/sata_uli.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ static struct ata_port_info uli_port_info = {
.sht = &uli_sht,
.host_flags = ATA_FLAG_SATA | ATA_FLAG_SATA_RESET |
ATA_FLAG_NO_LEGACY,
.pio_mask = 0x03, //support pio mode 4 (FIXME)
.udma_mask = 0x7f, //support udma mode 6
.pio_mask = 0x1f, /* pio0-4 */
.udma_mask = 0x7f, /* udma0-6 */
.port_ops = &uli_ops,
};

Expand Down

0 comments on commit 7da7931

Please sign in to comment.