From: Bartlomiej Zolnierkiewicz Date: Thu, 3 Dec 2009 19:32:08 +0000 (+0100) Subject: pata_efar: fix wrong MWDMA timings being programmed X-Git-Tag: v2.6.33-rc1~380^2~22 X-Git-Url: http://ftp.safe.ca/?a=commitdiff_plain;ds=sidebyside;h=dd221f9ce97c33e560a63999c74c17d13ef780b4;p=safe%2Fjmp%2Flinux-2.6 pata_efar: fix wrong MWDMA timings being programmed Do not clear MWDMA timings for device on the other port when programming slave device. This change should be safe as this is how we have been doing things in IDE slc90e66 host driver for years. Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Jeff Garzik --- diff --git a/drivers/ata/pata_efar.c b/drivers/ata/pata_efar.c index 540c364..f37d987 100644 --- a/drivers/ata/pata_efar.c +++ b/drivers/ata/pata_efar.c @@ -201,7 +201,7 @@ static void efar_set_dmamode (struct ata_port *ap, struct ata_device *adev) master_data &= 0xFF4F; /* Mask out IORDY|TIME1|DMAONLY */ master_data |= control << 4; pci_read_config_byte(dev, 0x44, &slave_data); - slave_data &= (0x0F + 0xE1 * ap->port_no); + slave_data &= ap->port_no ? 0x0F : 0xF0; /* Load the matching timing */ slave_data |= ((timings[pio][0] << 2) | timings[pio][1]) << (ap->port_no ? 4 : 0); pci_write_config_byte(dev, 0x44, slave_data);