From: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] ide: remove supports_dma field from ide_driver_t
Date: Tue, 2 Sep 2003 20:36:16 +0200 [thread overview]
Message-ID: <200309022036.16612.bzolnier@elka.pw.edu.pl> (raw)
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 -puN drivers/ide/ide.c~ide-supports-dma drivers/ide/ide.c
--- linux-2.6.0-test4-bk3/drivers/ide/ide.c~ide-supports-dma 2003-09-02 18:03:17.925980888 +0200
+++ linux-2.6.0-test4-bk3-root/drivers/ide/ide.c 2003-09-02 18:03:17.955976328 +0200
@@ -1359,8 +1359,6 @@ static int set_io_32bit(ide_drive_t *dri
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)
@@ -2443,9 +2441,6 @@ int ide_register_subdriver (ide_drive_t
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 -puN drivers/ide/ide-cd.c~ide-supports-dma drivers/ide/ide-cd.c
--- linux-2.6.0-test4-bk3/drivers/ide/ide-cd.c~ide-supports-dma 2003-09-02 18:03:17.929980280 +0200
+++ linux-2.6.0-test4-bk3-root/drivers/ide/ide-cd.c 2003-09-02 18:03:17.958975872 +0200
@@ -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 -puN drivers/ide/ide-default.c~ide-supports-dma drivers/ide/ide-default.c
--- linux-2.6.0-test4-bk3/drivers/ide/ide-default.c~ide-supports-dma 2003-09-02 18:03:17.932979824 +0200
+++ linux-2.6.0-test4-bk3-root/drivers/ide/ide-default.c 2003-09-02 18:03:17.958975872 +0200
@@ -40,18 +40,12 @@ static int idedefault_attach(ide_drive_t
/*
* 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 -puN drivers/ide/ide-disk.c~ide-supports-dma drivers/ide/ide-disk.c
--- linux-2.6.0-test4-bk3/drivers/ide/ide-disk.c~ide-supports-dma 2003-09-02 18:03:17.935979368 +0200
+++ linux-2.6.0-test4-bk3-root/drivers/ide/ide-disk.c 2003-09-02 18:03:17.960975568 +0200
@@ -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 -puN drivers/ide/ide-floppy.c~ide-supports-dma drivers/ide/ide-floppy.c
--- linux-2.6.0-test4-bk3/drivers/ide/ide-floppy.c~ide-supports-dma 2003-09-02 18:03:17.939978760 +0200
+++ linux-2.6.0-test4-bk3-root/drivers/ide/ide-floppy.c 2003-09-02 18:03:17.961975416 +0200
@@ -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 -puN drivers/ide/ide-tape.c~ide-supports-dma drivers/ide/ide-tape.c
--- linux-2.6.0-test4-bk3/drivers/ide/ide-tape.c~ide-supports-dma 2003-09-02 18:03:17.943978152 +0200
+++ linux-2.6.0-test4-bk3-root/drivers/ide/ide-tape.c 2003-09-02 18:03:17.966974656 +0200
@@ -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 -puN drivers/scsi/ide-scsi.c~ide-supports-dma drivers/scsi/ide-scsi.c
--- linux-2.6.0-test4-bk3/drivers/scsi/ide-scsi.c~ide-supports-dma 2003-09-02 18:03:17.946977696 +0200
+++ linux-2.6.0-test4-bk3-root/drivers/scsi/ide-scsi.c 2003-09-02 18:03:17.967974504 +0200
@@ -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 -puN include/linux/ide.h~ide-supports-dma include/linux/ide.h
--- linux-2.6.0-test4-bk3/include/linux/ide.h~ide-supports-dma 2003-09-02 18:03:17.949977240 +0200
+++ linux-2.6.0-test4-bk3-root/include/linux/ide.h 2003-09-02 18:03:17.968974352 +0200
@@ -1216,7 +1216,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 *);
_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
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 -puN drivers/ide/ide.c~ide-supports-dma drivers/ide/ide.c
--- linux-2.6.0-test4-bk3/drivers/ide/ide.c~ide-supports-dma 2003-09-02 18:03:17.925980888 +0200
+++ linux-2.6.0-test4-bk3-root/drivers/ide/ide.c 2003-09-02 18:03:17.955976328 +0200
@@ -1359,8 +1359,6 @@ static int set_io_32bit(ide_drive_t *dri
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)
@@ -2443,9 +2441,6 @@ int ide_register_subdriver (ide_drive_t
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 -puN drivers/ide/ide-cd.c~ide-supports-dma drivers/ide/ide-cd.c
--- linux-2.6.0-test4-bk3/drivers/ide/ide-cd.c~ide-supports-dma 2003-09-02 18:03:17.929980280 +0200
+++ linux-2.6.0-test4-bk3-root/drivers/ide/ide-cd.c 2003-09-02 18:03:17.958975872 +0200
@@ -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 -puN drivers/ide/ide-default.c~ide-supports-dma drivers/ide/ide-default.c
--- linux-2.6.0-test4-bk3/drivers/ide/ide-default.c~ide-supports-dma 2003-09-02 18:03:17.932979824 +0200
+++ linux-2.6.0-test4-bk3-root/drivers/ide/ide-default.c 2003-09-02 18:03:17.958975872 +0200
@@ -40,18 +40,12 @@ static int idedefault_attach(ide_drive_t
/*
* 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 -puN drivers/ide/ide-disk.c~ide-supports-dma drivers/ide/ide-disk.c
--- linux-2.6.0-test4-bk3/drivers/ide/ide-disk.c~ide-supports-dma 2003-09-02 18:03:17.935979368 +0200
+++ linux-2.6.0-test4-bk3-root/drivers/ide/ide-disk.c 2003-09-02 18:03:17.960975568 +0200
@@ -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 -puN drivers/ide/ide-floppy.c~ide-supports-dma drivers/ide/ide-floppy.c
--- linux-2.6.0-test4-bk3/drivers/ide/ide-floppy.c~ide-supports-dma 2003-09-02 18:03:17.939978760 +0200
+++ linux-2.6.0-test4-bk3-root/drivers/ide/ide-floppy.c 2003-09-02 18:03:17.961975416 +0200
@@ -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 -puN drivers/ide/ide-tape.c~ide-supports-dma drivers/ide/ide-tape.c
--- linux-2.6.0-test4-bk3/drivers/ide/ide-tape.c~ide-supports-dma 2003-09-02 18:03:17.943978152 +0200
+++ linux-2.6.0-test4-bk3-root/drivers/ide/ide-tape.c 2003-09-02 18:03:17.966974656 +0200
@@ -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 -puN drivers/scsi/ide-scsi.c~ide-supports-dma drivers/scsi/ide-scsi.c
--- linux-2.6.0-test4-bk3/drivers/scsi/ide-scsi.c~ide-supports-dma 2003-09-02 18:03:17.946977696 +0200
+++ linux-2.6.0-test4-bk3-root/drivers/scsi/ide-scsi.c 2003-09-02 18:03:17.967974504 +0200
@@ -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 -puN include/linux/ide.h~ide-supports-dma include/linux/ide.h
--- linux-2.6.0-test4-bk3/include/linux/ide.h~ide-supports-dma 2003-09-02 18:03:17.949977240 +0200
+++ linux-2.6.0-test4-bk3-root/include/linux/ide.h 2003-09-02 18:03:17.968974352 +0200
@@ -1216,7 +1216,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 *);
_
reply other threads:[~2003-09-02 18:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200309022036.16612.bzolnier@elka.pw.edu.pl \
--to=b.zolnierkiewicz@elka.pw.edu.pl \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®