2006-02-04 00:50:31

by Martin Michlmayr

[permalink] [raw]
Subject: Bad interaction between uhci_hcd and de2104x

I have a machine on which the de2104x driver doesn't work when
uhci_hcd is loaded. It used to work fine with 2.4 and the tulip
driver (and usb-uhci). Basically, when I boot I get the following
traceback and then eth0 doesn't work. When I unload de2104x and
uhci_hcd and load only de2104x again then Ethernet works. Similarly,
when I completely blacklist the uhci_hcd module the de2104x driver
works without any problems.


eth0: enabling interface
eth0: set link 10baseT auto
eth0: mode 0x7ffc0040, sia 0x10c4,0xffffef01,0xffffffff,0xffff0008
eth0: set mode 0x7ffc0040, set sia 0xef01,0xffff,0x8
irq 10: nobody cared (try booting with the "irqpoll" option)
[<c012f89e>] __report_bad_irq+0x31/0x73
[<c012f96d>] note_interrupt+0x75/0x98
[<c012f46a>] __do_IRQ+0x67/0x91
[<c0104fc1>] do_IRQ+0x19/0x24
[<c0103afa>] common_interrupt+0x1a/0x20
[<c0119a1c>] __do_softirq+0x2c/0x7d
[<c0119a8f>] do_softirq+0x22/0x26
[<c0104fc6>] do_IRQ+0x1e/0x24
[<c0103afa>] common_interrupt+0x1a/0x20
[<c481da07>] de_set_rx_mode+0xf/0x12 [de2104x]
[<c481e2c1>] de_init_hw+0x6d/0x76 [de2104x]
[<c481e59e>] de_open+0x64/0xe4 [de2104x]
[<c0225a5f>] dev_open+0x30/0x66
[<c0226a9a>] dev_change_flags+0x4d/0xf0
[<c025d301>] devinet_ioctl+0x224/0x4bd
[<c0155541>] do_ioctl+0x21/0x50
[<c0155774>] vfs_ioctl+0x152/0x161
[<c01557cb>] sys_ioctl+0x48/0x65
[<c0102a99>] syscall_call+0x7/0xb
handlers:
[<c4890d97>] (usb_hcd_irq+0x0/0x56 [usbcore])
Disabling IRQ #10

lspci information:

0000:00:07.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 02) (prog-if 00 [UHCI])
Subsystem: VIA Technologies, Inc. (Wrong ID) USB Controller
Flags: bus master, medium devsel, latency 64, IRQ 10
I/O ports at e400 [size=32]

0000:00:0b.0 Ethernet controller: Digital Equipment Corporation DECchip 21041 [Tulip Pass 3] (rev 11)
Flags: bus master, medium devsel, latency 64, IRQ 10
I/O ports at e800 [size=128]
Memory at e8000000 (32-bit, non-prefetchable) [size=128]
Expansion ROM at e7000000 [disabled] [size=256K]

Attached are two boot logs:
1. Booting, loading both drivers, unloading both, loading de2104x
again.
2. Booting with the uhci_hcd module being blacklisted.

--
Martin Michlmayr
http://www.cyrius.com/


Attachments:
(No filename) (2.19 kB)
2.6.15-dereg-hcd-reload-de (10.07 kB)
2.6.15-no-hcd (7.82 kB)
Download all attachments

2006-02-04 03:31:03

by Alan Stern

[permalink] [raw]
Subject: Re: Bad interaction between uhci_hcd and de2104x

On Sat, 4 Feb 2006, Martin Michlmayr wrote:

> I have a machine on which the de2104x driver doesn't work when
> uhci_hcd is loaded. It used to work fine with 2.4 and the tulip
> driver (and usb-uhci). Basically, when I boot I get the following
> traceback and then eth0 doesn't work. When I unload de2104x and
> uhci_hcd and load only de2104x again then Ethernet works. Similarly,
> when I completely blacklist the uhci_hcd module the de2104x driver
> works without any problems.

And presumably, if you blacklist the de2104x driver then your USB
controller works without any problems.

> eth0: enabling interface
> eth0: set link 10baseT auto
> eth0: mode 0x7ffc0040, sia 0x10c4,0xffffef01,0xffffffff,0xffff0008
> eth0: set mode 0x7ffc0040, set sia 0xef01,0xffff,0x8
> irq 10: nobody cared (try booting with the "irqpoll" option)
> [<c012f89e>] __report_bad_irq+0x31/0x73
> [<c012f96d>] note_interrupt+0x75/0x98
> [<c012f46a>] __do_IRQ+0x67/0x91
> [<c0104fc1>] do_IRQ+0x19/0x24
> [<c0103afa>] common_interrupt+0x1a/0x20
> [<c0119a1c>] __do_softirq+0x2c/0x7d
> [<c0119a8f>] do_softirq+0x22/0x26
> [<c0104fc6>] do_IRQ+0x1e/0x24
> [<c0103afa>] common_interrupt+0x1a/0x20
> [<c481da07>] de_set_rx_mode+0xf/0x12 [de2104x]
> [<c481e2c1>] de_init_hw+0x6d/0x76 [de2104x]
> [<c481e59e>] de_open+0x64/0xe4 [de2104x]
> [<c0225a5f>] dev_open+0x30/0x66
> [<c0226a9a>] dev_change_flags+0x4d/0xf0
> [<c025d301>] devinet_ioctl+0x224/0x4bd
> [<c0155541>] do_ioctl+0x21/0x50
> [<c0155774>] vfs_ioctl+0x152/0x161
> [<c01557cb>] sys_ioctl+0x48/0x65
> [<c0102a99>] syscall_call+0x7/0xb
> handlers:
> [<c4890d97>] (usb_hcd_irq+0x0/0x56 [usbcore])
> Disabling IRQ #10

For some reason, the de2104x driver isn't listed as a handler for IRQ 10.
That's probably the cause of the problem. Did you have any full- or
low-speed USB devices plugged in at the time this occurred? If you didn't
then the UHCI hardware would not have generated any interrupt requests.

Alan Stern

2006-02-04 11:15:36

by Martin Michlmayr

[permalink] [raw]
Subject: Re: Bad interaction between uhci_hcd and de2104x

* Alan Stern <[email protected]> [2006-02-03 22:30]:
> > When I unload de2104x and uhci_hcd and load only de2104x again
> > then Ethernet works. Similarly, when I completely blacklist the
> > uhci_hcd module the de2104x driver works without any problems.
>
> And presumably, if you blacklist the de2104x driver then your USB
> controller works without any problems.
...
> For some reason, the de2104x driver isn't listed as a handler for
> IRQ 10. That's probably the cause of the problem. Did you have any
> full- or low-speed USB devices plugged in at the time this occurred?
> If you didn't then the UHCI hardware would not have generated any
> interrupt requests.

No, I don't think I ever used USB on this machine. I did some more
tests based on what you said and have the following data points:
- Having a USB device (USB stick) plugged in when booting doesn't
make a difference.
- When I load the de2104x driver _before_ uhci_hcd, both USB and
Ethernet work fine.
- Both modules load fine. USB also works. The problem only occurs
when I actually try to use the Ethernet device (i.e. run DHCP).
Then I get that traceback, and USB also stops working.

--
Martin Michlmayr
http://www.cyrius.com/

2006-02-04 16:09:49

by Alan Stern

[permalink] [raw]
Subject: Re: Bad interaction between uhci_hcd and de2104x

On Sat, 4 Feb 2006, Martin Michlmayr wrote:

> > For some reason, the de2104x driver isn't listed as a handler for
> > IRQ 10. That's probably the cause of the problem. Did you have any
> > full- or low-speed USB devices plugged in at the time this occurred?
> > If you didn't then the UHCI hardware would not have generated any
> > interrupt requests.
>
> No, I don't think I ever used USB on this machine. I did some more
> tests based on what you said and have the following data points:
> - Having a USB device (USB stick) plugged in when booting doesn't
> make a difference.
> - When I load the de2104x driver _before_ uhci_hcd, both USB and
> Ethernet work fine.
> - Both modules load fine. USB also works. The problem only occurs
> when I actually try to use the Ethernet device (i.e. run DHCP).
> Then I get that traceback, and USB also stops working.

It sure looks as though the ethernet interface is generating an interrupt
request before the de2104x driver has registered its interrupt handler.
When uhci-hcd isn't already loaded the IRQ is unused, hence disabled, and
so nothing bad happens. If uhci-hcd is already loaded then the IRQ is
enabled (because uhci-hcd is using it), so you get the problem -- an
interrupt occurs with no registered handler.

Alan Stern

2006-02-04 22:14:32

by Martin Michlmayr

[permalink] [raw]
Subject: Re: Bad interaction between uhci_hcd and de2104x

* Alan Stern <[email protected]> [2006-02-04 11:09]:
> It sure looks as though the ethernet interface is generating an
> interrupt request before the de2104x driver has registered its
> interrupt handler. When uhci-hcd isn't already loaded the IRQ is
> unused, hence disabled, and so nothing bad happens. If uhci-hcd is
> already loaded then the IRQ is enabled (because uhci-hcd is using
> it), so you get the problem -- an interrupt occurs with no
> registered handler.

Jeff, should I resend my report to the netdev list?

By the way, http://bugs.debian.org/288821 looks like a related issue.
There the traceback indicates interrupts too:

eth0: set link 10baseT auto
eth0: mode 0x7ffc0040, sia 0x10c4,0xffffef01,0xffffffff,0xffff0008
eth0: set mode 0x7ffc0040, set sia 0xef01,0xffff,0x8
[__report_bad_irq+42/144] __report_bad_irq+0x2a/0x90
[note_interrupt+108/160] note_interrupt+0x6c/0xa0
[do_IRQ+289/304] do_IRQ+0x121/0x130
[common_interrupt+24/32] common_interrupt+0x18/0x20
[__do_softirq+48/128] __do_softirq+0x30/0x80
[acpi_irq+0/22] acpi_irq+0x0/0x16
[do_softirq+38/48] do_softirq+0x26/0x30
[do_IRQ+253/304] do_IRQ+0xfd/0x130
[common_interrupt+24/32] common_interrupt+0x18/0x20
[__crc_do_softirq+25311/208152] de_set_rx_mode+0x26/0x50 [de2104x]
[__crc_do_softirq+28277/208152] de_init_hw+0x8c/0x90 [de2104x]
[__crc_do_softirq+29105/208152] de_open+0x68/0x140 [de2104x]
[profile_hook+45/75] profile_hook+0x2d/0x4b
[dev_open+203/256] dev_open+0xcb/0x100
[dev_mc_upload+36/80] dev_mc_upload+0x24/0x50
[dev_change_flags+81/288] dev_change_flags+0x51/0x120
[devinet_ioctl+582/1424] devinet_ioctl+0x246/0x590
[inet_ioctl+94/160] inet_ioctl+0x5e/0xa0
[sock_ioctl+249/688] sock_ioctl+0xf9/0x2b0
[sys_ioctl+269/656] sys_ioctl+0x10d/0x290
[syscall_call+7/11] syscall_call+0x7/0xb
eth0: link up, media 10baseT auto

--
Martin Michlmayr
http://www.cyrius.com/