aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-26 14:13:02 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-26 14:13:02 -0500
commitf37aaf9edeba3f4ae10d22aefc09c06af9ea39b6 (patch)
tree167b73d875f3f5c36e9c4378d6e499cf08a46205 /drivers/ide
parent8ae60e34dd737ed3bef64b08130478393d9c4e8a (diff)
ide: move drive->using_dma check to callers of ->dma_host_on method
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ide-dma.c2
-rw-r--r--drivers/ide/ide-iops.c3
-rw-r--r--drivers/ide/pci/cs5520.c3
-rw-r--r--drivers/ide/pci/sc1200.c2
4 files changed, 5 insertions, 5 deletions
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c
index edd0018c4988..780911e0537e 100644
--- a/drivers/ide/ide-dma.c
+++ b/drivers/ide/ide-dma.c
@@ -471,7 +471,7 @@ EXPORT_SYMBOL(ide_dma_off);
471 471
472void ide_dma_host_on(ide_drive_t *drive) 472void ide_dma_host_on(ide_drive_t *drive)
473{ 473{
474 if (drive->using_dma) { 474 if (1) {
475 ide_hwif_t *hwif = HWIF(drive); 475 ide_hwif_t *hwif = HWIF(drive);
476 u8 unit = (drive->select.b.unit & 0x01); 476 u8 unit = (drive->select.b.unit & 0x01);
477 u8 dma_stat = hwif->INB(hwif->dma_status); 477 u8 dma_stat = hwif->INB(hwif->dma_status);
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c
index 76cb5f2bd4e6..e30f67e09b9c 100644
--- a/drivers/ide/ide-iops.c
+++ b/drivers/ide/ide-iops.c
@@ -799,7 +799,8 @@ int ide_config_drive_speed(ide_drive_t *drive, u8 speed)
799 799
800 skip: 800 skip:
801#ifdef CONFIG_BLK_DEV_IDEDMA 801#ifdef CONFIG_BLK_DEV_IDEDMA
802 if (speed >= XFER_SW_DMA_0 || (hwif->host_flags & IDE_HFLAG_VDMA)) 802 if ((speed >= XFER_SW_DMA_0 || (hwif->host_flags & IDE_HFLAG_VDMA)) &&
803 drive->using_dma)
803 hwif->dma_host_on(drive); 804 hwif->dma_host_on(drive);
804 else if (hwif->dma_host_on) /* check if host supports DMA */ 805 else if (hwif->dma_host_on) /* check if host supports DMA */
805 ide_dma_off_quietly(drive); 806 ide_dma_off_quietly(drive);
diff --git a/drivers/ide/pci/cs5520.c b/drivers/ide/pci/cs5520.c
index 78058ca2ce76..2bd52af83d37 100644
--- a/drivers/ide/pci/cs5520.c
+++ b/drivers/ide/pci/cs5520.c
@@ -109,8 +109,7 @@ static void cs5520_set_dma_mode(ide_drive_t *drive, const u8 speed)
109 109
110static void cs5520_dma_host_on(ide_drive_t *drive) 110static void cs5520_dma_host_on(ide_drive_t *drive)
111{ 111{
112 if (drive->using_dma) 112 drive->vdma = 1;
113 drive->vdma = 1;
114 113
115 ide_dma_host_on(drive); 114 ide_dma_host_on(drive);
116} 115}
diff --git a/drivers/ide/pci/sc1200.c b/drivers/ide/pci/sc1200.c
index 8a94c3e8f7c4..9303dfee7780 100644
--- a/drivers/ide/pci/sc1200.c
+++ b/drivers/ide/pci/sc1200.c
@@ -221,7 +221,7 @@ static void sc1200_set_pio_mode(ide_drive_t *drive, const u8 pio)
221 if (mode != -1) { 221 if (mode != -1) {
222 printk("SC1200: %s: changing (U)DMA mode\n", drive->name); 222 printk("SC1200: %s: changing (U)DMA mode\n", drive->name);
223 ide_dma_off_quietly(drive); 223 ide_dma_off_quietly(drive);
224 if (ide_set_dma_mode(drive, mode) == 0) 224 if (ide_set_dma_mode(drive, mode) == 0 && drive->using_dma)
225 hwif->dma_host_on(drive); 225 hwif->dma_host_on(drive);
226 return; 226 return;
227 } 227 }