[PATCH] libata: ata_piix.c PIO fix

[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: default avatarBartlomiej Zolnierkiewicz <bzolnier@elka.pw.edu.pl>
parent 78864390
...@@ -389,7 +389,7 @@ static void piix_sata_phy_reset(struct ata_port *ap) ...@@ -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) 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; struct pci_dev *dev = ap->host_set->pdev;
unsigned int is_slave = (adev->devno != 0); unsigned int is_slave = (adev->devno != 0);
unsigned int master_port= ap->port_no ? 0x42 : 0x40; unsigned int master_port= ap->port_no ? 0x42 : 0x40;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment