linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How to Switch DMA off for only one Harddisk at Kernelboot
@ 2007-12-16 18:06 Oliver Joa
  2007-12-16 19:25 ` Gabriel C
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Oliver Joa @ 2007-12-16 18:06 UTC (permalink / raw)
  To: linux-kernel

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to Switch DMA off for only one Harddisk at Kernelboot
  2007-12-16 18:06 How to Switch DMA off for only one Harddisk at Kernelboot Oliver Joa
@ 2007-12-16 19:25 ` Gabriel C
  2007-12-16 19:33   ` Oliver Joa
  2007-12-16 20:16 ` Alan Cox
  2007-12-17 22:32 ` Lennart Sorensen
  2 siblings, 1 reply; 13+ messages in thread
From: Gabriel C @ 2007-12-16 19:25 UTC (permalink / raw)
  To: Oliver Joa; +Cc: linux-kernel

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to Switch DMA off for only one Harddisk at Kernelboot
  2007-12-16 19:25 ` Gabriel C
@ 2007-12-16 19:33   ` Oliver Joa
  2007-12-16 19:45     ` Gabriel C
  0 siblings, 1 reply; 13+ messages in thread
From: Oliver Joa @ 2007-12-16 19:33 UTC (permalink / raw)
  To: Gabriel C; +Cc: linux-kernel

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to Switch DMA off for only one Harddisk at Kernelboot
  2007-12-16 19:33   ` Oliver Joa
@ 2007-12-16 19:45     ` Gabriel C
  2007-12-16 19:53       ` Oliver Joa
  0 siblings, 1 reply; 13+ messages in thread
From: Gabriel C @ 2007-12-16 19:45 UTC (permalink / raw)
  To: Oliver Joa; +Cc: linux-kernel, linux-ide

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to Switch DMA off for only one Harddisk at Kernelboot
  2007-12-16 19:45     ` Gabriel C
@ 2007-12-16 19:53       ` Oliver Joa
  2007-12-16 20:31         ` Gabriel C
  0 siblings, 1 reply; 13+ messages in thread
From: Oliver Joa @ 2007-12-16 19:53 UTC (permalink / raw)
  To: Gabriel C; +Cc: linux-kernel, linux-ide

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to Switch DMA off for only one Harddisk at Kernelboot
  2007-12-16 18:06 How to Switch DMA off for only one Harddisk at Kernelboot Oliver Joa
  2007-12-16 19:25 ` Gabriel C
@ 2007-12-16 20:16 ` Alan Cox
  2007-12-17 11:17   ` Oliver Joa
  2007-12-17 22:32 ` Lennart Sorensen
  2 siblings, 1 reply; 13+ messages in thread
From: Alan Cox @ 2007-12-16 20:16 UTC (permalink / raw)
  To: Oliver Joa; +Cc: linux-kernel

On Sun, 16 Dec 2007 19:06:04 +0100
Oliver Joa <oliver@j-o-a.de> 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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to Switch DMA off for only one Harddisk at Kernelboot
  2007-12-16 19:53       ` Oliver Joa
@ 2007-12-16 20:31         ` Gabriel C
  2007-12-29 11:50           ` Konstantin A. Lepikhov
  0 siblings, 1 reply; 13+ messages in thread
From: Gabriel C @ 2007-12-16 20:31 UTC (permalink / raw)
  To: Oliver Joa; +Cc: linux-kernel, linux-ide

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to Switch DMA off for only one Harddisk at Kernelboot
  2007-12-16 20:16 ` Alan Cox
@ 2007-12-17 11:17   ` Oliver Joa
  2007-12-17 11:58     ` Bartlomiej Zolnierkiewicz
  0 siblings, 1 reply; 13+ messages in thread
From: Oliver Joa @ 2007-12-17 11:17 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-kernel

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to Switch DMA off for only one Harddisk at Kernelboot
  2007-12-17 11:17   ` Oliver Joa
@ 2007-12-17 11:58     ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 13+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-12-17 11:58 UTC (permalink / raw)
  To: Oliver Joa; +Cc: Alan Cox, linux-kernel

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to Switch DMA off for only one Harddisk at Kernelboot
  2007-12-16 18:06 How to Switch DMA off for only one Harddisk at Kernelboot Oliver Joa
  2007-12-16 19:25 ` Gabriel C
  2007-12-16 20:16 ` Alan Cox
@ 2007-12-17 22:32 ` Lennart Sorensen
  2007-12-17 23:44   ` Oliver Joa
  2007-12-18  0:04   ` Alan Cox
  2 siblings, 2 replies; 13+ messages in thread
From: Lennart Sorensen @ 2007-12-17 22:32 UTC (permalink / raw)
  To: Oliver Joa; +Cc: linux-kernel

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to Switch DMA off for only one Harddisk at Kernelboot
  2007-12-17 22:32 ` Lennart Sorensen
@ 2007-12-17 23:44   ` Oliver Joa
  2007-12-18  0:04   ` Alan Cox
  1 sibling, 0 replies; 13+ messages in thread
From: Oliver Joa @ 2007-12-17 23:44 UTC (permalink / raw)
  To: Lennart Sorensen; +Cc: linux-kernel

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to Switch DMA off for only one Harddisk at Kernelboot
  2007-12-17 22:32 ` Lennart Sorensen
  2007-12-17 23:44   ` Oliver Joa
@ 2007-12-18  0:04   ` Alan Cox
  1 sibling, 0 replies; 13+ messages in thread
From: Alan Cox @ 2007-12-18  0:04 UTC (permalink / raw)
  To: Lennart Sorensen; +Cc: Oliver Joa, linux-kernel

> 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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to Switch DMA off for only one Harddisk at Kernelboot
  2007-12-16 20:31         ` Gabriel C
@ 2007-12-29 11:50           ` Konstantin A. Lepikhov
  0 siblings, 0 replies; 13+ messages in thread
From: Konstantin A. Lepikhov @ 2007-12-29 11:50 UTC (permalink / raw)
  To: Gabriel C; +Cc: linux-kernel, linux-ide

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.

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2007-12-29 12:23 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-16 18:06 How to Switch DMA off for only one Harddisk at Kernelboot Oliver Joa
2007-12-16 19:25 ` Gabriel C
2007-12-16 19:33   ` Oliver Joa
2007-12-16 19:45     ` Gabriel C
2007-12-16 19:53       ` Oliver Joa
2007-12-16 20:31         ` Gabriel C
2007-12-29 11:50           ` Konstantin A. Lepikhov
2007-12-16 20:16 ` Alan Cox
2007-12-17 11:17   ` Oliver Joa
2007-12-17 11:58     ` Bartlomiej Zolnierkiewicz
2007-12-17 22:32 ` Lennart Sorensen
2007-12-17 23:44   ` Oliver Joa
2007-12-18  0:04   ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).