aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-05-04 11:03:41 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-05-04 11:03:41 -0400
commit1024c5f4be4fc5b00337464fb8a442bebf15df68 (patch)
tree2304eeb193c66540ce1f6c767cae97d40d1cd7d6 /drivers/ide
parentafa26be86b65a7183ceac29bdf1f51d6fc6932f0 (diff)
ide: IDE_HFLAG_SERIALIZE_DMA bugfix
Patch re-ordering could be harmful: commit 1fd1890594bd355a4217f5658a34763e77decee3 Author: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Date: Sat Apr 26 22:25:24 2008 +0200 ide: add IDE_HFLAG_SERIALIZE_DMA host flag ... is buggy because ->init_dma method / ide_hwif_setup_dma() is called before IDE_HFLAG_SERIALIZE_DMA host flag is checked. Fix it by checking IDE_HFLAG_SERIALIZE[_DMA] after DMA initialization. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ide-probe.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index 591deda3f86..34b0d4f26b5 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -1355,12 +1355,6 @@ static void ide_init_port(ide_hwif_t *hwif, unsigned int port,
1355 if (hwif->chipset != ide_dtc2278 || hwif->channel == 0) 1355 if (hwif->chipset != ide_dtc2278 || hwif->channel == 0)
1356 hwif->port_ops = d->port_ops; 1356 hwif->port_ops = d->port_ops;
1357 1357
1358 if ((d->host_flags & IDE_HFLAG_SERIALIZE) ||
1359 ((d->host_flags & IDE_HFLAG_SERIALIZE_DMA) && hwif->dma_base)) {
1360 if (hwif->mate)
1361 hwif->mate->serialized = hwif->serialized = 1;
1362 }
1363
1364 hwif->swdma_mask = d->swdma_mask; 1358 hwif->swdma_mask = d->swdma_mask;
1365 hwif->mwdma_mask = d->mwdma_mask; 1359 hwif->mwdma_mask = d->mwdma_mask;
1366 hwif->ultra_mask = d->udma_mask; 1360 hwif->ultra_mask = d->udma_mask;
@@ -1382,6 +1376,12 @@ static void ide_init_port(ide_hwif_t *hwif, unsigned int port,
1382 hwif->dma_ops = d->dma_ops; 1376 hwif->dma_ops = d->dma_ops;
1383 } 1377 }
1384 1378
1379 if ((d->host_flags & IDE_HFLAG_SERIALIZE) ||
1380 ((d->host_flags & IDE_HFLAG_SERIALIZE_DMA) && hwif->dma_base)) {
1381 if (hwif->mate)
1382 hwif->mate->serialized = hwif->serialized = 1;
1383 }
1384
1385 if (d->host_flags & IDE_HFLAG_RQSIZE_256) 1385 if (d->host_flags & IDE_HFLAG_RQSIZE_256)
1386 hwif->rqsize = 256; 1386 hwif->rqsize = 256;
1387 1387