diff options
-rw-r--r-- | drivers/ide/pci/serverworks.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/ide/pci/serverworks.c b/drivers/ide/pci/serverworks.c index 47bcd91c9b5f..b04c99059c05 100644 --- a/drivers/ide/pci/serverworks.c +++ b/drivers/ide/pci/serverworks.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/drivers/ide/pci/serverworks.c Version 0.9 Mar 4 2007 | 2 | * linux/drivers/ide/pci/serverworks.c Version 0.10 Jun 2 2007 |
3 | * | 3 | * |
4 | * Copyright (C) 1998-2000 Michel Aubry | 4 | * Copyright (C) 1998-2000 Michel Aubry |
5 | * Copyright (C) 1998-2000 Andrzej Krzysztofowicz | 5 | * Copyright (C) 1998-2000 Andrzej Krzysztofowicz |
@@ -170,7 +170,6 @@ static int svwks_tune_chipset (ide_drive_t *drive, u8 xferspeed) | |||
170 | if (!drive->init_speed) { | 170 | if (!drive->init_speed) { |
171 | u8 dma_stat = inb(hwif->dma_status); | 171 | u8 dma_stat = inb(hwif->dma_status); |
172 | 172 | ||
173 | dma_pio: | ||
174 | if (((ultra_enable << (7-drive->dn) & 0x80) == 0x80) && | 173 | if (((ultra_enable << (7-drive->dn) & 0x80) == 0x80) && |
175 | ((dma_stat & (1<<(5+unit))) == (1<<(5+unit)))) { | 174 | ((dma_stat & (1<<(5+unit))) == (1<<(5+unit)))) { |
176 | drive->current_speed = drive->init_speed = XFER_UDMA_0 + udma_modes[(ultra_timing >> (4*unit)) & ~(0xF0)]; | 175 | drive->current_speed = drive->init_speed = XFER_UDMA_0 + udma_modes[(ultra_timing >> (4*unit)) & ~(0xF0)]; |
@@ -179,7 +178,6 @@ dma_pio: | |||
179 | ((dma_stat&(1<<(5+unit)))==(1<<(5+unit)))) { | 178 | ((dma_stat&(1<<(5+unit)))==(1<<(5+unit)))) { |
180 | u8 dmaspeed = dma_timing; | 179 | u8 dmaspeed = dma_timing; |
181 | 180 | ||
182 | dma_timing &= ~0xFFU; | ||
183 | if ((dmaspeed & 0x20) == 0x20) | 181 | if ((dmaspeed & 0x20) == 0x20) |
184 | dmaspeed = XFER_MW_DMA_2; | 182 | dmaspeed = XFER_MW_DMA_2; |
185 | else if ((dmaspeed & 0x21) == 0x21) | 183 | else if ((dmaspeed & 0x21) == 0x21) |
@@ -190,10 +188,11 @@ dma_pio: | |||
190 | goto dma_pio; | 188 | goto dma_pio; |
191 | drive->current_speed = drive->init_speed = dmaspeed; | 189 | drive->current_speed = drive->init_speed = dmaspeed; |
192 | return 0; | 190 | return 0; |
193 | } else if (pio_timing) { | 191 | } |
192 | dma_pio: | ||
193 | if (pio_timing) { | ||
194 | u8 piospeed = pio_timing; | 194 | u8 piospeed = pio_timing; |
195 | 195 | ||
196 | pio_timing &= ~0xFFU; | ||
197 | if ((piospeed & 0x20) == 0x20) | 196 | if ((piospeed & 0x20) == 0x20) |
198 | piospeed = XFER_PIO_4; | 197 | piospeed = XFER_PIO_4; |
199 | else if ((piospeed & 0x22) == 0x22) | 198 | else if ((piospeed & 0x22) == 0x22) |
@@ -214,8 +213,8 @@ dma_pio: | |||
214 | 213 | ||
215 | oem_setup_failed: | 214 | oem_setup_failed: |
216 | 215 | ||
217 | pio_timing &= ~0xFFU; | 216 | pio_timing = 0; |
218 | dma_timing &= ~0xFFU; | 217 | dma_timing = 0; |
219 | ultra_timing &= ~(0x0F << (4*unit)); | 218 | ultra_timing &= ~(0x0F << (4*unit)); |
220 | ultra_enable &= ~(0x01 << drive->dn); | 219 | ultra_enable &= ~(0x01 << drive->dn); |
221 | csb5_pio &= ~(0x0F << (4*drive->dn)); | 220 | csb5_pio &= ~(0x0F << (4*drive->dn)); |