aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-10-16 22:29:58 +0200
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-10-16 22:29:58 +0200
commitc223701cf6c706f42840631c1ca919a18e6e2800 (patch)
tree0ae93a4a36e874d5e1378e5e2d032a81e71350f7 /drivers/ide
parent9ff6f72f432364991d68e99cae72cb141c166e70 (diff)
downloadkernel_samsung_aries-c223701cf6c706f42840631c1ca919a18e6e2800.zip
kernel_samsung_aries-c223701cf6c706f42840631c1ca919a18e6e2800.tar.gz
kernel_samsung_aries-c223701cf6c706f42840631c1ca919a18e6e2800.tar.bz2
ide: add "hdx=nodma" kernel parameter
* Add "hdx=nodma" option allowing user to disallow DMA for a given device. * Obsolete "ide=nodma" option. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ide-dma.c2
-rw-r--r--drivers/ide/ide.c7
2 files changed, 6 insertions, 3 deletions
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c
index 45fa1ef..bc57ce6 100644
--- a/drivers/ide/ide-dma.c
+++ b/drivers/ide/ide-dma.c
@@ -759,7 +759,7 @@ static int ide_tune_dma(ide_drive_t *drive)
{
u8 speed;
- if (noautodma || (drive->id->capability & 1) == 0)
+ if (noautodma || drive->nodma || (drive->id->capability & 1) == 0)
return 0;
/* consult the list of known "bad" drives */
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index 27c4fe2..5b09066 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -1272,7 +1272,7 @@ static int __init ide_setup(char *s)
if (!strcmp(s, "ide=nodma")) {
printk(" : Prevented DMA\n");
noautodma = 1;
- return 1;
+ goto obsolete_option;
}
#ifdef CONFIG_IDEPCI_PCIBUS_ORDER
@@ -1306,7 +1306,7 @@ static int __init ide_setup(char *s)
*/
if (s[0] == 'h' && s[1] == 'd' && s[2] >= 'a' && s[2] <= max_drive) {
const char *hd_words[] = {
- "none", "noprobe", "nowerr", "cdrom", "minus5",
+ "none", "noprobe", "nowerr", "cdrom", "nodma",
"autotune", "noautotune", "minus8", "swapdata", "bswap",
"noflush", "remap", "remap63", "scsi", NULL };
unit = s[2] - 'a';
@@ -1334,6 +1334,9 @@ static int __init ide_setup(char *s)
drive->ready_stat = 0;
hwif->noprobe = 0;
goto done;
+ case -5: /* nodma */
+ drive->nodma = 1;
+ goto done;
case -6: /* "autotune" */
drive->autotune = IDE_TUNE_AUTO;
goto obsolete_option;