how to force libata to ignore 40 wire IDE cable limitation (in laptop)
I'm running Debian Lenny (kernel 2.6.26-2-686) on a Toshiba Portege 3500 laptop. The IDE interface is controlled by an ALi Corporation M5229 IDE.
The kernel fails to detect an 80 wire cable to the hard disk, and so it falls back to using UDMA/33 on the drive (fair enough), which slows things down quite a bit.
The kernel-params.txt document tells me that libata can take a 'force' parameter, with options such as 80c (force to 80 wire) or short40c (assume a short or nonexistent cable).
I have attempted to set this parameter (details below), but with no joy.
If I patch the kernel code (changing ide-iops.c so that the short40c state is assumed), the UMDA/66 mode is successfully selected. But I'd prefer to do this without modifying the stock kernel if possible.
I have tried using the parameter in the following ways, but I think I must be doing it wrong:
* adding it to the kernel line in grub
(kernel reports "Unknown boot option")
* adding it to /etc/modprobe.d/options
options libata force=short40c
and then rebuilding initrd
Neither of these methods had any effect that I could see. I tried in a few other places too (such as /etc/modules.conf, and in /etc/modutils), but didn't really know what I was doing :).
So my questions are:
1) Is this parameter working in the current Lenny kernel (I can see code that uses the flags, but I don't know enough about how parameters get passed in)?
2) Am I setting the right parameter, or are there others that might be relevant (eg ide_core.ignore_cable)?
3) Is there a difference between passing in options via grub or via the modprobe.d files?
4) In which file would parameter options normally be put (or are any files inside modprobe.d used)?
You might want to try giving the full parameter, instead of omitting the [ID] section (see bold text above) and see if that helps?
It is *possible* too that the option is no longer supported (even though the supporting code IS still in the libata code). The parameters.txt file is not necessarily 100% up to date, nor necessarily 100% complete.
You can also use modinfo to find which options your kernel module takes.
Does UDMA/66 exceed the capabilities of your drive or controller? Is there a limiting jumper on the drive?
Thanks for the feedback, it encouraged me to take another look at this.
modinfo did show that libata had a 'force' parameter. But after having a closer look at the kernel driver source, I realized I was working on the wrong module. The ide_core module also has a parameter to force the 40 wire cable type to be ignored (which is presumably the one being checked in ide-iops.c).
So the fix is this:
edit /etc/modprobe.d/options, adding the line
Then rebuild the initrd image
I still don't seem to be able to get it to work by passing the option in through grub, but I can live with that.
|All times are GMT -5. The time now is 11:09 PM.|