2007-12-16 18:38:25

by Oliver Joa

[permalink] [raw]
Subject: How to Switch DMA off for only one Harddisk at Kernelboot

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


2007-12-16 19:25:42

by Gabriel C

[permalink] [raw]
Subject: Re: How to Switch DMA off for only one Harddisk at Kernelboot

Oliver Joa wrote:
> Hi,

Hi Oliver ,

>
> 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 )

Also have a look at Documentation/ide.txt.

> Olli

Gabriel

2007-12-16 19:33:26

by Oliver Joa

[permalink] [raw]
Subject: Re: How to Switch DMA off for only one Harddisk at Kernelboot

Hi,

Gabriel C wrote:
> Oliver Joa wrote:
>> Hi,
>
> Hi Oliver ,
>
>> 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.

> 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

2007-12-16 19:45:55

by Gabriel C

[permalink] [raw]
Subject: Re: How to Switch DMA off for only one Harddisk at Kernelboot

Oliver Joa wrote:
> Hi,
>
> Gabriel C wrote:
>> Oliver Joa wrote:
>>> Hi,
>> Hi Oliver ,
>>
>>> 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.
>
>> 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.

Anyway I've CC'ed linux-ide.

>
> Thanks
>
> Olli
>


Gabriel

2007-12-16 19:53:36

by Oliver Joa

[permalink] [raw]
Subject: Re: How to Switch DMA off for only one Harddisk at Kernelboot

Hi,

Gabriel C wrote:

[...]

>>> 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

2007-12-16 20:23:25

by Alan

[permalink] [raw]
Subject: Re: How to Switch DMA off for only one Harddisk at Kernelboot

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.
>
> 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

2007-12-16 20:31:32

by Gabriel C

[permalink] [raw]
Subject: Re: How to Switch DMA off for only one Harddisk at Kernelboot

Oliver Joa wrote:
> Hi,
>
> Gabriel C wrote:
>
> [...]
>
>>>> 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?

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

>
> Thanks
>
> Olli
>

Gabriel

2007-12-17 11:17:49

by Oliver Joa

[permalink] [raw]
Subject: Re: How to Switch DMA off for only one Harddisk at Kernelboot

Hi,

Alan Cox wrote:

[...]

> 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

Subject: Re: How to Switch DMA off for only one Harddisk at Kernelboot

On Monday 17 December 2007, Oliver Joa wrote:
> Hi,
>
> Alan Cox wrote:
>
> [...]
>
> > 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?

"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

2007-12-17 22:32:34

by Lennart Sorensen

[permalink] [raw]
Subject: Re: How to Switch DMA off for only one Harddisk at Kernelboot

On Sun, Dec 16, 2007 at 07:06:04PM +0100, Oliver Joa wrote:
> 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

2007-12-17 23:49:18

by Oliver Joa

[permalink] [raw]
Subject: Re: How to Switch DMA off for only one Harddisk at Kernelboot

Hi,

Lennart Sorensen wrote:

[...]

> 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.

> 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

2007-12-18 00:11:06

by Alan

[permalink] [raw]
Subject: Re: How to Switch DMA off for only one Harddisk at Kernelboot

> 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

2007-12-29 12:23:46

by Konstantin A. Lepikhov

[permalink] [raw]
Subject: Re: How to Switch DMA off for only one Harddisk at Kernelboot

Hi Gabriel!

Sunday 16, at 09:31:17 PM you wrote:

> Oliver Joa wrote:
> > Hi,
> >
> > Gabriel C wrote:
> >
> > [...]
> >
> >>>> 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?
>
> 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").

--
WBR et al.