Skip to contentSkip to conversation

How to Switch DMA off for only one Harddisk at Kernelboot

DISCUSSION Oliver Joa 6 participants 13 messages Dec 16, 2007 – Dec 29, 2007 libata

lore
Share & tools
lore

Oliver Joa

author
#0 lore raw

Hi,

how can I tell the kernel not to probe DMA for a specific harddisk (e.g. hda). My first Drive (hda) is a Compact-Flash Card which can not do DMA. The kernel tries at boot to switch to DMA but fails. If I use ide=nodma, the kernel boots about 2 minutes faster, but then I can not switch on DMA for the second Drive (hdc) which is a normal Harddisk. Do I have to live with this 2 minutes waiting time or is there another solution? I did not find any kernel-parameter for this purpose.

Sorry if I ask here, but I can not find any solution, and I asked already in other groups.

Thank you very much

Olli

#1 lore raw
Quoted 1 line · Oliver Joa

Hi,

Hi Oliver ,

Quoted 9 lines

how can I tell the kernel not to probe DMA for a specific harddisk (e.g. hda). My first Drive (hda) is a Compact-Flash Card which can not do DMA. The kernel tries at boot to switch to DMA but fails. If I use ide=nodma, the kernel boots about 2 minutes faster, but then I can not switch on DMA for the second Drive (hdc) which is a normal Harddisk. Do I have to live with this 2 minutes waiting time or is there another solution? I did not find any kernel-parameter for this purpose.

Quoted 4 lines

Sorry if I ask here, but I can not find any solution, and I asked already in other groups.

Thank you very much

Should work with hda=nodma or ideX=nodma ( where X is your HDD nr , in your case is 0 )

Also have a look at Documentation/ide.txt.

Quoted 1 line

Olli

Gabriel

author
#2 lore raw

Hi,

Quoted 5 lines · Gabriel C
Quoted 1 line · Oliver Joa

Hi,

Hi Oliver ,

Quoted 7 lines
Quoted 5 lines

how can I tell the kernel not to probe DMA for a specific harddisk (e.g. hda). My first Drive (hda) is a Compact-Flash Card which can not do DMA. The kernel tries at boot to switch to DMA but fails. If I use ide=nodma, the kernel boots about 2 minutes faster, but then I can not switch on DMA for the second Drive (hdc) which is a normal Harddisk. Do I have to live with this 2 minutes waiting time or is there another solution? I did not find any kernel-parameter for this purpose.

Sorry if I ask here, but I can not find any solution, and I asked already in other groups.

Thank you very much

Should work with hda=nodma or ideX=nodma ( where X is your HDD nr , in your case is 0 )

I tried this already, it does not work.

Quoted 1 line

Also have a look at Documentation/ide.txt.

I read this already. Searching for "nodma" in this document gives only one line:

"ide=nodma" : disable DMA globally for the IDE subsystem.

If the documentation is correct hda=nodma and ideX=nodma should not work. I use kernel 2.6.23.1 at the moment.

Thanks

Olli

#3 lore raw
Quoted 25 lines · Oliver Joa

Hi,

Quoted 12 lines · Gabriel C
Quoted 1 line · Oliver Joa

Hi,

Hi Oliver ,

Quoted 8 lines

how can I tell the kernel not to probe DMA for a specific harddisk (e.g. hda). My first Drive (hda) is a Compact-Flash Card which can not do DMA. The kernel tries at boot to switch to DMA but fails. If I use ide=nodma, the kernel boots about 2 minutes faster, but then I can not switch on DMA for the second Drive (hdc) which is a normal Harddisk. Do I have to live with this 2 minutes waiting time or is there another solution? I did not find any kernel-parameter for this purpose.

Quoted 5 lines
Quoted 4 lines

Sorry if I ask here, but I can not find any solution, and I asked already in other groups.

Thank you very much

Should work with hda=nodma or ideX=nodma ( where X is your HDD nr , in your case is 0 )

I tried this already, it does not work.

Quoted 1 line

Also have a look at Documentation/ide.txt.

Quoted 7 lines

I read this already. Searching for "nodma" in this document gives only one line:

"ide=nodma" : disable DMA globally for the IDE subsystem.

If the documentation is correct hda=nodma and ideX=nodma should not work. I use kernel 2.6.23.1 at the moment.

grep nodma Documentation/ide.txt
"hdx=nodma" : disallow DMA

ide=foo_option is for the whole ide sub-system where ideX|hdX=foo_option is just for that HDD.

Anyway I've CC'ed linux-ide.

Quoted 5 lines

Thanks

Olli

Gabriel

author
#4 lore raw

Hi,

Gabriel C wrote:

[...]

