linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RE: Kernel 2.6.12 + IO-APIC + uhci_hcd = Trouble
@ 2005-07-10 18:50 Protasevich, Natalie
  2005-07-11  9:06 ` Michel Bouissou
  0 siblings, 1 reply; 25+ messages in thread
From: Protasevich, Natalie @ 2005-07-10 18:50 UTC (permalink / raw)
  To: Michel Bouissou, linux-kernel; +Cc: stern, mingo

 

> -----Original Message-----
> From: linux-kernel-owner@vger.kernel.org 
> [mailto:linux-kernel-owner@vger.kernel.org] On Behalf Of 
> Michel Bouissou
> Sent: Sunday, July 10, 2005 2:11 AM
> To: linux-kernel@vger.kernel.org
> Cc: stern@rowland.harvard.edu; mingo@redhat.com
> Subject: Kernel 2.6.12 + IO-APIC + uhci_hcd = Trouble
> 
> Hi there,
> 
> I use a Gigabyte GA7-VAXP motherboard that has been fine for 
> more than 2 years with 2.4 series kernels, and that gives 
> trouble with 2.6.12 (and previous) kernels.
> 
> The problem seems to sit between the UP IO-APIC and USB 
> uhci_hcd driver.
> 
> The GA7-VAXP MB is equipped with an Athlon 2000+ XP and a VIA 
> KT400 chipset.
> 
> Using 2.4 series kernel the IO-APIC is used just fine.  Was 
> never source of any kind of problem.
> 
> Using 2.6.12 kernel, if the IO-APIC is enabled in the kernel 
> configuration, then the interrupt controlling the uhci_hcd 
> USB controller gets disabled as soon as uhci_hcd is initialized.

Michel,
Symptoms that you describe resemble several IRQ problems with VIA
chipset reported by others (but not quite...) Could you check on
bugzilla #4843 please
http://bugzilla.kernel.org/show_bug.cgi?id=4843 and see if the patch
fixes your problem.
Thanks,
--Natalie
 
 

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

* Re: Kernel 2.6.12 + IO-APIC + uhci_hcd = Trouble
  2005-07-10 18:50 Kernel 2.6.12 + IO-APIC + uhci_hcd = Trouble Protasevich, Natalie
@ 2005-07-11  9:06 ` Michel Bouissou
  2005-07-11 18:36   ` Alan Stern
  0 siblings, 1 reply; 25+ messages in thread
From: Michel Bouissou @ 2005-07-11  9:06 UTC (permalink / raw)
  To: Protasevich, Natalie; +Cc: linux-kernel, stern, mingo

Le Dimanche 10 Juillet 2005 20:50, Protasevich, Natalie a écrit :
>
> Michel,
> Symptoms that you describe resemble several IRQ problems with VIA
> chipset reported by others (but not quite...) Could you check on
> bugzilla #4843 please
> http://bugzilla.kernel.org/show_bug.cgi?id=4843 and see if the patch
> fixes your problem.

Hi Nathalie,

Thanks for your answer and pointer. Unfortunately it doesn't help.

The patch you mention won't apply on my kernel alone, I need first to apply 
the patch from 
http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c434b7a6aedfe428ad17cd61b21b125a7b7a29ce , 
then your patch applies OK.

Unfortunately, it doesn't solve my issue. Booting this kernel still results in 
an interrupt issue with uhci_hcd.

After boot, "cat /proc/interrupts" shows:
           CPU0
  0:     188066    IO-APIC-edge  timer
  1:        308    IO-APIC-edge  i8042
  2:          0          XT-PIC  cascade
  4:        413    IO-APIC-edge  serial
  7:          3    IO-APIC-edge  parport0
 14:       1177    IO-APIC-edge  ide4
 15:       1186    IO-APIC-edge  ide5
 18:       1028   IO-APIC-level  eth0, eth1
 19:       8513   IO-APIC-level  ide0, ide1, ide2, ide3, ehci_hcd:usb4
 21:     100000   IO-APIC-level  uhci_hcd:usb1, uhci_hcd:usb2, uhci_hcd:usb3
 22:          0   IO-APIC-level  VIA8233
NMI:          0
LOC:     187967
ERR:          0
MIS:          0

(The problem is with IRQ 21 for uhci_hcd)

(It is to note that without those patches, I didn't see any IRQ managed by 
"XT-PIC", all were managed by the IO-APIC...)


The errors I get in /var/log/messages are :

usbcore: registered new driver usbfs
usbcore: registered new driver hub
USB Universal Host Controller Interface driver v2.2
PCI: Via IRQ fixup for 0000:00:10.0, from 10 to 5
uhci_hcd 0000:00:10.0: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 
Controller
uhci_hcd 0000:00:10.0: new USB bus registered, assigned bus number 1
uhci_hcd 0000:00:10.0: irq 21, io base 0x0000cc00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
PCI: Via IRQ fixup for 0000:00:10.1, from 10 to 5
uhci_hcd 0000:00:10.1: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 
Controller (#2)
uhci_hcd 0000:00:10.1: new USB bus registered, assigned bus number 2
uhci_hcd 0000:00:10.1: irq 21, io base 0x0000d000
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
PCI: Via IRQ fixup for 0000:00:10.2, from 10 to 5
uhci_hcd 0000:00:10.2: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 
Controller (#3)
usb 1-1: new low speed USB device using uhci_hcd and address 2
uhci_hcd 0000:00:10.2: new USB bus registered, assigned bus number 3
uhci_hcd 0000:00:10.2: irq 21, io base 0x0000d400
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 2 ports detected
usbcore: registered new driver hiddev
input: USB HID v1.10 Mouse [Logitech USB Receiver] on usb-0000:00:10.0-1
usbcore: registered new driver usbhid
drivers/usb/input/hid-core.c: v2.01:USB HID core driver
PCI: Via IRQ fixup for 0000:00:10.3, from 11 to 3
ehci_hcd 0000:00:10.3: VIA Technologies, Inc. USB 2.0
ehci_hcd 0000:00:10.3: new USB bus registered, assigned bus number 4
ehci_hcd 0000:00:10.3: irq 19, io mem 0xe3009000
ehci_hcd 0000:00:10.3: USB 2.0 initialized, EHCI 1.00, driver 10 Dec 2004
usb 1-1: USB disconnect, address 2
hub 4-0:1.0: USB hub found
hub 4-0:1.0: 6 ports detected
usb 1-1: new low speed USB device using uhci_hcd and address 3
input: USB HID v1.10 Mouse [Logitech USB Receiver] on usb-0000:00:10.0-1
usb 3-2: new full speed USB device using uhci_hcd and address 3

irq 21: nobody cared!
 [__report_bad_irq+42/144] __report_bad_irq+0x2a/0x90
 [<c013cb5a>] __report_bad_irq+0x2a/0x90
 [handle_IRQ_event+57/112] handle_IRQ_event+0x39/0x70
 [<c013c449>] handle_IRQ_event+0x39/0x70
 [note_interrupt+163/208] note_interrupt+0xa3/0xd0
 [<c013cc83>] note_interrupt+0xa3/0xd0
 [__do_IRQ+320/352] __do_IRQ+0x140/0x160
 [<c013c5c0>] __do_IRQ+0x140/0x160
 [do_IRQ+50/112] do_IRQ+0x32/0x70
 [<c01054f2>] do_IRQ+0x32/0x70
 [common_interrupt+26/32] common_interrupt+0x1a/0x20
 [<c0103812>] common_interrupt+0x1a/0x20
 [path_lookup+197/448] path_lookup+0xc5/0x1c0
 [<c016f935>] path_lookup+0xc5/0x1c0
 [do_page_fault+457/1427] do_page_fault+0x1c9/0x593
 [<c0113a09>] do_page_fault+0x1c9/0x593
 [open_exec+50/272] open_exec+0x32/0x110
 [<c016a9e2>] open_exec+0x32/0x110
 [pg0+947004132/1069421568] usb_hcd_irq+0x44/0x90 [usbcore]
 [<f8b3f2e4>] usb_hcd_irq+0x44/0x90 [usbcore]
 [handle_IRQ_event+57/112] handle_IRQ_event+0x39/0x70
 [<c013c449>] handle_IRQ_event+0x39/0x70
 [do_execve+66/592] do_execve+0x42/0x250
 [<c016bc82>] do_execve+0x42/0x250
 [sys_execve+70/176] sys_execve+0x46/0xb0
 [sysenter_past_esp+84/117] sysenter_past_esp+0x54/0x75
 [<c0102dfb>] sysenter_past_esp+0x54/0x75
handlers:
[pg0+947004064/1069421568] (usb_hcd_irq+0x0/0x90 [usbcore])
[<f8b3f2a0>] (usb_hcd_irq+0x0/0x90 [usbcore])
[pg0+947004064/1069421568] (usb_hcd_irq+0x0/0x90 [usbcore])
[<f8b3f2a0>] (usb_hcd_irq+0x0/0x90 [usbcore])
[pg0+947004064/1069421568] (usb_hcd_irq+0x0/0x90 [usbcore])
[<f8b3f2a0>] (usb_hcd_irq+0x0/0x90 [usbcore])
Disabling IRQ #21


At boot, IRQs seem to be distributed this way:

PCI: Probing PCI hardware
PCI: Probing PCI hardware (bus 00)
PCI: Using IRQ router default [1106/3189] at 0000:00:00.0
PCI->APIC IRQ transform: 0000:00:0a.0[A] -> IRQ 18
PCI->APIC IRQ transform: 0000:00:0b.0[A] -> IRQ 19
PCI->APIC IRQ transform: 0000:00:0f.0[A] -> IRQ 19
PCI->APIC IRQ transform: 0000:00:10.0[A] -> IRQ 21
PCI->APIC IRQ transform: 0000:00:10.1[B] -> IRQ 21
PCI->APIC IRQ transform: 0000:00:10.2[C] -> IRQ 21
PCI->APIC IRQ transform: 0000:00:10.3[D] -> IRQ 19
PCI->APIC IRQ transform: 0000:00:11.1[A] -> IRQ 22
PCI->APIC IRQ transform: 0000:00:11.5[C] -> IRQ 22
PCI->APIC IRQ transform: 0000:00:13.0[A] -> IRQ 18
PCI->APIC IRQ transform: 0000:01:00.0[A] -> IRQ 16
Machine check exception polling timer started.


Hope this may help...

(Please copy me on answers, I'm not subscribed to the linux-kernel ML)

Cheers.

-- 
Michel Bouissou <michel@bouissou.net> OpenPGP ID 0xDDE8AC6E

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

* Re: Kernel 2.6.12 + IO-APIC + uhci_hcd = Trouble
  2005-07-11  9:06 ` Michel Bouissou
