I'm not sure if this is sparc specific, but since 2.4.5 I get an oops loading
usbnet. Attached is a tiny patch to usbcore that fixes the oops for me. The
problem is usb_disable_interface is called before any alternates are set.
PROMLIB: Sun IEEE Boot Prom 4.0.6 2001/02/19 09:56
Linux version 2.6.5 ([EMAIL PROTECTED]) (gcc version 3.3.3 20040217 (Gentoo Linux
3.3.3)) #7 Thu Apr 8 18:39:54 EDT 2004
ARCH: SUN4U
...
drivers/usb/core/usb.c: registered new driver usbfs
drivers/usb/core/usb.c: registered new driver hub
ohci_hcd: 2004 Feb 02 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)
ohci_hcd: block sizes: ed 80 td 96
ohci_hcd 0000:00:0a.0: ALi Corporation USB 1.1 Controller
ohci_hcd 0000:00:0a.0: reset, control = 0xc0
ohci_hcd 0000:00:0a.0: irq 14,7e4, pci mem 000001ff01000000
ohci_hcd 0000:00:0a.0: new USB bus registered, assigned bus number 1
ohci_hcd 0000:00:0a.0: root hub device address 1
usb usb1: new device strings: Mfr=3, Product=2, SerialNumber=1
drivers/usb/core/message.c: USB device number 1 default language ID 0x409
usb usb1: Product: ALi Corporation USB 1.1 Controller
usb usb1: Manufacturer: Linux 2.6.5 ohci_hcd
usb usb1: SerialNumber: 0000:00:0a.0
drivers/usb/core/usb.c: usb_hotplug
usb usb1: registering 1-0:1.0 (config #1, interface 0)
drivers/usb/core/usb.c: usb_hotplug
hub 1-0:1.0: usb_probe_interface
hub 1-0:1.0: usb_probe_interface - got id
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
hub 1-0:1.0: standalone hub
hub 1-0:1.0: ganged power switching
hub 1-0:1.0: global over-current protection
hub 1-0:1.0: Port indicators are not supported
hub 1-0:1.0: power on to power good time: 4ms
hub 1-0:1.0: hub controller current requirement: 0mA
hub 1-0:1.0: local power source is good
hub 1-0:1.0: no over-current condition exists
hub 1-0:1.0: enabling power on all ports
ohci_hcd 0000:00:0a.0: created debug files
ohci_hcd 0000:00:0a.0: OHCI controller state
ohci_hcd 0000:00:0a.0: OHCI 1.0, with legacy support registers
ohci_hcd 0000:00:0a.0: control 0x083 HCFS=operational CBSR=3
ohci_hcd 0000:00:0a.0: cmdstatus 0x00000 SOC=0
ohci_hcd 0000:00:0a.0: intrstatus 0x00000044 RHSC SF
ohci_hcd 0000:00:0a.0: intrenable 0x80000002 MIE WDH
ohci_hcd 0000:00:0a.0: hcca frame #001e
ohci_hcd 0000:00:0a.0: roothub.a 02000202 POTPGT=2 NPS NDP=2
ohci_hcd 0000:00:0a.0: roothub.b 00000000 PPCM=0000 DR=0000
ohci_hcd 0000:00:0a.0: roothub.status 00000000
ohci_hcd 0000:00:0a.0: roothub.portstatus [0] 0x00000100 PPS
ohci_hcd 0000:00:0a.0: roothub.portstatus [1] 0x00010101 CSC PPS CCS
drivers/usb/core/usb.c: registered new driver usbnet
ohci_hcd 0000:00:0a.0: GetStatus roothub.portstatus [2] = 0x00010101 CSC PPS CCS
hub 1-0:1.0: port 2, status 101, change 1, 12 Mb/s
hub 1-0:1.0: debounce: port 2: delay 100ms stable 4 status 0x101
ohci_hcd 0000:00:0a.0: GetStatus roothub.portstatus [2] = 0x00100103 PRSC PPS PES CCS
usb 1-2: new full speed USB device using address 2
usb 1-2: new device strings: Mfr=1, Product=2, SerialNumber=3
drivers/usb/core/message.c: USB device number 2 default language ID 0x409
usb 1-2: Product: Thomson DCM305 Cable Modem
usb 1-2: Manufacturer: Thomson Consumer Electronics
usb 1-2: SerialNumber: XXXXXXXXXXXXXX
drivers/usb/core/usb.c: usb_hotplug
usb 1-2: registering 1-2:1.0 (config #1, interface 0)
drivers/usb/core/usb.c: usb_hotplug
usbnet 1-2:1.0: usb_probe_interface
usbnet 1-2:1.0: usb_probe_interface - got id
Unable to handle kernel NULL pointer dereference
tsk->{mm,active_mm}->context = 000000000000058f
tsk->{mm,active_mm}->pgd = fffff80067ac9000
\|/ ____ \|/
"@'/ .. \`@"
/_| \__/ |_\
\__U_/
khubd(4552): Oops [#1]
TSTATE: 0000004480009605 TPC: 00000000020492cc TNPC: 00000000020492d0 Y: 00000000
Not tainted
TPC: <usb_disable_interface+0xc/0x60 [usbcore]>
g0: 00000003524bccee g1: 0000000000000000 g2: 0000000000000190 g3: 0000000000000078
g4: fffff80066c99b88 g5: 0000000000000033 g6: fffff80065ed4000 g7: fffff80067ebb810
o0: fffff80067489960 o1: 0000000080000200 o2: fffff80067489960 o3: 0000000000000000
o4: 0000000000000000 o5: 00000000000001f4 sp: fffff80065ed69f1 ret_pc: 0000000002048728
RPC: <usb_control_msg+0xa8/0xc0 [usbcore]>
l0: 0000000000000000 l1: 000000000000ea05 l2: 0000000000000005 l3: 0000000000000002
l4: 0000000000000000 l5: fffff80067cd55db l6: 00000000006c6dc8 l7: 0000000000001410
i0: fffff80067789400 i1: 0000000000000000 i2: 000000000000000b i3: 0000000000000001
i4: 0000000000000001 i5: fffff80067489960 i6: fffff80065ed6ab1 i7: 000000000204960c
I7: <usb_set_interface+0x8c/0x1a0 [usbcore]>
Caller[000000000204960c]: usb_set_interface+0x8c/0x1a0 [usbcore]
Caller[000000000206e104]: get_endpoints+0xe4/0x180 [usbnet]
Caller[000000000206edac]: generic_cdc_bind+0xec/0x260 [usbnet]
Caller[000000000206f008]: cdc_bind+0x8/0x100 [usbnet]
Caller[0000000002070ab8]: usbnet_probe+0x378/0x400 [usbnet]
Caller[00000000020420c4]: usb_probe_interface+0x84/0xc0 [usbcore]
Caller[000000000053285c]: bus_match+0x3c/0x80
Caller[00000000005328d8]: device_attach+0x38/0xa0
Caller[0000000000532ae8]: bus_add_device+0x48/0x80
Caller[00000000005319e4]: device_add+0x64/0x120
Caller[0000000002049a20]: usb_set_configuration+0x1e0/0x260 [usbcore]
Caller[0000000002043544]: usb_new_device+0x3a4/0x620 [usbcore]
Caller[00000000020457a4]: hub_port_connect_change+0x1c4/0x2c0 [usbcore]
Caller[0000000002045c58]: hub_events+0x3b8/0x460 [usbcore]
Caller[0000000002045d28]: hub_thread+0x28/0x120 [usbcore]
Caller[0000000000417030]: kernel_thread+0x30/0x60
Caller[0000000002045e54]: usb_hub_init+0x34/0xa0 [usbcore]
Instruction DUMP: 9de3bf40 f25e6008 a0102000 <c20e6004> 80a40001 1648000d 833c2000
c45e6010 90100018
...
Ryan
__________________________________________________________
.' Ryan Veety <[EMAIL PROTECTED]> - http://www.ryanspc.com `.
| PGP Key: http://www.ryanspc.com/pgp.txt |
`----------------------------------------------------------'--- linux/drivers/usb/core/message.c.orig 2004-04-09 06:55:38.979495000 -0400
+++ linux/drivers/usb/core/message.c 2004-04-09 06:44:35.319495000 -0400
@@ -786,6 +786,12 @@
struct usb_host_interface *alt = intf->cur_altsetting;
int i;
+ if(!alt) {
+ dev_warn(&dev->dev, "usb_disable_interface: "
+ "No alternates to disable\n");
+ return;
+ }
+
for (i = 0; i < alt->desc.bNumEndpoints; ++i) {
usb_disable_endpoint(dev,
alt->endpoint[i].desc.bEndpointAddress);