Quoted 11 lines
Quoted 6 lines
Quoted 1 line

Also have a look at Documentation/ide.txt.

I read this already. Searching for "nodma" in this document gives only one line:

"ide=nodma" : disable DMA globally for the IDE subsystem.

If the documentation is correct hda=nodma and ideX=nodma should not work. I use kernel 2.6.23.1 at the moment.

grep nodma Documentation/ide.txt
"hdx=nodma" : disallow DMA

ide=foo_option is for the whole ide sub-system where ideX|hdX=foo_option is just for that HDD.

/usr/src/linux-2.6.23.1$ grep nodma Documentation/ide.txt
"ide=nodma" : disable DMA globally for the IDE subsystem.

/usr/src/linux-2.6.21.5$ grep nodma Documentation/ide.txt
"ide=nodma" : disable DMA globally for the IDE subsystem.

/usr/src/linux-2.6.12# grep nodma Documentation/ide.txt
"ide=nodma" : disable DMA globally for the IDE subsystem.

Sorry, but I can not find this option, and it does not work. Which kernel do you use?

Thanks

Olli

#7 lore raw
In reply to Oliver Joa
Quoted 10 lines · On Sun, 16 Dec 2007 19:06:04 +0100 Oliver Joa <[email protected]> wrote:

Hi,

how can I tell the kernel not to probe DMA for a specific harddisk (e.g. hda). My first Drive (hda) is a Compact-Flash Card which can not do DMA. The kernel tries at boot to switch to DMA but fails. If I use ide=nodma, the kernel boots about 2 minutes faster, but then I can not switch on DMA for the second Drive (hdc) which is a normal Harddisk. Do I have to live with this 2 minutes waiting time or is there another solution? I did not find any kernel-parameter for this purpose.

Quoted 2 lines

Sorry if I ask here, but I can not find any solution, and I asked already in other groups.

For the current kernel and libata you can use libata.dma=3, and it will select DMA for disk (1) + CD (2) but not CF cards. With the older IDE it should be sufficient to use hda=nodma

Alan

#5 lore raw
In reply to Oliver Joa
Quoted 23 lines · Oliver Joa

Hi,

Gabriel C wrote:

[...]

Quoted 4 lines
Quoted 4 lines
Quoted 1 line

Also have a look at Documentation/ide.txt.

I read this already. Searching for "nodma" in this document gives only one line:

Quoted 8 lines
Quoted 4 lines

"ide=nodma" : disable DMA globally for the IDE subsystem.

If the documentation is correct hda=nodma and ideX=nodma should not work. I use kernel 2.6.23.1 at the moment.

grep nodma Documentation/ide.txt
"hdx=nodma" : disallow DMA

ide=foo_option is for the whole ide sub-system where ideX|hdX=foo_option is just for that HDD.

/usr/src/linux-2.6.23.1$ grep nodma Documentation/ide.txt
"ide=nodma" : disable DMA globally for the IDE subsystem.

Quoted 8 lines

/usr/src/linux-2.6.21.5$ grep nodma Documentation/ide.txt
"ide=nodma" : disable DMA globally for the IDE subsystem.

/usr/src/linux-2.6.12# grep nodma Documentation/ide.txt
"ide=nodma" : disable DMA globally for the IDE subsystem.

Sorry, but I can not find this option, and it does not work. Which kernel do you use?

This is my devel box , running 2.6.24-rc5-git

Quoted 5 lines

Thanks

Olli

Gabriel

author
#8 lore raw
In reply to Alan Cox

Hi,

Alan Cox wrote:

[...]

Quoted 3 lines

For the current kernel and libata you can use libata.dma=3, and it will select DMA for disk (1) + CD (2) but not CF cards. With the older IDE it should be sufficient to use hda=nodma

Thanks a lot, but it does not work:

If I use libata.dma=3 I get the following:

[    0.000000] Unknown boot option `libata.dma=3': ignoring

And if I use hda=nodma:

[    0.000000] ide_setup: hda=nodma -- BAD OPTION

I use kernel 2.6.21.5.

Any Idea?

Thanks

Olli

#9 lore raw
Quoted 13 lines · Oliver Joa

Hi,

Alan Cox wrote:

[...]

Quoted 3 lines

For the current kernel and libata you can use libata.dma=3, and it will select DMA for disk (1) + CD (2) but not CF cards. With the older IDE it should be sufficient to use hda=nodma

Thanks a lot, but it does not work:

If I use libata.dma=3 I get the following:

Quoted 8 lines
[    0.000000] Unknown boot option `libata.dma=3': ignoring

And if I use hda=nodma:

[    0.000000] ide_setup: hda=nodma -- BAD OPTION

