aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/piix.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-10-16 16:29:56 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-10-16 16:29:56 -0400
commit1c54a93d4de34c87be9c63fe5094157e10995d6b (patch)
tree9da94f64f4d432ca222547f555c9c1bb10bf2e25 /drivers/ide/pci/piix.c
parent3135469e1f679b1728fa047ed43b0c63cdf50c84 (diff)
it8213/piix/slc90e66: "de-couple" PIO and UDMA modes
Don't force PIO4 when programming UDMA mode (suggested by Sergei). Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci/piix.c')
-rw-r--r--drivers/ide/pci/piix.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/ide/pci/piix.c b/drivers/ide/pci/piix.c
index d5a31e9f5727..b0f06161eb8e 100644
--- a/drivers/ide/pci/piix.c
+++ b/drivers/ide/pci/piix.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/drivers/ide/pci/piix.c Version 0.52 Jul 14, 2007 2 * linux/drivers/ide/pci/piix.c Version 0.53 Aug 9, 2007
3 * 3 *
4 * Copyright (C) 1998-1999 Andrzej Krzysztofowicz, Author and Maintainer 4 * Copyright (C) 1998-1999 Andrzej Krzysztofowicz, Author and Maintainer
5 * Copyright (C) 1998-2000 Andre Hedrick <andre@linux-ide.org> 5 * Copyright (C) 1998-2000 Andre Hedrick <andre@linux-ide.org>
@@ -194,7 +194,7 @@ static void piix_set_dma_mode(ide_drive_t *drive, const u8 speed)
194 int u_speed = 0; 194 int u_speed = 0;
195 int sitre; 195 int sitre;
196 u16 reg4042, reg4a; 196 u16 reg4042, reg4a;
197 u8 reg48, reg54, reg55, pio; 197 u8 reg48, reg54, reg55;
198 198
199 pci_read_config_word(dev, maslave, &reg4042); 199 pci_read_config_word(dev, maslave, &reg4042);
200 sitre = (reg4042 & 0x4000) ? 1 : 0; 200 sitre = (reg4042 & 0x4000) ? 1 : 0;
@@ -231,10 +231,9 @@ static void piix_set_dma_mode(ide_drive_t *drive, const u8 speed)
231 pci_write_config_byte(dev, 0x54, reg54 | v_flag); 231 pci_write_config_byte(dev, 0x54, reg54 | v_flag);
232 } else 232 } else
233 pci_write_config_byte(dev, 0x54, reg54 & ~v_flag); 233 pci_write_config_byte(dev, 0x54, reg54 & ~v_flag);
234
235 pio = 4;
236 } else { 234 } else {
237 const u8 mwdma_to_pio[] = { 0, 3, 4 }; 235 const u8 mwdma_to_pio[] = { 0, 3, 4 };
236 u8 pio;
238 237
239 if (reg48 & u_flag) 238 if (reg48 & u_flag)
240 pci_write_config_byte(dev, 0x48, reg48 & ~u_flag); 239 pci_write_config_byte(dev, 0x48, reg48 & ~u_flag);
@@ -249,9 +248,9 @@ static void piix_set_dma_mode(ide_drive_t *drive, const u8 speed)
249 pio = mwdma_to_pio[speed - XFER_MW_DMA_0]; 248 pio = mwdma_to_pio[speed - XFER_MW_DMA_0];
250 else 249 else
251 pio = 2; /* only SWDMA2 is allowed */ 250 pio = 2; /* only SWDMA2 is allowed */
252 }
253 251
254 piix_set_pio_mode(drive, pio); 252 piix_set_pio_mode(drive, pio);
253 }
255} 254}
256 255
257/** 256/**