]> git.hungrycats.org Git - linux/commitdiff
[PATCH] libata: ata_piix.c PIO fix
authorBartlomiej Zolnierkiewicz <bzolnier@elka.pw.edu.pl>
Mon, 30 Aug 2004 10:43:27 +0000 (06:43 -0400)
committerBartlomiej Zolnierkiewicz <bzolnier@elka.pw.edu.pl>
Mon, 30 Aug 2004 10:43:27 +0000 (06:43 -0400)
[patch] libata: ata_piix.c PIO fix

"[libata] transfer mode cleanup" introduced bug in ata_piix.c:
previously PIO number (not mode) was passed to piix_set_piomode().
Fortunately this function is only used for (disabled) PATA support.

I bet that this is the reason why MWDMA didn't work for PATA.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@elka.pw.edu.pl>
drivers/scsi/ata_piix.c

index 05d108139a5ff3f00220c0407fa0d8496e9f2ba2..747fcd21ab2dcd28117177347615467e974a2ea7 100644 (file)
@@ -389,7 +389,7 @@ static void piix_sata_phy_reset(struct ata_port *ap)
 
 static void piix_set_piomode (struct ata_port *ap, struct ata_device *adev)
 {
-       unsigned int pio        = adev->pio_mode;
+       unsigned int pio        = adev->pio_mode - XFER_PIO_0;
        struct pci_dev *dev     = ap->host_set->pdev;
        unsigned int is_slave   = (adev->devno != 0);
        unsigned int master_port= ap->port_no ? 0x42 : 0x40;