diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-10-11 17:54:01 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-10-11 17:54:01 -0400 |
commit | 90986028c98be10807bb6f48e883f33fa20e5499 (patch) | |
tree | 0350e6fb27b98529222d1c5b501817349c163c42 /drivers/ide/pci/slc90e66.c | |
parent | a6fe837ed63aa812bea029a24b7aafc72ba8de88 (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/slc90e66.c')
-rw-r--r-- | drivers/ide/pci/slc90e66.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/ide/pci/slc90e66.c b/drivers/ide/pci/slc90e66.c index 214d396fc31f..967b939e9d2e 100644 --- a/drivers/ide/pci/slc90e66.c +++ b/drivers/ide/pci/slc90e66.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/drivers/ide/pci/slc90e66.c Version 0.15 Jul 6, 2007 | 2 | * linux/drivers/ide/pci/slc90e66.c Version 0.16 Jul 14, 2007 |
3 | * | 3 | * |
4 | * Copyright (C) 2000-2002 Andre Hedrick <andre@linux-ide.org> | 4 | * Copyright (C) 2000-2002 Andre Hedrick <andre@linux-ide.org> |
5 | * Copyright (C) 2006-2007 MontaVista Software, Inc. <source@mvista.com> | 5 | * Copyright (C) 2006-2007 MontaVista Software, Inc. <source@mvista.com> |
@@ -110,6 +110,11 @@ static int slc90e66_tune_chipset(ide_drive_t *drive, const u8 speed) | |||
110 | int u_speed = 0, u_flag = 1 << drive->dn; | 110 | int u_speed = 0, u_flag = 1 << drive->dn; |
111 | u16 reg4042, reg44, reg48, reg4a; | 111 | u16 reg4042, reg44, reg48, reg4a; |
112 | 112 | ||
113 | if (speed >= XFER_PIO_0 && speed <= XFER_PIO_4) { | ||
114 | slc90e66_tune_pio(drive, speed - XFER_PIO_0); | ||
115 | return ide_config_drive_speed(drive, speed); | ||
116 | } | ||
117 | |||
113 | pci_read_config_word(dev, maslave, ®4042); | 118 | pci_read_config_word(dev, maslave, ®4042); |
114 | sitre = (reg4042 & 0x4000) ? 1 : 0; | 119 | sitre = (reg4042 & 0x4000) ? 1 : 0; |
115 | pci_read_config_word(dev, 0x44, ®44); | 120 | pci_read_config_word(dev, 0x44, ®44); |
@@ -125,11 +130,6 @@ static int slc90e66_tune_chipset(ide_drive_t *drive, const u8 speed) | |||
125 | case XFER_MW_DMA_2: | 130 | case XFER_MW_DMA_2: |
126 | case XFER_MW_DMA_1: | 131 | case XFER_MW_DMA_1: |
127 | case XFER_SW_DMA_2: break; | 132 | case XFER_SW_DMA_2: break; |
128 | case XFER_PIO_4: | ||
129 | case XFER_PIO_3: | ||
130 | case XFER_PIO_2: | ||
131 | case XFER_PIO_1: | ||
132 | case XFER_PIO_0: break; | ||
133 | default: return -1; | 133 | default: return -1; |
134 | } | 134 | } |
135 | 135 | ||
@@ -149,10 +149,7 @@ static int slc90e66_tune_chipset(ide_drive_t *drive, const u8 speed) | |||
149 | pci_write_config_word(dev, 0x4a, reg4a & ~a_speed); | 149 | pci_write_config_word(dev, 0x4a, reg4a & ~a_speed); |
150 | } | 150 | } |
151 | 151 | ||
152 | if (speed > XFER_PIO_4) | 152 | slc90e66_tune_pio(drive, slc90e66_dma_2_pio(speed)); |
153 | slc90e66_tune_pio(drive, slc90e66_dma_2_pio(speed)); | ||
154 | else | ||
155 | slc90e66_tune_pio(drive, speed - XFER_PIO_0); | ||
156 | 153 | ||
157 | return ide_config_drive_speed(drive, speed); | 154 | return ide_config_drive_speed(drive, speed); |
158 | } | 155 | } |