aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/piix.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-10-11 17:54:01 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-10-11 17:54:01 -0400
commit90986028c98be10807bb6f48e883f33fa20e5499 (patch)
tree0350e6fb27b98529222d1c5b501817349c163c42 /drivers/ide/pci/piix.c
parenta6fe837ed63aa812bea029a24b7aafc72ba8de88 (diff)
it8213/piix/slc90e66: don't change DMA settings when programming PIO
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.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/ide/pci/piix.c b/drivers/ide/pci/piix.c
index 07492d71c602..860b929f6e58 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.51 Jul 6, 2007 2 * linux/drivers/ide/pci/piix.c Version 0.52 Jul 14, 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>
@@ -242,6 +242,11 @@ static int piix_tune_chipset(ide_drive_t *drive, const u8 speed)
242 u16 reg4042, reg4a; 242 u16 reg4042, reg4a;
243 u8 reg48, reg54, reg55; 243 u8 reg48, reg54, reg55;
244 244
245 if (speed >= XFER_PIO_0 && speed <= XFER_PIO_4) {
246 piix_tune_pio(drive, speed - XFER_PIO_0);
247 return ide_config_drive_speed(drive, speed);
248 }
249
245 pci_read_config_word(dev, maslave, &reg4042); 250 pci_read_config_word(dev, maslave, &reg4042);
246 sitre = (reg4042 & 0x4000) ? 1 : 0; 251 sitre = (reg4042 & 0x4000) ? 1 : 0;
247 pci_read_config_byte(dev, 0x48, &reg48); 252 pci_read_config_byte(dev, 0x48, &reg48);
@@ -259,11 +264,6 @@ static int piix_tune_chipset(ide_drive_t *drive, const u8 speed)
259 case XFER_MW_DMA_2: 264 case XFER_MW_DMA_2:
260 case XFER_MW_DMA_1: 265 case XFER_MW_DMA_1:
261 case XFER_SW_DMA_2: break; 266 case XFER_SW_DMA_2: break;
262 case XFER_PIO_4:
263 case XFER_PIO_3:
264 case XFER_PIO_2:
265 case XFER_PIO_1:
266 case XFER_PIO_0: break;
267 default: return -1; 267 default: return -1;
268 } 268 }
269 269
@@ -293,10 +293,7 @@ static int piix_tune_chipset(ide_drive_t *drive, const u8 speed)
293 pci_write_config_byte(dev, 0x55, (u8) reg55 & ~w_flag); 293 pci_write_config_byte(dev, 0x55, (u8) reg55 & ~w_flag);
294 } 294 }
295 295
296 if (speed > XFER_PIO_4) 296 piix_tune_pio(drive, piix_dma_2_pio(speed));
297 piix_tune_pio(drive, piix_dma_2_pio(speed));
298 else
299 piix_tune_pio(drive, speed - XFER_PIO_0);
300 297
301 return ide_config_drive_speed(drive, speed); 298 return ide_config_drive_speed(drive, speed);
302} 299}