LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices



Reply
 
Search this Thread
Old 07-22-2009, 10:32 AM   #1
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Wheezy (Fluxbox WM)
Posts: 1,368
Blog Entries: 52

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Unhappy 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
libata.force=short40c
(kernel reports "Unknown boot option")

* adding it to /etc/modprobe.d/options
options libata force=short40c
and then rebuilding initrd
update-initramfs -u

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)?
 
Old 08-14-2009, 11:08 PM   #2
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Code:
From: Kernel Documentation file: kernel-parameters.txt



libata.force=	[LIBATA] Force configurations.  The format is comma
			separated list of "[ID:]VAL" where ID is
			PORT[:DEVICE].  PORT and DEVICE are decimal numbers
			matching port, link or device.  Basically, it matches
			the ATA ID string printed on console by libata.  If
			the whole ID part is omitted, the last PORT and DEVICE
			values are used.  If ID hasn't been specified yet, the
			configuration applies to all ports, links and devices.

			If only DEVICE is omitted, the parameter applies to
			the port and all links and devices behind it.  DEVICE
			number of 0 either selects the first device or the
			first fan-out link behind PMP device.  It does not
			select the host link.  DEVICE number of 15 selects the
			host link and device attached to it.

			The VAL specifies the configuration to force.  As long
			as there's no ambiguity shortcut notation is allowed.
			For example, both 1.5 and 1.5G would work for 1.5Gbps.
			The following configurations can be forced.

			* Cable type: 40c, 80c, short40c, unk, ign or sata.
			  Any ID with matching PORT is used.
From the looks of things, I believe you're going about it the correct way; adding it to the GRUB kernel line should be OK, and is correct.
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.


Sasha

Last edited by GrapefruiTgirl; 08-14-2009 at 11:13 PM.
 
Old 08-14-2009, 11:23 PM   #3
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
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?
 
Old 08-15-2009, 07:10 AM   #4
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Wheezy (Fluxbox WM)
Posts: 1,368
Blog Entries: 52

Original Poster
Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Smile

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
Code:
options ide_core ignore_cable=0
The parameter to ignore_cable is the drive id (I messed up the syntax at first, and ended up with a non-bootable initrd, which was a bit tricky ).

Then rebuild the initrd image
Code:
update-initramfs -u
And now the drive gets set to UDMA66 (it is a reasonably new drive, so this works fine, and I am not getting any drive errors). The drive can handle higher speeds, so I assume my limitation now is the controller.

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.

Last edited by neonsignal; 08-15-2009 at 07:22 AM.
 
  


Reply

Tags
cable, debian, force, lenny, libata, module, parameter, udma


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
suggestion: Moving to the SCSI (libata drivers) instead of traditional IDE drivers? kushalkoolwal Debian 1 05-15-2008 05:25 PM
ide cable jukebox55 Linux - Hardware 5 10-01-2007 06:51 PM
How to force kernel to ignore a HDD at boot? fuzzyash Linux - Software 4 07-05-2007 05:46 AM
How do I force hotplug to ignore a PCI slot? apsteffe Slackware 3 09-24-2006 05:50 PM
laptop use a cdrom with ide-usb cable norstar Linux - Hardware 1 10-12-2004 01:19 AM


All times are GMT -5. The time now is 01:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration