[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>
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;