@ 2005-07-11 18:36   ` Alan Stern
  2005-07-11 19:33     ` [SOLVED ??] " Michel Bouissou
  0 siblings, 1 reply; 25+ messages in thread
From: Alan Stern @ 2005-07-11 18:36 UTC (permalink / raw)
  To: Michel Bouissou; +Cc: Protasevich, Natalie, linux-kernel, mingo

On Mon, 11 Jul 2005, Michel Bouissou wrote:

> Hi Nathalie,
> 
> Thanks for your answer and pointer. Unfortunately it doesn't help.
> 
> The patch you mention won't apply on my kernel alone, I need first to apply 
> the patch from 
> http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c434b7a6aedfe428ad17cd61b21b125a7b7a29ce , 
> then your patch applies OK.
> 
> Unfortunately, it doesn't solve my issue. Booting this kernel still results in 
> an interrupt issue with uhci_hcd.
> 
> After boot, "cat /proc/interrupts" shows:
>            CPU0
>   0:     188066    IO-APIC-edge  timer
>   1:        308    IO-APIC-edge  i8042
>   2:          0          XT-PIC  cascade
>   4:        413    IO-APIC-edge  serial
>   7:          3    IO-APIC-edge  parport0
>  14:       1177    IO-APIC-edge  ide4
>  15:       1186    IO-APIC-edge  ide5
>  18:       1028   IO-APIC-level  eth0, eth1
>  19:       8513   IO-APIC-level  ide0, ide1, ide2, ide3, ehci_hcd:usb4
>  21:     100000   IO-APIC-level  uhci_hcd:usb1, uhci_hcd:usb2, uhci_hcd:usb3
>  22:          0   IO-APIC-level  VIA8233
> NMI:          0
> LOC:     187967
> ERR:          0
> MIS:          0
> 
> (The problem is with IRQ 21 for uhci_hcd)
> 
> (It is to note that without those patches, I didn't see any IRQ managed by 
> "XT-PIC", all were managed by the IO-APIC...)

It's possible that the errors you're getting are caused by some other
device erroneously generating interrupt requests on IRQ 21.  Then when
uhci-hcd enables that IRQ, there's no driver available to handle the 
interrupts...

It's also possible that the UHCI controllers are generating the unwanted 
interrupt requests.  You should make sure that Legacy USB Support is 
turned off in your BIOS settings.  You can also try adding the 
"usb-handoff" kernel parameter to your boot command line.

Alan Stern


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

* Re: [SOLVED ??] Kernel 2.6.12 + IO-APIC + uhci_hcd = Trouble
  2005-07-11 18:36   ` Alan Stern
@ 2005-07-11 19:33     ` Michel Bouissou
  2005-07-11 19:43       ` Alan Stern
  0 siblings, 1 reply; 25+ messages in thread
From: Michel Bouissou @ 2005-07-11 19:33 UTC (permalink / raw)
  To: Alan Stern; +Cc: Protasevich, Natalie, linux-kernel, mingo

Le Lundi 11 Juillet 2005 20:36, Alan Stern a écrit :
> It's also possible that the UHCI controllers are generating the unwanted
> interrupt requests.  You should make sure that Legacy USB Support is
> turned off in your BIOS settings.

My motherboard both holds USB 1.1 and USB 2.0 controllers. I don't have a 
"Legacy USB Support" option in my BIOS, all my USB options are the following:

Enable USB 1.1 controller: YES	(Surely relates to my true USB 1.1 controller)

Enable USB 2.0 controller: YES	(Same for the high speed controller ?)

Enable USB keyboard: NO

Enable USB mouse support: YES	(Well, I have one ;-)

I didn't change anything regarding these so far.

> You can also try adding the "usb-handoff" kernel parameter to your boot
> command line. 

Hey !! This one looks like the MIRACLE-OPTION !!

I just booted using my 2.6.12 kernel patched with Nathalie's patches (don't 
know if they help in there...) and the problem seems to be gone !

Nothing complains anymore about the interrupt. I have:

[root@totor etc]# cat /proc/interrupts
           CPU0
  0:     934501    IO-APIC-edge  timer
  1:       4611    IO-APIC-edge  i8042
  2:          0          XT-PIC  cascade
  4:       2779    IO-APIC-edge  serial
  7:          3    IO-APIC-edge  parport0
 14:       7909    IO-APIC-edge  ide4
 15:       7918    IO-APIC-edge  ide5
 16:      38447   IO-APIC-level  nvidia
 18:       2982   IO-APIC-level  eth0, eth1
 19:      37041   IO-APIC-level  ide0, ide1, ide2, ide3, ehci_hcd:usb4
 21:      52036   IO-APIC-level  uhci_hcd:usb1, uhci_hcd:usb2, uhci_hcd:usb3
 22:       2850   IO-APIC-level  VIA8233
NMI:          0
LOC:     934453
ERR:          0
MIS:          0


...now let's see with time if this is stable...

A thousand thanks for your suggestion Alan !

(Kernel 2.4 was working plain good without such a boot option, I didn't know 
it existed...)

(Please copy me on answers, as I'm not subscribed to the linux-kernel mailing 
list.)

Cheers.

-- 
Michel Bouissou <michel@bouissou.net> OpenPGP ID 0xDDE8AC6E

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

* Re: [SOLVED ??] Kernel 2.6.12 + IO-APIC + uhci_hcd = Trouble
  2005-07-11 19:33     ` [SOLVED ??] " Michel Bouissou
@ 2005-07-11 19:43       ` Alan Stern
  2005-07-11 20:02         ` Michel Bouissou
  0 siblings, 1 reply; 25+ messages in thread
From: Alan Stern @ 2005-07-11 19:43 UTC (permalink / raw)
  To: Michel Bouissou; +Cc: Protasevich, Natalie, linux-kernel, mingo

On Mon, 11 Jul 2005, Michel Bouissou wrote:

> Le Lundi 11 Juillet 2005 20:36, Alan Stern a écrit :
> > It's also possible that the UHCI controllers are generating the unwanted
> > interrupt requests.  You should make sure that Legacy USB Support is
> > turned off in your BIOS settings.
> 
> My motherboard both holds USB 1.1 and USB 2.0 controllers. I don't have a 
> "Legacy USB Support" option in my BIOS, all my USB options are the following:
> 
> Enable USB 1.1 controller: YES	(Surely relates to my true USB 1.1 controller)
> 
> Enable USB 2.0 controller: YES	(Same for the high speed controller ?)
> 
> Enable USB keyboard: NO
> 
> Enable USB mouse support: YES	(Well, I have one ;-)

That's what I was talking about.  BIOS support for keyboard and mouse is
called "Legacy" support, because it emulates plain old non-USB AT-type 
devices.  I bet if you turned off the "Enable USB mouse support" option 
then everything would work.

> I didn't change anything regarding these so far.
> 
> > You can also try adding the "usb-handoff" kernel parameter to your boot
> > command line. 
> 
> Hey !! This one looks like the MIRACLE-OPTION !!
> 
> I just booted using my 2.6.12 kernel patched with Nathalie's patches (don't 
> know if they help in there...) and the problem seems to be gone !
> 
> Nothing complains anymore about the interrupt. I have:
> 
> [root@totor etc]# cat /proc/interrupts
>            CPU0
>   0:     934501    IO-APIC-edge  timer
>   1:       4611    IO-APIC-edge  i8042
>   2:          0          XT-PIC  cascade
>   4:       2779    IO-APIC-edge  serial
>   7:          3    IO-APIC-edge  parport0
>  14:       7909    IO-APIC-edge  ide4
>  15:       7918    IO-APIC-edge  ide5
>  16:      38447   IO-APIC-level  nvidia
>  18:       2982   IO-APIC-level  eth0, eth1
>  19:      37041   IO-APIC-level  ide0, ide1, ide2, ide3, ehci_hcd:usb4
>  21:      52036   IO-APIC-level  uhci_hcd:usb1, uhci_hcd:usb2, uhci_hcd:usb3
>  22:       2850   IO-APIC-level  VIA8233
> NMI:          0
> LOC:     934453
> ERR:          0
> MIS:          0
> 
> 
> ...now let's see with time if this is stable...
> 
> A thousand thanks for your suggestion Alan !

You're welcome.

> (Kernel 2.4 was working plain good without such a boot option, I didn't know 
> it existed...)

A lot has changed since 2.4... not always for the better!

Alan Stern


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

* Re: [SOLVED ??] Kernel 2.6.12 + IO-APIC + uhci_hcd = Trouble
  2005-07-11 19:43       ` Alan Stern
@ 2005-07-11 20:02         ` Michel Bouissou
  2005-07-11 20:16           ` Alan Stern
  0 siblings, 1 reply; 25+ messages in thread
From: Michel Bouissou @ 2005-07-11 20:02 UTC (permalink / raw)
  To: Alan Stern; +Cc: Protasevich, Natalie, linux-kernel

Le Lundi 11 Juillet 2005 21:43, Alan Stern a écrit :
> >
> > Enable USB mouse support: YES	(Well, I have one ;-)
>
> That's what I was talking about.  BIOS support for keyboard and mouse is
> called "Legacy" support, because it emulates plain old non-USB AT-type
> devices.  I bet if you turned off the "Enable USB mouse support" option
> then everything would work.

Aha. And what would be your advice ? Rather leave the BIOS mouse option ON and 
use "usb-handoff", or remove both ?

I'll check without both tomorrow anyway, it's a bit late tonight for keeping 
on breaking the machine ;-)

> > A thousand thanks for your suggestion Alan !
>
> You're welcome.

Well, you really deserve my thanks :-)

> A lot has changed since 2.4... not always for the better!

Hmmm... I've seen... 2.6.12 is the first release that seems to be willing to 
work on my system -- with some tweaking, coffee and aspirin. Previous 2.6.x 
releases I had tried (2.6.3, 2.6.6) were horribly broken on my poor VIA 
hardware ;-)

Cheers.

-- 
Michel Bouissou <michel@bouissou.net> OpenPGP ID 0xDDE8AC6E

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

* Re: [SOLVED ??] Kernel 2.6.12 + IO-APIC + uhci_hcd = Trouble
  2005-07-11 20:02         ` Michel Bouissou
@ 2005-07-11 20:16           ` Alan Stern
  2005-07-11 20:46             ` Michel Bouissou
  0 siblings, 1 reply; 25+ messages in thread
From: Alan Stern @ 2005-07-11 20:16 UTC (permalink / raw)
  To: Michel Bouissou; +Cc: Protasevich, Natalie, linux-kernel

On Mon, 11 Jul 2005, Michel Bouissou wrote:

> Le Lundi 11 Juillet 2005 21:43, Alan Stern a écrit :
> > >
> > > Enable USB mouse support: YES	(Well, I have one ;-)
> >
> > That's what I was talking about.  BIOS support for keyboard and mouse is
> > called "Legacy" support, because it emulates plain old non-USB AT-type
> > devices.  I bet if you turned off the "Enable USB mouse support" option
> > then everything would work.
> 
> Aha. And what would be your advice ? Rather leave the BIOS mouse option ON and 
> use "usb-handoff", or remove both ?

Well, some people don't have a choice.  They need to leave BIOS USB 
keyboard/mouse support turned on in order to use their USB keyboard/mouse 
before the Linux kernel has loaded (within Grub, for instance).

If you don't care about that, then it's cleaner to turn off the BIOS 
support.  Of course, you may find that you still need to use 
"usb-handoff" anyway!

In the end it doesn't make much difference.  Do whatever works best for 
you.

Alan Stern


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

* Re: [SOLVED ??] Kernel 2.6.12 + IO-APIC + uhci_hcd = Trouble
  2005-07-11 20:16           ` Alan Stern
@ 2005-07-11 20:46             ` Michel Bouissou
  2005-07-11 20:58               ` Michel Bouissou
  2005-07-11 21:21               ` [SOLVED ??] " Alan Stern
  0 siblings, 2 replies; 25+ messages in thread
From: Michel Bouissou @ 2005-07-11 20:46 UTC (permalink / raw)
  To: Alan Stern; +Cc: Protasevich, Natalie, linux-kernel

Le Lundi 11 Juillet 2005 22:16, Alan Stern a écrit :
> > Aha. And what would be your advice ? Rather leave the BIOS mouse option
> > ON and use "usb-handoff", or remove both ?
>
> Well, some people don't have a choice.  They need to leave BIOS USB
> keyboard/mouse support turned on in order to use their USB keyboard/mouse
> before the Linux kernel has loaded (within Grub, for instance).
>
> If you don't care about that, then it's cleaner to turn off the BIOS
> support.  Of course, you may find that you still need to use
> "usb-handoff" anyway!

Well, I'm afraid I spoke too fast :-(

