aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/siimage.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/pci/siimage.c')
-rw-r--r--drivers/ide/pci/siimage.c29
1 files changed, 8 insertions, 21 deletions
diff --git a/drivers/ide/pci/siimage.c b/drivers/ide/pci/siimage.c
index 5709c252543b..7b45eaf5afd9 100644
--- a/drivers/ide/pci/siimage.c
+++ b/drivers/ide/pci/siimage.c
@@ -278,27 +278,14 @@ static void sil_set_dma_mode(ide_drive_t *drive, const u8 speed)
278 278
279 scsc = is_sata(hwif) ? 1 : scsc; 279 scsc = is_sata(hwif) ? 1 : scsc;
280 280
281 switch(speed) { 281 if (speed >= XFER_UDMA_0) {
282 case XFER_MW_DMA_2: 282 multi = dma[2];
283 case XFER_MW_DMA_1: 283 ultra |= (scsc ? ultra6[speed - XFER_UDMA_0] :
284 case XFER_MW_DMA_0: 284 ultra5[speed - XFER_UDMA_0]);
285 multi = dma[speed - XFER_MW_DMA_0]; 285 mode |= (unit ? 0x30 : 0x03);
286 mode |= ((unit) ? 0x20 : 0x02); 286 } else {
287 break; 287 multi = dma[speed - XFER_MW_DMA_0];
288 case XFER_UDMA_6: 288 mode |= (unit ? 0x20 : 0x02);
289 case XFER_UDMA_5:
290 case XFER_UDMA_4:
291 case XFER_UDMA_3:
292 case XFER_UDMA_2:
293 case XFER_UDMA_1:
294 case XFER_UDMA_0:
295 multi = dma[2];
296 ultra |= ((scsc) ? (ultra6[speed - XFER_UDMA_0]) :
297 (ultra5[speed - XFER_UDMA_0]));
298 mode |= ((unit) ? 0x30 : 0x03);
299 break;
300 default:
301 return;
302 } 289 }
303 290
304 if (hwif->mmio) { 291 if (hwif->mmio) {