Bizarre non-booting Linux problem

Posted by: Roger

Bizarre non-booting Linux problem - 11/01/2005 19:31

I've got an odd problem with my Linux box. When I boot it up, it gets a certain way through the boot process (just after loading the 3w-xxxx driver), and then locks solidly.

It's not the 3ware driver. It's the mouse. If I turn the machine on without a mouse plugged in, it's fine. It comes up all the way.

Initially, I put this down to a dodgy PS/2 mouse port (blown fuse, something like that), and didn't worry about it -- the box used to run mostly headless anyway.

Now, however, I'm trying to get this thing up as a MythTV box, and so I need a mouse to use X (at least until I get it all configured properly).

I borrowed a USB mouse, because you can't hot-swap PS/2 mice and, as mentioned, it won't boot with a PS/2 mouse plugged in.

It turns out that it won't boot with a USB mouse plugged in, either. At least I can hotplug the USB mouse, but it's still a PITA.

Any ideas? The only clue I've got is that (on a fresh build of 2.6.10 -- not patched yet), the 3ware card gets IRQ12 without the mouse plugged in, and IRQ6 with it plugged in. On 2.6.9-2, I think it always got IRQ12, but still failed to boot.

Most perplexing. I can't go around replacing the motherboard, because I'm still skint after Christmas (and I'm saving up for a Hush box -- although the new Mac Mini does look tempting).
Posted by: peter

Re: Bizarre non-booting Linux problem - 11/01/2005 19:42

Sounds like a bogus module is getting loaded. Try looking in /var/log/ksymoops. Try removing any unnecessary modules from /etc/modules, and turn off the kernel module loader. Try fiddling with the USB legacy setting in the BIOS, if there is one.

Peter
Posted by: mlord

Re: Bizarre non-booting Linux problem - 11/01/2005 20:34

After booting sans mouse, dump out /proc/interrupts and see what else in the box is using IRQ6. Of course, if the BIOS is shuffling things around from boot to boot, that may not prove anything. Does the boot log on failure show any other IRQ6 devices?

EDIT: Oh wait.. IRQ6 is usually reserved (exclusively) for the floppy controller. I doubt that it can be shared safely.

Any way to force your BIOS to use a particular interrupt for the 3ware slot? Most AWARD bios systems can do this, as can some others.


Cheers
Posted by: mlord

Re: Bizarre non-booting Linux problem - 11/01/2005 20:45

MMm.. I just dug through the 3ware driver source code, and it looks like they F-d up in their interrupt sharing logic. Their interrupt handler (2.6.10) returns "handled==1(TRUE)" regardless of whether the interrupt was for them or not. So a mouse interrupt on the same line (IRQ12) might just get stuck forever there..

Silly 3ware.

The fix is to edit linux-2.6.10/drivers/scsi/3w-9xxx.c and move the "handled = 1" line down a little bit. Source patch attached. This may or may not fix the problem, but it's worth a shot.

Cheers
Posted by: cushman

Re: Bizarre non-booting Linux problem - 11/01/2005 20:49

Hurrah for open source!
Posted by: mlord

Re: Bizarre non-booting Linux problem - 11/01/2005 20:54

If you disable the floppy controller in the BIOS, the RAID controller may work with IRQ6..
Posted by: Roger

Re: Bizarre non-booting Linux problem - 12/01/2005 06:06

Quote:
This may or may not fix the problem, but it's worth a shot.


Cool. Thanks Mark, I'll try that this evening.
Posted by: Roger

Re: Bizarre non-booting Linux problem - 15/01/2005 15:50

Quote:
Try fiddling with the USB legacy setting in the BIOS, if there is one.


Well, that fixes it. If I set "USB legacy support" to "disabled", rather than "auto", the 3ware card gets IRQ12 and everything comes up properly.

I'll also try Mark's fix at some point. I'm actually using the 3w-xxxx driver, rather than the 3w-9xxx driver, but it looks like it's got the same bug (setting handled=1 too early). I'm reluctant to try it today, 'cos it's taking nearly 2 hours to build a kernel...
Posted by: image

Re: Bizarre non-booting Linux problem - 15/01/2005 18:22

Quote:
'cos it's taking nearly 2 hours to build a kernel

distcc and ccache are your friends.
Posted by: SuperQ

Re: Bizarre non-booting Linux problem - 16/01/2005 13:10

hey.. i hope you guys post those fixes to lmkl and 3ware. I use 3ware cards to so it'd be good to get those fixes in.
Posted by: Roger

Re: Bizarre non-booting Linux problem - 20/04/2005 08:46

Quote:
I'll also try Mark's fix at some point.


Well, the shiny new PCI USB 2.0 card that I got also causes an IRQ clash with the 3ware card, so I tried Mark's driver. No dice -- the module causes some kind of crash and the module gets unloaded.

I wonder whether I'll be better off with a new M/B after all...
Posted by: mlord

Re: Bizarre non-booting Linux problem - 20/04/2005 10:56

Mmm.. that combo should work (and my "fix" is already in 2.6.11). You *are* using the 2.6.11.7 kernel, right?

Cheers
Posted by: Roger

Re: Bizarre non-booting Linux problem - 20/04/2005 11:28

Quote:
using the 2.6.11.7 kernel, right?


Debian/unstable's stock 2.6.11-1-686. I'll investigate a new kernel this evening. That and the fact that I ought to be using a -k7 kernel, anyway.