From ad425cf493fb719430154b5db87242ef3ea6c463 Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Wed, 3 Sep 2003 20:11:54 -0700 Subject: [PATCH] [PATCH] ide: remove supports_dma field from ide_driver_t driver->supports_dma was used together with CONFIG_IDEDMA_ONLYDISK to limit DMA access to disk devices only. However Alan introduced new scheme in 2.5.63 and this field is not needed any longer because all ide drivers support DMA. --- drivers/ide/ide-cd.c | 1 - drivers/ide/ide-default.c | 6 ------ drivers/ide/ide-disk.c | 1 - drivers/ide/ide-floppy.c | 1 - drivers/ide/ide-tape.c | 1 - drivers/ide/ide.c | 5 ----- drivers/scsi/ide-scsi.c | 1 - include/linux/ide.h | 1 - 8 files changed, 17 deletions(-) diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index 578476e1e931c..fd5874b891dba 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c @@ -3318,7 +3318,6 @@ static ide_driver_t ide_cdrom_driver = { .version = IDECD_VERSION, .media = ide_cdrom, .busy = 0, - .supports_dma = 1, .supports_dsc_overlap = 1, .cleanup = ide_cdrom_cleanup, .do_request = ide_do_rw_cdrom, diff --git a/drivers/ide/ide-default.c b/drivers/ide/ide-default.c index 40ecc4de0c058..0c251121a7407 100644 --- a/drivers/ide/ide-default.c +++ b/drivers/ide/ide-default.c @@ -40,18 +40,12 @@ static int idedefault_attach(ide_drive_t *drive); /* * IDE subdriver functions, registered with ide.c - * - * idedefault *must* support DMA because it will be - * attached before the other drivers are loaded and - * we don't want to lose the DMA status at probe - * time. */ ide_driver_t idedefault_driver = { .name = "ide-default", .version = IDEDEFAULT_VERSION, .attach = idedefault_attach, - .supports_dma = 1, .drives = LIST_HEAD_INIT(idedefault_driver.drives) }; diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c index 1217e840ac023..39693bcc7d0fa 100644 --- a/drivers/ide/ide-disk.c +++ b/drivers/ide/ide-disk.c @@ -1716,7 +1716,6 @@ static ide_driver_t idedisk_driver = { .version = IDEDISK_VERSION, .media = ide_disk, .busy = 0, - .supports_dma = 1, .supports_dsc_overlap = 0, .cleanup = idedisk_cleanup, .flushcache = do_idedisk_flushcache, diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c index 112dc8b8676d9..4a2a7273b8b4e 100644 --- a/drivers/ide/ide-floppy.c +++ b/drivers/ide/ide-floppy.c @@ -1854,7 +1854,6 @@ static ide_driver_t idefloppy_driver = { .version = IDEFLOPPY_VERSION, .media = ide_floppy, .busy = 0, - .supports_dma = 1, .supports_dsc_overlap = 0, .cleanup = idefloppy_cleanup, .do_request = idefloppy_do_request, diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index e2bdaa457727e..6c8c067df5a75 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c @@ -6316,7 +6316,6 @@ static ide_driver_t idetape_driver = { .version = IDETAPE_VERSION, .media = ide_tape, .busy = 1, - .supports_dma = 1, .supports_dsc_overlap = 1, .cleanup = idetape_cleanup, .do_request = idetape_do_request, diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index dfb03f9a423f4..b6b7c97bf0904 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c @@ -1359,8 +1359,6 @@ static int set_io_32bit(ide_drive_t *drive, int arg) static int set_using_dma (ide_drive_t *drive, int arg) { - if (!DRIVER(drive)->supports_dma) - return -EPERM; if (!drive->id || !(drive->id->capability & 1)) return -EPERM; if (HWIF(drive)->ide_dma_check == NULL) @@ -2452,9 +2450,6 @@ int ide_register_subdriver (ide_drive_t *drive, ide_driver_t *driver, int versio if ((drive->autotune == IDE_TUNE_DEFAULT) || (drive->autotune == IDE_TUNE_AUTO)) { /* DMA timings and setup moved to ide-probe.c */ - if (!driver->supports_dma && HWIF(drive)->ide_dma_off_quietly) -// HWIF(drive)->ide_dma_off_quietly(drive); - HWIF(drive)->ide_dma_off(drive); drive->dsc_overlap = (drive->next != drive && driver->supports_dsc_overlap); drive->nice1 = 1; } diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c index b270dac4e2d23..b631105fbdb20 100644 --- a/drivers/scsi/ide-scsi.c +++ b/drivers/scsi/ide-scsi.c @@ -627,7 +627,6 @@ static ide_driver_t idescsi_driver = { .version = IDESCSI_VERSION, .media = ide_scsi, .busy = 0, - .supports_dma = 1, .supports_dsc_overlap = 0, .attach = idescsi_attach, .cleanup = idescsi_cleanup, diff --git a/include/linux/ide.h b/include/linux/ide.h index 4664fd44a9862..e7c50528e10e2 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h @@ -1218,7 +1218,6 @@ typedef struct ide_driver_s { const char *version; u8 media; unsigned busy : 1; - unsigned supports_dma : 1; unsigned supports_dsc_overlap : 1; int (*cleanup)(ide_drive_t *); int (*shutdown)(ide_drive_t *); -- 2.53.0