aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-probe.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-probe.c')
-rw-r--r--drivers/ide/ide-probe.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index d2faef17e548..e0316869eb6f 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -1356,9 +1356,6 @@ static void ide_init_port(ide_hwif_t *hwif, unsigned int port,
1356 if (d->init_iops) 1356 if (d->init_iops)
1357 d->init_iops(hwif); 1357 d->init_iops(hwif);
1358 1358
1359 if ((d->host_flags & IDE_HFLAG_NO_DMA) == 0)
1360 ide_hwif_setup_dma(hwif, d);
1361
1362 if ((!hwif->irq && (d->host_flags & IDE_HFLAG_LEGACY_IRQS)) || 1359 if ((!hwif->irq && (d->host_flags & IDE_HFLAG_LEGACY_IRQS)) ||
1363 (d->host_flags & IDE_HFLAG_FORCE_LEGACY_IRQS)) 1360 (d->host_flags & IDE_HFLAG_FORCE_LEGACY_IRQS))
1364 hwif->irq = port ? 15 : 14; 1361 hwif->irq = port ? 15 : 14;
@@ -1377,9 +1374,21 @@ static void ide_init_port(ide_hwif_t *hwif, unsigned int port,
1377 hwif->mwdma_mask = d->mwdma_mask; 1374 hwif->mwdma_mask = d->mwdma_mask;
1378 hwif->ultra_mask = d->udma_mask; 1375 hwif->ultra_mask = d->udma_mask;
1379 1376
1380 /* reset DMA masks only for SFF-style DMA controllers */ 1377 if ((d->host_flags & IDE_HFLAG_NO_DMA) == 0) {
1381 if ((d->host_flags & IDE_HFLAG_NO_DMA) == 0 && hwif->dma_base == 0) 1378 int rc;
1382 hwif->swdma_mask = hwif->mwdma_mask = hwif->ultra_mask = 0; 1379
1380 if (d->init_dma)
1381 rc = d->init_dma(hwif, d);
1382 else
1383 rc = ide_hwif_setup_dma(hwif, d);
1384
1385 if (rc < 0) {
1386 printk(KERN_INFO "%s: DMA disabled\n", hwif->name);
1387 hwif->swdma_mask = 0;
1388 hwif->mwdma_mask = 0;
1389 hwif->ultra_mask = 0;
1390 }
1391 }
1383 1392
1384 if (d->host_flags & IDE_HFLAG_RQSIZE_256) 1393 if (d->host_flags & IDE_HFLAG_RQSIZE_256)
1385 hwif->rqsize = 256; 1394 hwif->rqsize = 256;