aboutsummaryrefslogtreecommitdiff
path: root/drivers/ata/pata_it8213.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-12-03 20:32:10 +0100
committerJeff Garzik <jgarzik@redhat.com>2009-12-03 16:00:56 -0500
commit088ccb53a341b5c0afab67e392b053ebb0bf7b2b (patch)
tree5b572452ecb84596f8db430a4c5f2ef7e668fcde /drivers/ata/pata_it8213.c
parente0ee792b75a5cf1b23acfeae7ce3c386f805b20b (diff)
pata_it8213: fix wrong PIO timings being programmed
* do not clear PIO timings for master when programming slave * program new PIO timings in the correct register nibble Both changes 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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ata/pata_it8213.c b/drivers/ata/pata_it8213.c
index 36d1f61491d..092af531aa0 100644
--- a/drivers/ata/pata_it8213.c
+++ b/drivers/ata/pata_it8213.c
@@ -112,13 +112,13 @@ static void it8213_set_piomode (struct ata_port *ap, struct ata_device *adev)
} else {
u8 slave_data;
- idetm_data &= 0xCC0F;
+ idetm_data &= 0xFF0F;
idetm_data |= (control << 4);
/* Slave timing in separate register */
pci_read_config_byte(dev, 0x44, &slave_data);
slave_data &= 0xF0;
- slave_data |= ((timings[pio][0] << 2) | timings[pio][1]) << 4;
+ slave_data |= (timings[pio][0] << 2) | timings[pio][1];
pci_write_config_byte(dev, 0x44, slave_data);
}