aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_it8213.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-12-03 14:32:10 -0500
committerJeff Garzik <jgarzik@redhat.com>2009-12-03 15:59:25 -0500
commite0ee792b75a5cf1b23acfeae7ce3c386f805b20b (patch)
tree0e1e4fdf99fa73c5c23e23471ab5ea4a26fd06fc /drivers/ata/pata_it8213.c
parent3915044468217d9c224b824c308e4d112666f58d (diff)
pata_it8213: fix UDMA handling
Driver should program the cycle timing not the mode number (doing the latter results in wrong timings being used). There shouldn't be any problems with it as IDE it8213 host driver has been doing it this way 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 f156da8076f7..36d1f61491df 100644
--- a/drivers/ata/pata_it8213.c
+++ b/drivers/ata/pata_it8213.c
@@ -173,10 +173,10 @@ static void it8213_set_dmamode (struct ata_port *ap, struct ata_device *adev)
173 173
174 udma_enable |= (1 << devid); 174 udma_enable |= (1 << devid);
175 175
176 /* Load the UDMA mode number */ 176 /* Load the UDMA cycle time */
177 pci_read_config_word(dev, 0x4A, &udma_timing); 177 pci_read_config_word(dev, 0x4A, &udma_timing);
178 udma_timing &= ~(3 << (4 * devid)); 178 udma_timing &= ~(3 << (4 * devid));
179 udma_timing |= (udma & 3) << (4 * devid); 179 udma_timing |= u_speed << (4 * devid);
180 pci_write_config_word(dev, 0x4A, udma_timing); 180 pci_write_config_word(dev, 0x4A, udma_timing);
181 181
182 /* Load the clock selection */ 182 /* Load the clock selection */