summaryrefslogtreecommitdiff
path: root/drivers/ata/pata_it8213.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-12-03 22:32:10 +0300
committerJeff Garzik <jgarzik@redhat.com>2009-12-04 00:01:39 +0300
commite3f1d5cd114dad010376c78e5c8eb8c5fe114f80 (patch)
treeb7c8185fc6ee1a64c34bbef25110ceda3b22df44 /drivers/ata/pata_it8213.c
parented869ff0c70d482de0dc97c3138ff42cbf87aed5 (diff)
downloadlinux-e3f1d5cd114dad010376c78e5c8eb8c5fe114f80.tar.xz
pata_it8213: fix wrong MWDMA timings being programmed
Clear old MWDMA timings before programming new ones (IT8213 is a single port host so there is no need to check ap->port_no). This change should be safe as this is how we have been doing things in IDE it8213 host driver for years. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/pata_it8213.c')
-rw-r--r--drivers/ata/pata_it8213.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ata/pata_it8213.c b/drivers/ata/pata_it8213.c
index f0bf77ad371f..bcc190a1c426 100644
--- a/drivers/ata/pata_it8213.c
+++ b/drivers/ata/pata_it8213.c
@@ -210,7 +210,7 @@ static void it8213_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 &= 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);