diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-13 21:39:36 +0200 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-13 21:39:36 +0200 |
commit | 97100fc816badbbc162644cfde7ad39ae9211fb4 (patch) | |
tree | 904faf5453c2dea32fa3fde5fda230118f3effda /drivers/ide/ide-dma.c | |
parent | be3c096ebdbe3c828aacb5473751a22840753eff (diff) | |
download | linux-97100fc816badbbc162644cfde7ad39ae9211fb4.tar.bz2 |
ide: add device flags
Add 'unsigned long dev_flags' to ide_drive_t and convert bitfields
to IDE_DFLAG_* flags.
While at it:
- IDE_DFLAG_ADDRESSING -> IDE_DFLAG_LBA48
- fixup some comments
- remove needless g->flags zeroing from ide*_probe()
There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-dma.c')
-rw-r--r-- | drivers/ide/ide-dma.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c index ef2f1504c0d5..2dacd802c72c 100644 --- a/drivers/ide/ide-dma.c +++ b/drivers/ide/ide-dma.c @@ -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 */ |