Commit ad425cf4 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Linus Torvalds

[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.
parent d02c0353
......@@ -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,
......
......@@ -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)
};
......
......@@ -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,
......
......@@ -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,
......
......@@ -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,
......
......@@ -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;
}
......
......@@ -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,
......
......@@ -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 *);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment