]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/ide/ide-dma.c
ide: add device flags
[linux-2.6-omap-h63xx.git] / drivers / ide / ide-dma.c
index 15e608f52eba352c767d63f20ad85413d8867ac4..2dacd802c72cad2a72714ed6ecc0245441a1e4b4 100644 (file)
@@ -106,7 +106,7 @@ ide_startstop_t ide_dma_intr (ide_drive_t *drive)
        dma_stat = hwif->dma_ops->dma_end(drive);
        stat = hwif->tp_ops->read_status(hwif);
 
-       if (OK_STAT(stat,DRIVE_READY,drive->bad_wstat|DRQ_STAT)) {
+       if (OK_STAT(stat, DRIVE_READY, drive->bad_wstat | ATA_DRQ)) {
                if (!dma_stat) {
                        struct request *rq = HWGROUP(drive)->rq;
 
@@ -397,7 +397,7 @@ EXPORT_SYMBOL_GPL(ide_dma_host_set);
 
 void ide_dma_off_quietly(ide_drive_t *drive)
 {
-       drive->using_dma = 0;
+       drive->dev_flags &= ~IDE_DFLAG_USING_DMA;
        ide_toggle_bounce(drive, 0);
 
        drive->hwif->dma_ops->dma_host_set(drive, 0);
@@ -430,7 +430,7 @@ EXPORT_SYMBOL(ide_dma_off);
 
 void ide_dma_on(ide_drive_t *drive)
 {
-       drive->using_dma = 1;
+       drive->dev_flags |= IDE_DFLAG_USING_DMA;
        ide_toggle_bounce(drive, 1);
 
        drive->hwif->dma_ops->dma_host_set(drive, 1);
@@ -727,7 +727,8 @@ static int ide_tune_dma(ide_drive_t *drive)
        ide_hwif_t *hwif = drive->hwif;
        u8 speed;
 
-       if (drive->nodma || ata_id_has_dma(drive->id) == 0)
+       if (ata_id_has_dma(drive->id) == 0 ||
+           (drive->dev_flags & IDE_DFLAG_NODMA))
                return 0;
 
        /* consult the list of known "bad" drives */