Re: VIA KT400 + Kernel 2.6.12 + IO-APIC + uhci_hcd = IRQ trouble

From: Alan Stern
Date: Mon Jul 18 2005 - 11:14:36 EST


On Sun, 17 Jul 2005, Michel Bouissou wrote:

> I'm afraid I won't have time for this today. It's already more than 11 PM here
> and I'm leaving early tomorrow for travel...

I will be travelling this week also. That's okay, there's no hurry.

> But AFAIR, when I performed previous tests, I had tried about every USB socket
> on my computer (I have 6 of them...) to the same result.

But you didn't try these exact tests.

> Humm. I'm not sure about what you call a "full speed" device, for when I plug
> my USB scanner, my kernel reports it as a "full speed" USB device, and says
> it's managed by uhci (not ehci):
>
> Jul 17 22:46:42 totor kernel: usb 3-2: new full speed USB device using
> uhci_hcd and address 3

That's what I mean by a "full speed device".

> I just tried an USB flashdisk that "used to work good with 2.4" and that I
> hadn't tried yet in 2.6. It's identified as "high speed" and ehci would like
> to manage it, but it seems I'm out of luck in some other aspect:
>
> totor kernel: usb 4-4: new high speed USB device using ehci_hcd and address 25
> totor kernel: usb 4-4: device not accepting address 25, error -71
> totor kernel: usb 4-4: new high speed USB device using ehci_hcd and address 35
> totor kernel: usb 4-4: device not accepting address 35, error -71
> totor kernel: usb 4-4: new high speed USB device using ehci_hcd and address 36
> totor kernel: usb 4-4: device not accepting address 36, error -71
> totor kernel: usb 4-4: new high speed USB device using ehci_hcd and address 38
> totor kernel: usb 4-4: device not accepting address 38, error -71
> totor kernel: usb 4-4: new high speed USB device using ehci_hcd and address 48
> totor kernel: usb 4-4: device not accepting address 48, error -71
>
> ...ad nauseam until I unplug the key...

This could be the result of inadequate cabling inside the computer case
from the front panel socket to the motherboard. Lots of other people have
seen that sort of thing.

> Shhh...
>
> Doesn't like the front panel socket ? Let me try another USB socket... Just
> close to my mouse...
>
> totor kernel: usb 4-2: new high speed USB device using ehci_hcd and address 16
> totor kernel: SCSI subsystem initialized
> totor kernel: Initializing USB Mass Storage driver...
> totor kernel: scsi0 : SCSI emulation for USB Mass Storage devices
> totor kernel: usbcore: registered new driver usb-storage
> totor kernel: USB Mass Storage support registered.
>
> Looks better, isn't it ?
>
> Now, I checked that I can mount it and see its contents. That's OK.
>
> I'm currently running with IO-APIC disabled, so my interrupts shows as:

For the tests I described earlier, you will want to boot with IO-APIC
enabled. Otherwise there's nothing to test...


> I know that what I'm going to write will look crazy ;-) because it doesn't
> seem to make any sense, but I've noticed a pattern that tends to emerge from
> the different tests I've made with IO-APIC enabled and different 2.6.12
> kernels (patches, boot options, etc...) :
>
> 1/ When I'm testing a new kernel for the first time, I usually call it
> manually by typing the different relevant option manually from my grub
> (bootloader) commandline, and most of the times, it works without "losing IRQ
> 21".
> That's why I had thought, with your first suggestion of "usb-handoff" option,
> that my problem was solved.
>
> Once I believe it works and want to test it again, I then put this as the
> default entry in my bootloader, then I reboot without touching anything (I
> let the bootloader select its default entry), and, usually, it then fails.
>
> So I would say that a patterns looks emerging : When I have typed things on
> the keyboard at the bootloader stage, then loaded Linux, it may work. On the
> contrary, when I let the machine boot by itself without having touched
> anything, then I usually get these IRQ 21 losses.
>
> Yes, I know this look completely silly ;-) but I mentioned it to be as
> complete as possible about what I noticed, and that may or may not be
> relevant...

I would be very surprised if this turned out to mean anything. But it
doesn't hurt to try more tests, doing it both ways, and see what happens.


> By the way, the front socket that dislikes the USB 2.0 flashdisk (ehci) feels
> perfectly happy if I plug and USB 1.1 flashdisk (uhci)... Feels good also if
> I plug my Digital Camera there... And I've plugged it there thousands of
> times.

That's to be expected from bad cabling. Full-speed transmissions are much
more tolerant of interference and noise than high-speed transmissions.

> Some posts I googled about this kind of errors tend to indicate this would be
> an IRQ mess ;-))

Sometimes it is. And many of those posts are just guesses. In your case
you know that the IRQs work correctly when you don't enable IO-APIC.

Alan Stern

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/