I use kernel 2.6.21.5.

Any Idea?

"hdx=nodma" was added in 2.6.24-rc1, older kernels have only "ide=nodma"

Also "ide=nodma" may not work in older kernel with some buggy host drivers (they were fixed in 2.6.24-rc1).

Bart

#10 lore raw
In reply to Oliver Joa
Quoted 10 lines · Oliver Joa

how can I tell the kernel not to probe DMA for a specific harddisk (e.g. hda). My first Drive (hda) is a Compact-Flash Card which can not do DMA. The kernel tries at boot to switch to DMA but fails. If I use ide=nodma, the kernel boots about 2 minutes faster, but then I can not switch on DMA for the second Drive (hdc) which is a normal Harddisk. Do I have to live with this 2 minutes waiting time or is there another solution? I did not find any kernel-parameter for this purpose.

Sorry if I ask here, but I can not find any solution, and I asked already in other groups.

Isn't it more a matter of having a CF card that does do DMA and a controller that does DMA, but a CF to IDE adapter that does not do DMA?

If it is really a case of a CF card that claims to do DMA but is unstable if you try (I have found one model that does so), then it should simply be added to the ide dma blacklist instead.

I blacklisted 'SMART CF' on my system since they have random read errors and other i/o errors whenever DMA is enabled (while other cards work fine with DMA enabled). They claim to do DMA, but sure don't seem to do so reliably on this system. SiliconDrive CF works perfectly with DMA on the same system.

--
Len Sorensen

author
#11 lore raw

Hi,

Lennart Sorensen wrote:

[...]

Quoted 6 lines

Isn't it more a matter of having a CF card that does do DMA and a controller that does DMA, but a CF to IDE adapter that does not do DMA?

If it is really a case of a CF card that claims to do DMA but is unstable if you try (I have found one model that does so), then it should simply be added to the ide dma blacklist instead.

Maybe I will try this also, but for the moment it is running.

Quoted 5 lines

I blacklisted 'SMART CF' on my system since they have random read errors and other i/o errors whenever DMA is enabled (while other cards work fine with DMA enabled). They claim to do DMA, but sure don't seem to do so reliably on this system. SiliconDrive CF works perfectly with DMA on the same system.

It is working now with "hda=nodma" on kernel 2.6.24-rc5. Thanks to Bartlomiej Zolnierkiewicz who gave me the hint to use the newest kernel.

Thanks to all.

Olli

#12 lore raw
In reply to Lennart Sorensen
Quoted 2 lines

Isn't it more a matter of having a CF card that does do DMA and a controller that does DMA, but a CF to IDE adapter that does not do DMA?

Usually yes.

If your CF card doesn't support DMA it will advertise PIO modes only and all will be well. If your card can do DMA it will advertise DMA modes regardless of whether your CF adapter has the needed pins wired.

For UDMA it is even worse. Most CF adapters that can do DMA do not provide sufficient signal quality for UDMA. In addition if you hang them off a normal UDMA 2 device cable you are miles out of spec and some cards work some of the time.

Alan

#6 lore raw
In reply to Gabriel C

Hi Gabriel!

Quoted 27 lines · you
Quoted 26 lines · Oliver Joa

Hi,

Gabriel C wrote:

[...]

Quoted 4 lines
Quoted 4 lines
Quoted 1 line

Also have a look at Documentation/ide.txt.

I read this already. Searching for "nodma" in this document gives only one line:

Quoted 8 lines
Quoted 4 lines

"ide=nodma" : disable DMA globally for the IDE subsystem.

If the documentation is correct hda=nodma and ideX=nodma should not work. I use kernel 2.6.23.1 at the moment.

grep nodma Documentation/ide.txt
"hdx=nodma" : disallow DMA

ide=foo_option is for the whole ide sub-system where ideX|hdX=foo_option is just for that HDD.

/usr/src/linux-2.6.23.1$ grep nodma Documentation/ide.txt
"ide=nodma" : disable DMA globally for the IDE subsystem.

/usr/src/linux-2.6.21.5$ grep nodma Documentation/ide.txt
"ide=nodma" : disable DMA globally for the IDE subsystem.

Quoted 7 lines
Quoted 5 lines

/usr/src/linux-2.6.12# grep nodma Documentation/ide.txt
"ide=nodma" : disable DMA globally for the IDE subsystem.

Sorry, but I can not find this option, and it does not work. Which kernel do you use?

This is my devel box , running 2.6.24-rc5-git

Are you using modular or in-kernel IDE? Modules ignore cmdline options, so you must pass this parameter directly to ide_core (e.g. ide_core options="ide=nodma").

Signature · 1 line
WBR et al.