Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f37aaf9edeba3f4ae10d22aefc09c06af9ea39b6
Commit:     f37aaf9edeba3f4ae10d22aefc09c06af9ea39b6
Parent:     8ae60e34dd737ed3bef64b08130478393d9c4e8a
Author:     Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
AuthorDate: Sat Jan 26 20:13:02 2008 +0100
Committer:  Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
CommitDate: Sat Jan 26 20:13:02 2008 +0100

    ide: move drive->using_dma check to callers of ->dma_host_on method
    
    Acked-by: Sergei Shtylyov <[EMAIL PROTECTED]>
    Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
 drivers/ide/ide-dma.c    |    2 +-
 drivers/ide/ide-iops.c   |    3 ++-
 drivers/ide/pci/cs5520.c |    3 +--
 drivers/ide/pci/sc1200.c |    2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c
index edd0018..780911e 100644
--- a/drivers/ide/ide-dma.c
+++ b/drivers/ide/ide-dma.c
@@ -471,7 +471,7 @@ EXPORT_SYMBOL(ide_dma_off);
 
 void ide_dma_host_on(ide_drive_t *drive)
 {
-       if (drive->using_dma) {
+       if (1) {
                ide_hwif_t *hwif        = HWIF(drive);
                u8 unit                 = (drive->select.b.unit & 0x01);
                u8 dma_stat             = hwif->INB(hwif->dma_status);
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c
index 76cb5f2..e30f67e 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)
 
  skip:
 #ifdef CONFIG_BLK_DEV_IDEDMA
-       if (speed >= XFER_SW_DMA_0 || (hwif->host_flags & IDE_HFLAG_VDMA))
+       if ((speed >= XFER_SW_DMA_0 || (hwif->host_flags & IDE_HFLAG_VDMA)) &&
+           drive->using_dma)
                hwif->dma_host_on(drive);
        else if (hwif->dma_host_on)     /* check if host supports DMA */
                ide_dma_off_quietly(drive);
diff --git a/drivers/ide/pci/cs5520.c b/drivers/ide/pci/cs5520.c
index 78058ca..2bd52af 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)
 
 static void cs5520_dma_host_on(ide_drive_t *drive)
 {
-       if (drive->using_dma)
-               drive->vdma = 1;
+       drive->vdma = 1;
 
        ide_dma_host_on(drive);
 }
diff --git a/drivers/ide/pci/sc1200.c b/drivers/ide/pci/sc1200.c
index 8a94c3e..9303dfe 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)
        if (mode != -1) {
                printk("SC1200: %s: changing (U)DMA mode\n", drive->name);
                ide_dma_off_quietly(drive);
-               if (ide_set_dma_mode(drive, mode) == 0)
+               if (ide_set_dma_mode(drive, mode) == 0 && drive->using_dma)
                        hwif->dma_host_on(drive);
                return;
        }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to