Skip to contentSkip to conversation

USB host drivers test results (2.5.19) and problem.

DISCUSSION Stelian Pop 4 participants 9 messages May 31, 2002

lore
Share & tools
lore
#0 lore raw

Hi,

Now that a 2.5 kernel boots again on my laptop (thanks to the ACPI IRQ routing problems being resolved :-) ), I tested the different USB host drivers available (I used to use usb-uhci before).

lspci:

	00:07.2 USB Controller: Intel Corp. 82371AB/EB/MB PIIX4 USB (rev 01)

Results (only simple tests with a USB mouse performed):
ehci-hcd.o
does load, no output messages, does NOT work
ohci-hcd.o
does load, no output messages, does NOT work
uhci-hcd.o
does load, does work correctly
usb-uhci-hcd.o
does load, does work correctly.

1. Shouldn't the ehci/ohci drivers give some error on loading, since I obviously don't have the hardware ?

2 When doing a rmmod on one of the two last drivers, the kernel oopses with a (hand copied trace):

	bad EIP: c784fbda <[usbcore]rh_report_status+63/143>
	
	c0118f34 <__run_task_queue+61/6a>
	c784f677 <[usbcore]usb_reset_device+1d4/2df>
	c011be58 <timer_bh+22b/27c>
	c0118e48 <bh_action+26/74>
	c0118d79 <tasklet_hi_action+38/59>
	c0118bb7 <do_softirq+57/b1>
	c01099a0 <do_IRQ+da/e5>
	c0108656 <common_interrupt+22/28>
	c01abd54 <acpi_processor_idle+e9/1eb>
	c0106b54 <gunzip+45c/4bc>
	c0106bd0 <default_idle+0/27>
	c01abc6b <acpi_processor_idle+0/1eb>
	c0106bd0 <default_idle+0/27>
	c0106c5a <cpu_idle+2e/3d>
	c0105000 <_stext+0/0>

Another one:

	bad EIP: <c78ed365> <[yenta_socket]yenta_allocate_resources+d/41>

	Adhoc c011be58 <timer_bh+22b/27c>
	Adhoc c0118e48 <bh_action+26/74>
	Adhoc c0118d79 <tasklet_hi_action+38/59>
	Adhoc c0118bb7 <do_softirq+57/b1>
	Adhoc c01099a0 <do_IRQ+da/e5>
	Adhoc c0108656 <common_interrupt+22/28>
	Adhoc c01abd54 <acpi_processor_idle+e9/1eb>

I'm not sure what this trace has to do with USB at all, but I haven't been able to reproduce the oops otherwise...

Stelian.

Signature · 2 lines
Stelian Pop <[email protected]>
Alcove - http://www.alcove.com
#1 lore raw
Quoted 2 lines · [email protected] said:

1. Shouldn't the ehci/ohci drivers give some error on loading, since
I obviously don't have the hardware ?

How do they know that? You could have it in your hand and be just about to insert it.

--
dwmw2

#2 lore raw
In reply to Stelian Pop
Quoted 5 lines · David Woodhouse
Quoted 2 lines

1. Shouldn't the ehci/ohci drivers give some error on loading, since
I obviously don't have the hardware ?

How do they know that? You could have it in your hand and be just about to insert it.

PCI hotplug ? I fergot about that one...

However, maybe even a hotplug aware driver should print out a message upon initialization telling 'no hardware found'... It could be useful when you want to know the difference between:
* bad driver, use another one
* good driver, but doesn't recognize/init the hardware because it's buggy.

Stelian.

Signature · 2 lines
Stelian Pop <[email protected]>
Alcove - http://www.alcove.com
#3 lore raw
In reply to Stelian Pop
Quoted 2 lines · Stelian Pop

1. Shouldn't the ehci/ohci drivers give some error on loading, since I obviously don't have the hardware ?

Yes, they should not load. I'll try to look into this.

Quoted 2 lines

2 When doing a rmmod on one of the two last drivers, the kernel oopses with a (hand copied trace):

If you remove _any_ pci driver module from 2.5.19 you get an oops, this isn't limited to the USB drivers right now :)

thanks,

greg k-h

#4 lore raw
In reply to Stelian Pop
Quoted 7 lines · David Woodhouse
Quoted 2 lines · [email protected] said:

1. Shouldn't the ehci/ohci drivers give some error on loading, since
I obviously don't have the hardware ?

How do they know that? You could have it in your hand and be just about to insert it.

They should not load, like any other pci driver that should not load if you don't have the hardware present for it.

thanks,

greg k-h

#5 lore raw
In reply to Stelian Pop
Quoted 5 lines · Greg KH
Quoted 2 lines

2 When doing a rmmod on one of the two last drivers, the kernel oopses with a (hand copied trace):

If you remove _any_ pci driver module from 2.5.19 you get an oops, this isn't limited to the USB drivers right now :)

Yep, I saw that afterwards when shutting down my laptop.

Sorry for having incriminated the USB subsystem for that :-)

Stelian.

Signature · 2 lines
Stelian Pop <[email protected]>
Alcove - http://www.alcove.com
#6 lore raw
In reply to Stelian Pop
Quoted 8 lines · Greg KH
Quoted 5 lines
Quoted 2 lines

1. Shouldn't the ehci/ohci drivers give some error on loading, since
I obviously don't have the hardware ?

How do they know that? You could have it in your hand and be just about to insert it.

They should not load, like any other pci driver that should not load if you don't have the hardware present for it.

What about the PCI hotplug case, as David suggested ?

Stelian.

Signature · 2 lines
Stelian Pop <[email protected]>
Alcove - http://www.alcove.com
#7 lore raw
In reply to Stelian Pop
Quoted 5 lines · Stelian Pop
Quoted 3 lines · Greg KH
Quoted 3 lines
Quoted 2 lines

1. Shouldn't the ehci/ohci drivers give some error on loading, since
I obviously don't have the hardware ?

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

How do they know that? You could have it in your hand and be just about to insert it.

They should not load, like any other pci driver that should not load if you don't have the hardware present for it.

What about the PCI hotplug case, as David suggested ?

When the pci hotplug core sees a new device it calls out to /sbin/hotplug to load any available driver (if necessary). So if you later plug in the device, everything will work just fine.

Well, that's the way it's _supposed_ to work, but the pci core changes in 2.5.19 seem to have broken this too :(

/me looks for Pat Mochel...

thanks,

greg k-h

#8 lore raw
In reply to Stelian Pop
Quoted 5 lines · Stelian Pop

However, maybe even a hotplug aware driver should print out a message upon initialization telling 'no hardware found'... It could be useful when you want to know the difference between:
* bad driver, use another one
* good driver, but doesn't recognize/init the hardware because it's buggy.

Even if you have the driver compiled in, and there is no hotplug, you still don't want every driver complaining about not having suitable hardware. Think distribution kernels (or "kernel that handles my heterogenous lab") and network device drivers...

Brad

Signature · 1 line
http://conf.linux.org.au. 22-25Jan2003. Perth, Australia. Birds in Black.