I rebooted my system with "usb-handoff" again, but still the USB mouse enabled 
in BIOS, and this time got the punishent again :-(

usbcore: registered new driver usbfs
usbcore: registered new driver hub
USB Universal Host Controller Interface driver v2.2
PCI: Via IRQ fixup for 0000:00:10.0, from 10 to 5
uhci_hcd 0000:00:10.0: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 
Controller
uhci_hcd 0000:00:10.0: new USB bus registered, assigned bus number 1
uhci_hcd 0000:00:10.0: irq 21, io base 0x0000cc00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
PCI: Via IRQ fixup for 0000:00:10.1, from 10 to 5
uhci_hcd 0000:00:10.1: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 
Controller (#2)
uhci_hcd 0000:00:10.1: new USB bus registered, assigned bus number 2
uhci_hcd 0000:00:10.1: irq 21, io base 0x0000d000
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
PCI: Via IRQ fixup for 0000:00:10.2, from 10 to 5
uhci_hcd 0000:00:10.2: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 
Controller (#3)
usb 1-1: new low speed USB device using uhci_hcd and address 2
uhci_hcd 0000:00:10.2: new USB bus registered, assigned bus number 3
uhci_hcd 0000:00:10.2: irq 21, io base 0x0000d400
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 2 ports detected
PCI: Via IRQ fixup for 0000:00:10.3, from 11 to 3
ehci_hcd 0000:00:10.3: VIA Technologies, Inc. USB 2.0
ehci_hcd 0000:00:10.3: new USB bus registered, assigned bus number 4
ehci_hcd 0000:00:10.3: irq 19, io mem 0xe3009000
ehci_hcd 0000:00:10.3: USB 2.0 initialized, EHCI 1.00, driver 10 Dec 2004
usbcore: registered new driver hiddev
hub 4-0:1.0: USB hub found
hub 4-0:1.0: 6 ports detected
usbhid: probe of 1-1:1.0 failed with error -5
usbcore: registered new driver usbhid
drivers/usb/input/hid-core.c: v2.01:USB HID core driver
irq 21: nobody cared!

...etc :-(

Well, this time, I deactivated the mouse in BIOS, rebooted again, also with 
"usb-handoff", and "again it works"...

-- 
Michel Bouissou <michel@bouissou.net> OpenPGP ID 0xDDE8AC6E

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

* Re: [SOLVED ??] Kernel 2.6.12 + IO-APIC + uhci_hcd = Trouble
  2005-07-11 20:46             ` Michel Bouissou
@ 2005-07-11 20:58               ` Michel Bouissou
  2005-07-11 21:21                 ` [NOT solved] " Michel Bouissou
  2005-07-11 21:21               ` [SOLVED ??] " Alan Stern
  1 sibling, 1 reply; 25+ messages in thread
From: Michel Bouissou @ 2005-07-11 20:58 UTC (permalink / raw)
  To: Alan Stern; +Cc: Protasevich, Natalie, linux-kernel

Le Lundi 11 Juillet 2005 22:46, Michel Bouissou a écrit :
>
> Well, this time, I deactivated the mouse in BIOS, rebooted again, also with
> "usb-handoff", and "again it works"...

...at least, it worked until I unplugged my USB scanner...

Jul 11 22:52:54 totor kernel: usb 3-2: USB disconnect, address 2

...then replugged my USB scanner...

Jul 11 22:53:08 totor kernel: usb 3-2: new full speed USB device using 
uhci_hcd and address 3
Jul 11 22:53:08 totor kernel: irq 21: nobody cared!

Oh no :-(

-- 
Michel Bouissou <michel@bouissou.net> OpenPGP ID 0xDDE8AC6E

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

* Re: [SOLVED ??] Kernel 2.6.12 + IO-APIC + uhci_hcd = Trouble
  2005-07-11 20:46             ` Michel Bouissou
  2005-07-11 20:58               ` Michel Bouissou
@ 2005-07-11 21:21               ` Alan Stern
  2005-07-11 21:34                 ` Michel Bouissou
  1 sibling, 1 reply; 25+ messages in thread
From: Alan Stern @ 2005-07-11 21:21 UTC (permalink / raw)
  To: Michel Bouissou; +Cc: Protasevich, Natalie, linux-kernel

On Mon, 11 Jul 2005, Michel Bouissou wrote:

> Well, I'm afraid I spoke too fast :-(
> 
> I rebooted my system with "usb-handoff" again, but still the USB mouse enabled 
> in BIOS, and this time got the punishent again :-(

> irq 21: nobody cared!
> 
> ...etc :-(
> 
> Well, this time, I deactivated the mouse in BIOS, rebooted again, also with 
> "usb-handoff", and "again it works"...

> ...at least, it worked until I unplugged my USB scanner...
>
> Jul 11 22:52:54 totor kernel: usb 3-2: USB disconnect, address 2
>
> ...then replugged my USB scanner...
>
> Jul 11 22:53:08 totor kernel: usb 3-2: new full speed USB device using
> uhci_hcd and address 3
> Jul 11 22:53:08 totor kernel: irq 21: nobody cared!
>
> Oh no :-(

Don't jump to hasty conclusions.  Problems like this are often caused by
unrelated things that you wouldn't suspect at first.  Getting something to
work once doesn't mean the problem has been fixed.  And you can be fooled
by coincidences.  (I would be surprised if that event above was really 
caused by plugging in the scanner, unless your UHCI hardware is broken.)

One thing you might try, time-consuming though it will be, is to remove or
disable as much hardware as possible from your system.  If you can
reliably determine that the problem occurs only when one particular piece
of hardware is enabled, then you'll know how to proceed.

Alan Stern


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

* Re: [NOT solved] Kernel 2.6.12 + IO-APIC + uhci_hcd = Trouble
  2005-07-11 20:58               ` Michel Bouissou
@ 2005-07-11 21:21                 ` Michel Bouissou
  0 siblings, 0 replies; 25+ messages in thread
From: Michel Bouissou @ 2005-07-11 21:21 UTC (permalink / raw)
  To: Alan Stern; +Cc: Protasevich, Natalie, linux-kernel

Le Lundi 11 Juillet 2005 22:58, Michel Bouissou a écrit :
>
> Oh no :-(

Well, I give up for tonight :-(

This time I rebooted with the mouse disabled in BIOS, with the usb-handoff 
option, with the scanner unplugged... And it went wrong simply by itself. 
"irq 21: nobody cared!"

The only thing I'm sure about is that there is something either with UP 
IO-APIC support, or with the uhci_hcd module.

When both are combined, as you can see, this is completely unstable. One time 
it works, one time it doesn't.
But if I use a kernel compiled without UP IO-APIC, or if I boot an 
IO-APIC-capable kernel with the "noapic" option, then the problem is gone, 
and it is stable (really, this time).

But of course, I don't have no IO-APIC anymore...

[root@totor etc]# cat /proc/interrupts
           CPU0
  0:     423482          XT-PIC  timer
  1:       1083          XT-PIC  i8042
  2:          0          XT-PIC  cascade
  4:       1106          XT-PIC  serial
  7:       1543          XT-PIC  parport0
 10:       3527          XT-PIC  uhci_hcd:usb3, eth0, eth1, VIA8233
 11:      24934          XT-PIC  ide0, ide1, ide2, ide3, uhci_hcd:usb2, 
ehci_hcd:usb4
 12:      13809          XT-PIC  uhci_hcd:usb1, nvidia
 14:       3245          XT-PIC  ide4
 15:       3254          XT-PIC  ide5
NMI:          0
LOC:     423403
ERR:        270

Cheers.

-- 
Michel Bouissou <michel@bouissou.net> OpenPGP ID 0xDDE8AC6E

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

* Re: [SOLVED ??] Kernel 2.6.12 + IO-APIC + uhci_hcd = Trouble
  2005-07-11 21:21               ` [SOLVED ??] " Alan Stern
@ 2005-07-11 21:34                 ` Michel Bouissou
  2005-07-12  1:54                   ` Alan Stern
  0 siblings, 1 reply; 25+ messages in thread
From: Michel Bouissou @ 2005-07-11 21:34 UTC (permalink / raw)
  To: Alan Stern; +Cc: Protasevich, Natalie, linux-kernel

Le Lundi 11 Juillet 2005 23:21, Alan Stern a écrit :
> Don't jump to hasty conclusions.  Problems like this are often caused by
> unrelated things that you wouldn't suspect at first.

I know... Been working with computers for... Uh... 25 years ?

> Getting something to work once doesn't mean the problem has been fixed.

That's so sadly right ;-)

> And you can be fooled by coincidences.  (I would be surprised if that event
> above was really caused by plugging in the scanner, unless your UHCI
> hardware is broken.) 

I don't believe the hardware is broken, as it's been running for more than 2 
years 100% stable with a 24/7/365 uptime. And with me plugging and unplugging 
USB devices...

Never had a single problem of the kind with any 2.4.x kernel. Get those 
problems only with 2.6.x kernels, and, in 2.6.12, only when UP IO-APIC is 
enabled (which ran perfectly good in 2.4).

So the problem is circled to 2.6 kernel, uhci_hcd and UP IO-APIC.

> One thing you might try, time-consuming though it will be, is to remove or
> disable as much hardware as possible from your system.  If you can
> reliably determine that the problem occurs only when one particular piece
> of hardware is enabled, then you'll know how to proceed.

I can hardly remove my VIA chipset from the mobo, and the USB thing is in the 
VIA thing ;-))

And I'm afraid I won't have the time to play that much with hardware, besides 
the fact that this is supposed to be a server which usually has uptimes over 
90 days rather than reboot-for-testing-the-damn-kernel-once-again ;-))

But I'm pretty sure this is no hardware problem, unless 2.6 considers "bad 
hardware" what 2.4 used to consider "nice hardware"...

Cheers.

-- 
Michel Bouissou <michel@bouissou.net> OpenPGP ID 0xDDE8AC6E

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

* Re: [SOLVED ??] Kernel 2.6.12 + IO-APIC + uhci_hcd = Trouble
  2005-07-11 21:34                 ` Michel Bouissou
@ 2005-07-12  1:54                   ` Alan Stern
  2005-07-12  7:54                     ` Michel Bouissou
  0 siblings, 1 reply; 25+ messages in thread
From: Alan Stern @ 2005-07-12  1:54 UTC (permalink / raw)
  To: Michel Bouissou; +Cc: Protasevich, Natalie, linux-kernel

On Mon, 11 Jul 2005, Michel Bouissou wrote:

> Le Lundi 11 Juillet 2005 23:21, Alan Stern a écrit :
> > Don't jump to hasty conclusions.  Problems like this are often caused by
> > unrelated things that you wouldn't suspect at first.
> 
> I know... Been working with computers for... Uh... 25 years ?

35 years for me...  My, how the time flies!

> I don't believe the hardware is broken, as it's been running for more than 2 
> years 100% stable with a 24/7/365 uptime. And with me plugging and unplugging 
> USB devices...
> 
> Never had a single problem of the kind with any 2.4.x kernel. Get those 
> problems only with 2.6.x kernels, and, in 2.6.12, only when UP IO-APIC is 
> enabled (which ran perfectly good in 2.4).
> 
> So the problem is circled to 2.6 kernel, uhci_hcd and UP IO-APIC.

Don't rule out the hardware too quickly.  2.4 and 2.6 manage the UHCI
controllers in different ways.  In particular, the usb-uhci driver in 2.4
does not suspend the controller when no devices are attached, whereas
uhci-hcd in 2.6 does.  (So does the "alternate" uhci driver in 2.4.)  I
recently handled a bug report -- from another Frenchman -- where it turned
out that his UHCI hardware instantly crashed the entire system whenever
it resumed from the suspended state!

To try and help pin things down, tomorrow (i.e., Tuesday) I'll send you a
test patch to completely disable the UHCI controllers, leaving them awake
and idle, not generating interrupts.  If you still get those spurious
IRQs, they will have to come from somewhere else.  (Assuming you can
devote server time to this sort of testing...)

And of course, if the spurious IRQs stop then we'll know where to probe 
further.

Alan Stern


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

* Re: Kernel 2.6.12 + IO-APIC + uhci_hcd = Trouble
  2005-07-12  1:54                   ` Alan Stern
@ 2005-07-12  7:54                     ` Michel Bouissou
  2005-07-12 14:12                       ` Alan Stern
  0 siblings, 1 reply; 25+ messages in thread
From: Michel Bouissou @ 2005-07-12  7:54 UTC (permalink / raw)
  To: Alan Stern; +Cc: Protasevich, Natalie, linux-kernel

Le Mardi 12 Juillet 2005 03:54, Alan Stern a écrit :
> > So the problem is circled to 2.6 kernel, uhci_hcd and UP IO-APIC.
>
> Don't rule out the hardware too quickly.  2.4 and 2.6 manage the UHCI
> controllers in different ways.

I saw ;-)

> In particular, the usb-uhci driver in 2.4 does not suspend the controller
> when no devices are attached, whereas uhci-hcd in 2.6 does.  (So does the
> "alternate" uhci driver in 2.4.)  [...]

> To try and help pin things down, tomorrow (i.e., Tuesday) I'll send you a
> test patch to completely disable the UHCI controllers, leaving them awake
> and idle, not generating interrupts.  If you still get those spurious
> IRQs, they will have to come from somewhere else.  (Assuming you can
> devote server time to this sort of testing...)

I'll try my best, although I will have little time for playing with this until 
the end of this week, and will be on travel next week. But if you send me a 
test patch, I'll try my best to test it.

Cheers.

-- 
Michel Bouissou <michel@bouissou.net> OpenPGP ID 0xDDE8AC6E

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

* Re: Kernel 2.6.12 + IO-APIC + uhci_hcd = Trouble
  2005-07-12  7:54                     ` Michel Bouissou
@ 2005-07-12 14:12                       ` Alan Stern
  2005-07-12 17:03                         ` Michel Bouissou
  0 siblings, 1 reply; 25+ messages in thread
From: Alan Stern @ 2005-07-12 14:12 UTC (permalink / raw)
  To: Michel Bouissou; +Cc: Protasevich, Natalie, linux-kernel

On Tue, 12 Jul 2005, Michel Bouissou wrote:

> > To try and help pin things down, tomorrow (i.e., Tuesday) I'll send you a
> > test patch to completely disable the UHCI controllers, leaving them awake
> > and idle, not generating interrupts.  If you still get those spurious
> > IRQs, they will have to come from somewhere else.  (Assuming you can
> > devote server time to this sort of testing...)
> 
> I'll try my best, although I will have little time for playing with this until 
> the end of this week, and will be on travel next week. But if you send me a 
> test patch, I'll try my best to test it.

Okay, the patch (for 2.6.12) is below.  It does several things:

	Prevents the system from reading the port status registers,
	so the computer won't know when any devices are plugged in.

	Makes the system think there always is a device plugged in,
	so it will never automatically suspend the controllers.

	Leaves all the interrupt-enable bits turned off, so the
	controllers won't ever generate an interrupt request.

	Prints a message to the system log every time the interrupt
	handler is called.

In case it's not already clear, when you install this patch the UHCI 
controllers will not be useable.

Alan Stern


Index: linux-2.6.12/drivers/usb/host/uhci-hub.c
===================================================================
--- linux-2.6.12.orig/drivers/usb/host/uhci-hub.c
+++ linux-2.6.12/drivers/usb/host/uhci-hub.c
@@ -38,6 +38,7 @@ static int uhci_hub_status_data(struct u
 	struct uhci_hcd *uhci = hcd_to_uhci(hcd);
 	int port;
 
+	return 0;
 	*buf = 0;
 	for (port = 0; port < uhci->rh_numports; ++port) {
 		if ((inw(uhci->io_addr + USBPORTSC1 + port * 2) & RWC_BITS) ||
@@ -154,6 +155,7 @@ static int uhci_hub_control(struct usb_h
 		if (to_pci_dev(hcd->self.controller)->vendor ==
 				PCI_VENDOR_ID_VIA)
 			status ^= USBPORTSC_OC;
+		status = 0;
 
 		/* UHCI doesn't support C_RESET (always false) */
 		wPortChange = lstatus = 0;
Index: linux-2.6.12/drivers/usb/host/uhci-hcd.c
===================================================================
--- linux-2.6.12.orig/drivers/usb/host/uhci-hcd.c
+++ linux-2.6.12/drivers/usb/host/uhci-hcd.c
@@ -169,6 +169,7 @@ static irqreturn_t uhci_irq(struct usb_h
 	 * "HC Halted" status bit is persistent: it is RO, not R/WC.
 	 */
 	status = inw(io_addr + USBSTS);
+	dev_info(uhci_dev(uhci), "IRQ, status = %x\n", status);
 	if (!(status & ~USBSTS_HCH))	/* shared interrupt, not mine */
 		return IRQ_NONE;
 	outw(status, io_addr + USBSTS);		/* Clear it */
@@ -282,6 +283,7 @@ static int ports_active(struct uhci_hcd 
 	int connection = 0;
 	int i;
 
+	return 1;
 	for (i = 0; i < uhci->rh_numports; i++)
 		connection |= (inw(io_addr + USBPORTSC1 + i * 2) & USBPORTSC_CCS);
 
@@ -389,8 +391,10 @@ static int start_hc(struct uhci_hcd *uhc
 	/* Turn on PIRQ and all interrupts */
 	pci_write_config_word(to_pci_dev(uhci_dev(uhci)), USBLEGSUP,
 			USBLEGSUP_DEFAULT);
+#if 0
 	outw(USBINTR_TIMEOUT | USBINTR_RESUME | USBINTR_IOC | USBINTR_SP,
 		io_addr + USBINTR);
+#endif
 
 	/* Start at frame 0 */
 	outw(0, io_addr + USBFRNUM);
@@ -757,8 +761,10 @@ static int uhci_resume(struct usb_hcd *h
 				0);
 		outw(uhci->frame_number, uhci->io_addr + USBFRNUM);
 		outl(uhci->fl->dma_handle, uhci->io_addr + USBFLBASEADD);
+#if 0
 		outw(USBINTR_TIMEOUT | USBINTR_RESUME | USBINTR_IOC |
 				USBINTR_SP, uhci->io_addr + USBINTR);
+#endif
 		uhci->resume_detect = 1;
 		pci_write_config_word(to_pci_dev(uhci_dev(uhci)), USBLEGSUP,
 				USBLEGSUP_DEFAULT);


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

* Re: Kernel 2.6.12 + IO-APIC + uhci_hcd = Trouble
  2005-07-12 14:12                       ` Alan Stern
@ 2005-07-12 17:03                         ` Michel Bouissou
  2005-07-12 18:15                           ` Alan Stern
  2005-07-12 18:16                           ` Michel Bouissou
  0 siblings, 2 replies; 25+ messages in thread
From: Michel Bouissou @ 2005-07-12 17:03 UTC (permalink / raw)
  To: Alan Stern; +Cc: Protasevich, Natalie, linux-kernel

Le Mardi 12 Juillet 2005 16:12, Alan Stern a écrit :
>
> Okay, the patch (for 2.6.12) is below.  It does several things:
>
> 	Prevents the system from reading the port status registers,
> 	so the computer won't know when any devices are plugged in.
>
> 	Makes the system think there always is a device plugged in,
> 	so it will never automatically suspend the controllers.
>
> 	Leaves all the interrupt-enable bits turned off, so the
> 	controllers won't ever generate an interrupt request.
>
> 	Prints a message to the system log every time the interrupt
> 	handler is called.
>
> In case it's not already clear, when you install this patch the UHCI
> controllers will not be useable.

Okay, the patch applied easily and the kernel is now compiling. When 
installed, I'll try and boot it (and will use a PS/2 mouse instead of my 
current USB mouse, or should I rather try to plug my USB mouse to the 
ehci_hcd controller ?).

How would you like me to boot ? With or without the "usb-handoff" option ? 
With or without the BIOS "USB mouse support" option ?

And once booted, what information will you be interested in ?

-- 
Michel Bouissou <michel@bouissou.net> OpenPGP ID 0xDDE8AC6E

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

* Re: Kernel 2.6.12 + IO-APIC + uhci_hcd = Trouble
  2005-07-12 17:03                         ` Michel Bouissou
@ 2005-07-12 18:15                           ` Alan Stern
  2005-07-12 18:16                           ` Michel Bouissou
  1 sibling, 0 replies; 25+ messages in thread
From: Alan Stern @ 2005-07-12 18:15 UTC (permalink / raw)
  To: Michel Bouissou; +Cc: Protasevich, Natalie, linux-kernel

On Tue, 12 Jul 2005, Michel Bouissou wrote:

> > In case it's not already clear, when you install this patch the UHCI
> > controllers will not be useable.
> 
> Okay, the patch applied easily and the kernel is now compiling. When 
> installed, I'll try and boot it (and will use a PS/2 mouse instead of my 
> current USB mouse, or should I rather try to plug my USB mouse to the 
> ehci_hcd controller ?).

USB mice generally run at low speed.  This means that you _can't_ plug it 
into an EHCI controller -- the controller will see that it's not a 
high-speed device and will hand it over to a companion controller, which 
in your case will be UHCI.

> How would you like me to boot ? With or without the "usb-handoff" option ? 
> With or without the BIOS "USB mouse support" option ?

Use "usb-handoff" and turn off BIOS USB mouse support.

> And once booted, what information will you be interested in ?

I'll be interested in seeing if you still get the "IRQ 21 nobody cared" 
message.

Alan Stern


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

* Re: Kernel 2.6.12 + IO-APIC + uhci_hcd = Trouble
  2005-07-12 17:03                         ` Michel Bouissou
  2005-07-12 18:15                           ` Alan Stern
@ 2005-07-12 18:16                           ` Michel Bouissou
  2005-07-12 18:57                             ` Alan Stern
  1 sibling, 1 reply; 25+ messages in thread
From: Michel Bouissou @ 2005-07-12 18:16 UTC (permalink / raw)
  To: Alan Stern; +Cc: Protasevich, Natalie, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 2297 bytes --]

Le Mardi 12 Juillet 2005 19:03, Michel Bouissou a écrit :
>
> Okay, the patch applied easily and the kernel is now compiling. When
> installed, I'll try and boot it (and will use a PS/2 mouse instead of my
> current USB mouse, or should I rather try to plug my USB mouse to the
> ehci_hcd controller ?).
>
> How would you like me to boot ? With or without the "usb-handoff" option ?
> With or without the BIOS "USB mouse support" option ?

I've booted with the patched kernel in the following way:

- BIOS option for mouse support still off ;

- Kernel commandline:
kernel /vmlinuz-2.6.12-6mib7test root=/dev/evms/lv_racine ro 3 usb-handoff 
devfs=nomount noquiet vga=791

- USB mouse plugged to what I believe to be the USB 2.0 controller (according 
to the motherboard manual)

First thing I notice at boot is that "mouse doesn't work".

cat /proc/interrupts shows :
           CPU0       
  0:     208937    IO-APIC-edge  timer
  1:        334    IO-APIC-edge  i8042
  2:          0          XT-PIC  cascade
  4:        464    IO-APIC-edge  serial
  7:          3    IO-APIC-edge  parport0
 14:       1321    IO-APIC-edge  ide4
 15:       1330    IO-APIC-edge  ide5
 18:        822   IO-APIC-level  eth0, eth1
 19:      14157   IO-APIC-level  ide0, ide1, ide2, ide3, ehci_hcd:usb4
 21:      33962   IO-APIC-level  uhci_hcd:usb1, uhci_hcd:usb2, uhci_hcd:usb3
 22:          0   IO-APIC-level  VIA8233
NMI:          0 
LOC:     208855 
ERR:          0
MIS:          0


Looking at dmesg or /var/log/mesages shows a huge number of :
Jul 12 19:36:58 totor kernel: uhci_hcd 0000:00:10.2: IRQ, status = 0
Jul 12 19:36:58 totor kernel: uhci_hcd 0000:00:10.0: IRQ, status = 0
Jul 12 19:36:58 totor kernel: uhci_hcd 0000:00:10.1: IRQ, status = 0
Jul 12 19:36:58 totor kernel: uhci_hcd 0000:00:10.2: IRQ, status = 0

(3043 similar lines...)

...immediately at startup, then it stops complaining

The interesting thing is that I unplugged my USB mouse at 19:45 -- nothing 
happened, and plugged it back at 19:45:40, while looking at a "tail 
-f /var/log/messages"

And see what happened in the attached copy of my /var/log/messages for this 
session...

Doesn't mean anything to me ;-) but I hope it will be of some help for you...

Cheers.

-- 
Michel Bouissou <michel@bouissou.net> OpenPGP ID 0xDDE8AC6E

[-- Attachment #2: linux-2.6.12-6mib7test-msgs.txt.bz2 --]
[-- Type: application/x-bzip2, Size: 6916 bytes --]

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

* Re: Kernel 2.6.12 + IO-APIC + uhci_hcd = Trouble
  2005-07-12 18:16                           ` Michel Bouissou
@ 2005-07-12 18:57                             ` Alan Stern
  2005-07-12 20:40                               ` Michel Bouissou
  0 siblings, 1 reply; 25+ messages in thread
From: Alan Stern @ 2005-07-12 18:57 UTC (permalink / raw)
  To: Michel Bouissou; +Cc: Protasevich, Natalie, linux-kernel

On Tue, 12 Jul 2005, Michel Bouissou wrote:

> I've booted with the patched kernel in the following way:
> 
> - BIOS option for mouse support still off ;
> 
> - Kernel commandline:
> kernel /vmlinuz-2.6.12-6mib7test root=/dev/evms/lv_racine ro 3 usb-handoff 
> devfs=nomount noquiet vga=791

Okay, good.

> - USB mouse plugged to what I believe to be the USB 2.0 controller (according 
> to the motherboard manual)
> 
> First thing I notice at boot is that "mouse doesn't work".

As I explained in the previous message, the mouse ends up being connected 
to a UHCI controller no matter what port you plug it in to.

> cat /proc/interrupts shows :
>            CPU0       
>   0:     208937    IO-APIC-edge  timer
>   1:        334    IO-APIC-edge  i8042
>   2:          0          XT-PIC  cascade
>   4:        464    IO-APIC-edge  serial
>   7:          3    IO-APIC-edge  parport0
>  14:       1321    IO-APIC-edge  ide4
>  15:       1330    IO-APIC-edge  ide5
>  18:        822   IO-APIC-level  eth0, eth1
>  19:      14157   IO-APIC-level  ide0, ide1, ide2, ide3, ehci_hcd:usb4
>  21:      33962   IO-APIC-level  uhci_hcd:usb1, uhci_hcd:usb2, uhci_hcd:usb3
>  22:          0   IO-APIC-level  VIA8233
> NMI:          0 
> LOC:     208855 
> ERR:          0
> MIS:          0

Interesting, isn't it?  Even though the UHCI controllers are unable to 
generate interrupts, you're still getting thousands of interrupts requests 
on IRQ 21.

> Looking at dmesg or /var/log/mesages shows a huge number of :
> Jul 12 19:36:58 totor kernel: uhci_hcd 0000:00:10.2: IRQ, status = 0
> Jul 12 19:36:58 totor kernel: uhci_hcd 0000:00:10.0: IRQ, status = 0
> Jul 12 19:36:58 totor kernel: uhci_hcd 0000:00:10.1: IRQ, status = 0
> Jul 12 19:36:58 totor kernel: uhci_hcd 0000:00:10.2: IRQ, status = 0
> 
> (3043 similar lines...)
> 
> ...immediately at startup, then it stops complaining
> 
> The interesting thing is that I unplugged my USB mouse at 19:45 -- nothing 
> happened, and plugged it back at 19:45:40, while looking at a "tail 
> -f /var/log/messages"
> 
> And see what happened in the attached copy of my /var/log/messages for this 
> session...
> 
> Doesn't mean anything to me ;-) but I hope it will be of some help for you...

Status = 0 means the UHCI controller has no reason to request an
interrupt.  Given the good record of your hardware in the past, this
probably means that the controllers really were not generating interrupt
requests.  The alternative is that one of them _is_ generating an IRQ when 
it's not supposed to -- this seems pretty unlikely.

On the other hand, _something_ was generating an interrupt request that 
got mapped to IRQ 21 by the hardware.  And these requests do seem to be 
associated with USB activity.  Maybe the EHCI controller is responsible?
One of your postings showed both uhci_hcd:usb2 and ehci_hcd:usb4 mapped to 
IRQ 11.  That could indicate a shared signal line, which is currently 
being mapped incorrectly.

You can test this a couple of ways.  The easiest is to rmmod ehci_hcd, or 
prevent it from being loaded in the first place, by renaming 
/lib/modules/.../drivers/usb/host/ehci_hcd.ko so that modprobe can't find 
it.  Also your BIOS may offer the option of disabling USB 2.0 support 
entirely.  Try doing this under the kernel that has the test patch 
installed.

Without ehci_hcd loaded, the EHCI controller should not generate any
interrupt requests.  If your problem then goes away, and plugging or
unplugging the mouse doesn't cause anything unusual to happen, that will
be a pretty clear indication.

Alan Stern


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

* Re: Kernel 2.6.12 + IO-APIC + uhci_hcd = Trouble
  2005-07-12 18:57                             ` Alan Stern
@ 2005-07-12 20:40                               ` Michel Bouissou
  2005-07-12 21:37                                 ` Alan Stern
  0 siblings, 1 reply; 25+ messages in thread
From: Michel Bouissou @ 2005-07-12 20:40 UTC (permalink / raw)
  To: Alan Stern; +Cc: Protasevich, Natalie, linux-kernel

Le Mardi 12 Juillet 2005 20:57, Alan Stern a écrit :
> On the other hand, _something_ was generating an interrupt request that
> got mapped to IRQ 21 by the hardware.  And these requests do seem to be
> associated with USB activity.  Maybe the EHCI controller is responsible?
> One of your postings showed both uhci_hcd:usb2 and ehci_hcd:usb4 mapped to
> IRQ 11.  That could indicate a shared signal line, which is currently
> being mapped incorrectly.
>
> You can test this a couple of ways.  The easiest is to rmmod ehci_hcd, or
> prevent it from being loaded in the first place, by renaming
> /lib/modules/.../drivers/usb/host/ehci_hcd.ko so that modprobe can't find
> it.  Also your BIOS may offer the option of disabling USB 2.0 support
> entirely.  Try doing this under the kernel that has the test patch
> installed.

I've tested as you suggest :

- Disabled USB 2.0 in BIOS

- Renamed ehci_hcd.ko so that modprobe can't find it

- Booted the test-patched kernel with same options as previously, MOUSE 
UNPLUGGED.

- After boot "cat /proc/interrupts" shows "0" count for IRQ 21

- Nothing special isn't logged anymore in dmesg or /var/log/messages.

- Plugging / unplugging the mouse or other devices doesn't cause anything 
visible to happen. Nothing gets logged, IRQ 21 counter stays at 0. I could as 
well not have done it ;-)

> Without ehci_hcd loaded, the EHCI controller should not generate any
> interrupt requests.  If your problem then goes away, and plugging or
> unplugging the mouse doesn't cause anything unusual to happen, that will
> be a pretty clear indication.

Well, so that's a pretty clear indication, but surely clearer to you than to 
me ;-)

So, what's up, doc ? ;-))

-- 
Michel Bouissou <michel@bouissou.net> OpenPGP ID 0xDDE8AC6E

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

* Re: Kernel 2.6.12 + IO-APIC + uhci_hcd = Trouble
  2005-07-12 20:40                               ` Michel Bouissou
@ 2005-07-12 21:37                                 ` Alan Stern
  2005-07-12 22:01                                   ` Michel Bouissou
  0 siblings, 1 reply; 25+ messages in thread
From: Alan Stern @ 2005-07-12 21:37 UTC (permalink / raw)
  To: Michel Bouissou; +Cc: Protasevich, Natalie, linux-kernel

On Tue, 12 Jul 2005, Michel Bouissou wrote:

> I've tested as you suggest :
> 
> - Disabled USB 2.0 in BIOS
> 
> - Renamed ehci_hcd.ko so that modprobe can't find it
> 
> - Booted the test-patched kernel with same options as previously, MOUSE 
> UNPLUGGED.
> 
> - After boot "cat /proc/interrupts" shows "0" count for IRQ 21
> 
> - Nothing special isn't logged anymore in dmesg or /var/log/messages.
> 
> - Plugging / unplugging the mouse or other devices doesn't cause anything 
> visible to happen. Nothing gets logged, IRQ 21 counter stays at 0. I could as 
> well not have done it ;-)
> 
> > Without ehci_hcd loaded, the EHCI controller should not generate any
> > interrupt requests.  If your problem then goes away, and plugging or
> > unplugging the mouse doesn't cause anything unusual to happen, that will
> > be a pretty clear indication.
> 
> Well, so that's a pretty clear indication, but surely clearer to you than to 
> me ;-)
> 
> So, what's up, doc ? ;-))

Then it's definite.  The EHCI controller is issuing interrupt requests on
IRQ 21, but its driver is registered on a different IRQ.  Hence the
interrupts aren't getting handled correctly.

So probably the usb_handoff parameter won't be needed.  And if you leave 
USB 2.0 disabled in the BIOS then there's no need to hide ehci_hcd.ko, as 
it won't get loaded anyway.  You should be able to remove the test patch 
and resume normal operations.


On Tue, 12 Jul 2005, Protasevich, Natalie wrote:

> I suspect that some device is actually on the IRQ 21, and that's how its 
> IO-APIC line is set up. Later on, its driver tries to assign different
> IRQ, due to some discrepancy, and the handler gets registered on say IRQ
> 11, and to a wrong pin, so the actual interrupts go unattended. If this
> what's happening, the trace will hopefully tell the story. I suggest to
> boot with "apic=debug" and also perhaps with "pci=routeirq" and collect
> the trace. You can attach the part up to the point when it reports usb
> devices set up.

At this point I can leave it up to the two of you.  Now that we know which
is the offending device, it should be easy to find out why the IRQ
assignments go wrong.  That certainly needs to be fixed, even though
Michel's problem appears to be solved.

Alan Stern


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

* Re: Kernel 2.6.12 + IO-APIC + uhci_hcd = Trouble
  2005-07-12 21:37                                 ` Alan Stern
@ 2005-07-12 22:01                                   ` Michel Bouissou
  0 siblings, 0 replies; 25+ messages in thread
From: Michel Bouissou @ 2005-07-12 22:01 UTC (permalink / raw)
  To: Alan Stern; +Cc: Protasevich, Natalie, linux-kernel

Le Mardi 12 Juillet 2005 23:37, Alan Stern a écrit :
>
> Then it's definite.  The EHCI controller is issuing interrupt requests on
> IRQ 21, but its driver is registered on a different IRQ.  Hence the
> interrupts aren't getting handled correctly.
>
> So probably the usb_handoff parameter won't be needed.  And if you leave
> USB 2.0 disabled in the BIOS then there's no need to hide ehci_hcd.ko, as
> it won't get loaded anyway.  You should be able to remove the test patch
> and resume normal operations.

I've just booted an IO-APIC capable kernel without the test patch (but with 
Nathalie's 2 patches), without "usb_handoff", with USB 2.0 DISABLED and USB 
mouse support ENABLED in BIOS.

It seems it works good, and ehci support is not loaded.

[root@totor etc]# cat /proc/interrupts
           CPU0
  0:     425367    IO-APIC-edge  timer
  1:       1698    IO-APIC-edge  i8042
  2:          0          XT-PIC  cascade
  4:       1169    IO-APIC-edge  serial
  7:          2    IO-APIC-edge  parport0
 14:       3337    IO-APIC-edge  ide4
 15:       3346    IO-APIC-edge  ide5
 16:      15142   IO-APIC-level  nvidia
 18:       1707   IO-APIC-level  eth0, eth1
 19:      25211   IO-APIC-level  ide0, ide1, ide2, ide3
 21:       3210   IO-APIC-level  uhci_hcd:usb1, uhci_hcd:usb2, uhci_hcd:usb3
 22:       2761   IO-APIC-level  VIA8233
NMI:          0
LOC:     425302
ERR:          0
MIS:          0

Plugging or unplugging USB devices doesn't cause no IRQ insults anymore ;-)


> On Tue, 12 Jul 2005, Protasevich, Natalie wrote:
> > I suspect that some device is actually on the IRQ 21, and that's how its
> > IO-APIC line is set up. Later on, its driver tries to assign different
> > IRQ, due to some discrepancy, and the handler gets registered on say IRQ
> > 11, and to a wrong pin, so the actual interrupts go unattended. If this
> > what's happening, the trace will hopefully tell the story. I suggest to
> > boot with "apic=debug" and also perhaps with "pci=routeirq" and collect
> > the trace. You can attach the part up to the point when it reports usb
> > devices set up.
>
> At this point I can leave it up to the two of you.

Well, many thanks again for you precious help Alan !

> Now that we know which is the offending device, it should be easy to find
> out why the IRQ assignments go wrong.  That certainly needs to be fixed,
> even though Michel's problem appears to be solved.

Well, it's solved by currently giving me the choice between no USB 2.0 and 
IO-APIC, or USB 2.0 and no IO-APIC. That makes a temporary solution, but I'd 
love to have both (and recall the happy times of 2.4x that was happy with 
both ;-)

Natalie, could you please tell me which kernel (I have started to have a 
number of them ;-) you'd like me <<  to boot with "apic=debug" and also 
perhaps with "pci=routeirq" and collect the trace >>, and with which BIOS 
setup ? (i.e. USB 2.0 enabled or disabled ?).

When you speak about "collecting the trace", I assume you mean the dmesg 
or /var/log/messages I'll get after booting this way ?

Thanks again to both of you Alan and Natalie. Everytime I run into serious 
trouble I remember why I love Free Software and the Free Software 
Community ;-)

Cheers.

-- 
Michel Bouissou <michel@bouissou.net> OpenPGP ID 0xDDE8AC6E

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

* Re: [SOLVED ??] Kernel 2.6.12 + IO-APIC + uhci_hcd = Trouble
  2005-07-11 19:52 [SOLVED ??] " Protasevich, Natalie
  2005-07-11 20:13 ` Michel Bouissou
@ 2005-07-12  7:24 ` Alexander Fieroch
  1 sibling, 0 replies; 25+ messages in thread
From: Alexander Fieroch @ 2005-07-12  7:24 UTC (permalink / raw)
  To: linux-kernel

Protasevich, Natalie wrote:
>>>You can also try adding the "usb-handoff" kernel parameter to your 
>>>boot command line.
>>
> Alexander, should you try this option? (Just in case if you haven't noticed this thread)...

Hm, no. All errors still occur. :-(

Regards,
Alexander


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

* Re: [SOLVED ??] Kernel 2.6.12 + IO-APIC + uhci_hcd = Trouble
  2005-07-11 19:52 [SOLVED ??] " Protasevich, Natalie
@ 2005-07-11 20:13 ` Michel Bouissou
  2005-07-12  7:24 ` Alexander Fieroch
  1 sibling, 0 replies; 25+ messages in thread
From: Michel Bouissou @ 2005-07-11 20:13 UTC (permalink / raw)
  To: Protasevich, Natalie; +Cc: Alan Stern, linux-kernel

Le Lundi 11 Juillet 2005 21:52, Protasevich, Natalie a écrit :
>
> Michel, it would be interesting to see if you have problems with the kernel
> that doesn't have the fix posted in that bugzilla yet, but only has my
> first patch.

Do you mean the patch 
http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c434b7a6aedfe428ad17cd61b21b125a7b7a29ce
alone ?

I'll try to compile a kernel this way tomorrow, it's a bit late tonight...

Furthermore, please tell me if there are risks that I seriously break let's 
say my IDE devices interrupts doing this?
I use EVMS software RAID-5, and I don't want any problem with my RAID-5 set 
(I'm just out of some that took me hours...) especially because the EVMS 
snapshots I use for performing backups don't work anymore (I mean: are 
horribly broke) since I upgraded to a 2.6 series kernel.

This is quite another file, but just to explain that I don't have any recent 
and reliable backup these days, not time for me to take any unnecessary risk 
with my RAID-5 set until this gets fixed...

> Thank you Alan! You helped me too, since my patch has broken a couple VIA
> chips lately. Now I know that at least the fix works...

Well, that's what I'm worried about ;-))

Anyway, here are the differences I already noticed with and without your two 
patches, regarding the way the interrupts are distributed:

1/ Without your patches	(from an old note I took) :

[root@totor etc]# cat /proc/interrupts
           CPU0
  0:     626375    IO-APIC-edge  timer
  1:       1599    IO-APIC-edge  i8042
  2:          0          XT-PIC  cascade
  4:       1708    IO-APIC-edge  serial
  7:          2    IO-APIC-edge  parport0
 14:      19858    IO-APIC-edge  ide2
 15:       5220    IO-APIC-edge  ide3
 16:      30711   IO-APIC-level  nvidia
 18:       1799   IO-APIC-level  eth0, eth1
 19:     103365   IO-APIC-level  ide0, ide1, ehci_hcd:usb4, aic7xxx
 21:      47273   IO-APIC-level  uhci_hcd:usb1, uhci_hcd:usb2, uhci_hcd:usb3
 22:       2782   IO-APIC-level  VIA8233

(I've removed an SCSI controller and added another 2-channel IDE controller 
between the 2 outputs)

2/ With your 2 patches :

> > [root@totor etc]# cat /proc/interrupts
> >            CPU0
> >   0:     934501    IO-APIC-edge  timer
> >   1:       4611    IO-APIC-edge  i8042
> >   2:          0          XT-PIC  cascade
> >   4:       2779    IO-APIC-edge  serial
> >   7:          3    IO-APIC-edge  parport0
> >  14:       7909    IO-APIC-edge  ide4
> >  15:       7918    IO-APIC-edge  ide5
> >  16:      38447   IO-APIC-level  nvidia
> >  18:       2982   IO-APIC-level  eth0, eth1
> >  19:      37041   IO-APIC-level  ide0, ide1, ide2, ide3, ehci_hcd:usb4
> >  21:      52036   IO-APIC-level  uhci_hcd:usb1,
> > uhci_hcd:usb2, uhci_hcd:usb3
> >  22:       2850   IO-APIC-level  VIA8233
> > NMI:          0
> > LOC:     934453
> > ERR:          0
> > MIS:          0

Cheers.

-- 
Michel Bouissou <michel@bouissou.net> OpenPGP ID 0xDDE8AC6E

La Marseillaise sera d'autant moins sifflée qu'elle sera entonnée par tous.
	-- Raffoirius, Premier Ministre

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

* RE: [SOLVED ??] Kernel 2.6.12 + IO-APIC + uhci_hcd = Trouble
@ 2005-07-11 19:52 Protasevich, Natalie
  2005-07-11 20:13 ` Michel Bouissou
  2005-07-12  7:24 ` Alexander Fieroch
  0 siblings, 2 replies; 25+ messages in thread
From: Protasevich, Natalie @ 2005-07-11 19:52 UTC (permalink / raw)
  To: Michel Bouissou, Alan Stern, fieroch; +Cc: linux-kernel, mingo

> Le Lundi 11 Juillet 2005 20:36, Alan Stern a écrit :
> > It's also possible that the UHCI controllers are generating the 
> > unwanted interrupt requests.  You should make sure that Legacy USB 
> > Support is turned off in your BIOS settings.
> 
> My motherboard both holds USB 1.1 and USB 2.0 controllers. I 
> don't have a "Legacy USB Support" option in my BIOS, all my 
> USB options are the following:
> 
> Enable USB 1.1 controller: YES	(Surely relates to my 
> true USB 1.1 controller)
> 
> Enable USB 2.0 controller: YES	(Same for the high 
> speed controller ?)
> 
> Enable USB keyboard: NO
> 
> Enable USB mouse support: YES	(Well, I have one ;-)
> 
> I didn't change anything regarding these so far.
> 
> > You can also try adding the "usb-handoff" kernel parameter to your 
> > boot command line.
> 
> Hey !! This one looks like the MIRACLE-OPTION !!

Alexander, should you try this option? (Just in case if you haven't noticed this thread)...

> I just booted using my 2.6.12 kernel patched with Nathalie's 
> patches (don't know if they help in there...) and the problem 
> seems to be gone !

Michel, it would be interesting to see if you have problems with the kernel that doesn't have the fix posted in that bugzilla yet, but only has my first patch.
 
> Nothing complains anymore about the interrupt. I have:
> 
> [root@totor etc]# cat /proc/interrupts
>            CPU0
>   0:     934501    IO-APIC-edge  timer
>   1:       4611    IO-APIC-edge  i8042
>   2:          0          XT-PIC  cascade
>   4:       2779    IO-APIC-edge  serial
>   7:          3    IO-APIC-edge  parport0
>  14:       7909    IO-APIC-edge  ide4
>  15:       7918    IO-APIC-edge  ide5
>  16:      38447   IO-APIC-level  nvidia
>  18:       2982   IO-APIC-level  eth0, eth1
>  19:      37041   IO-APIC-level  ide0, ide1, ide2, ide3, ehci_hcd:usb4
>  21:      52036   IO-APIC-level  uhci_hcd:usb1, 
> uhci_hcd:usb2, uhci_hcd:usb3
>  22:       2850   IO-APIC-level  VIA8233
> NMI:          0
> LOC:     934453
> ERR:          0
> MIS:          0
> 
> 
> ...now let's see with time if this is stable...
> 
> A thousand thanks for your suggestion Alan !
>
 
Thank you Alan! You helped me too, since my patch has broken a couple VIA chips lately. Now I know that at least the fix works...

 

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

end of thread, other threads:[~2005-07-12 22:02 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-10 18:50 Kernel 2.6.12 + IO-APIC + uhci_hcd = Trouble Protasevich, Natalie
2005-07-11  9:06 ` Michel Bouissou
2005-07-11 18:36   ` Alan Stern
2005-07-11 19:33     ` [SOLVED ??] " Michel Bouissou
2005-07-11 19:43       ` Alan Stern
2005-07-11 20:02         ` Michel Bouissou
2005-07-11 20:16           ` Alan Stern
2005-07-11 20:46             ` Michel Bouissou
2005-07-11 20:58               ` Michel Bouissou
2005-07-11 21:21                 ` [NOT solved] " Michel Bouissou
2005-07-11 21:21               ` [SOLVED ??] " Alan Stern
2005-07-11 21:34                 ` Michel Bouissou
2005-07-12  1:54                   ` Alan Stern
2005-07-12  7:54                     ` Michel Bouissou
2005-07-12 14:12                       ` Alan Stern
2005-07-12 17:03                         ` Michel Bouissou
2005-07-12 18:15                           ` Alan Stern
2005-07-12 18:16                           ` Michel Bouissou
2005-07-12 18:57                             ` Alan Stern
2005-07-12 20:40                               ` Michel Bouissou
2005-07-12 21:37                                 ` Alan Stern
2005-07-12 22:01                                   ` Michel Bouissou
2005-07-11 19:52 [SOLVED ??] " Protasevich, Natalie
2005-07-11 20:13 ` Michel Bouissou
2005-07-12  7:24 ` Alexander Fieroch

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).