summaryrefslogtreecommitdiff
path: root/linux/src/drivers/block/ide.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/src/drivers/block/ide.c')
-rw-r--r--linux/src/drivers/block/ide.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/linux/src/drivers/block/ide.c b/linux/src/drivers/block/ide.c
index 7b639f7..41a2601 100644
--- a/linux/src/drivers/block/ide.c
+++ b/linux/src/drivers/block/ide.c
@@ -2526,7 +2526,7 @@ static inline void do_identify (ide_drive_t *drive, byte cmd)
drive->media = ide_tape;
drive->present = 1;
drive->removable = 1;
- if (drive->autotune != 2 && HWIF(drive)->dmaproc != NULL) {
+ if (drive->autotune != 2 && HWIF(drive)->dmaproc != NULL && !drive->nodma) {
if (!HWIF(drive)->dmaproc(ide_dma_check, drive))
printk(", DMA");
}
@@ -2653,7 +2653,7 @@ static inline void do_identify (ide_drive_t *drive, byte cmd)
if (drive->mult_req || ((id->multsect_valid & 1) && id->multsect))
drive->special.b.set_multmode = 1;
}
- if (drive->autotune != 2 && HWIF(drive)->dmaproc != NULL) {
+ if (drive->autotune != 2 && HWIF(drive)->dmaproc != NULL && !drive->nodma) {
if (!(HWIF(drive)->dmaproc(ide_dma_check, drive))) {
if ((id->field_valid & 4) && (id->dma_ultra & (id->dma_ultra >> 8) & 7))
printk(", UDMA");
@@ -3108,6 +3108,7 @@ static int match_parm (char *s, const char *keywords[], int vals[], int max_vals
* Not fully supported by all chipset types,
* and quite likely to cause trouble with
* older/odd IDE drives.
+ * "hdx=nodma" : disallow DMA for the drive
*
* "idebus=xx" : inform IDE driver of VESA/PCI bus speed in Mhz,
* where "xx" is between 20 and 66 inclusive,
@@ -3172,7 +3173,7 @@ void ide_setup (char *s)
#endif
const char *hd_words[] = {"none", "noprobe", "nowerr", "cdrom",
"serialize", "autotune", "noautotune",
- "slow", "ide-scsi", NULL};
+ "slow", "ide-scsi", "nodma", NULL};
#ifdef MACH
unit = s[2] - '0';
#else
@@ -3212,6 +3213,9 @@ void ide_setup (char *s)
case -9: /* "ide-scsi" */
drive->ide_scsi = 1;
goto done;
+ case -10: /* "nodma" */
+ drive->nodma = 1;
+ goto done;
case 3: /* cyl,head,sect */
drive->media = ide_disk;
drive->cyl = drive->bios_cyl = vals[0];