public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [linux-2.6.5] oops when plugging CDC USB network device...
@ 2004-05-07 13:20 Daniel Blueman
  2004-05-07 14:23 ` [linux-usb-devel] " Alan Stern
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Blueman @ 2004-05-07 13:20 UTC (permalink / raw)
  To: linux-kernel, linux-usb-devel

When plugging a Motorola SurfBoard 5100 device into my box, khubd oopses.
Kernel is stock linux-2.6.5.

Chipset is nForce 2 (OHCI), USB 2 EHCI controller disabled, so just USB 1.1
controller active.

Please CC me if more information would be handy.

Harvested from kernel logs:

ohci_hcd: 2004 Feb 02 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)
ohci_hcd: block sizes: ed 64 td 64
ohci_hcd 0000:00:02.0: nVidia Corporation nForce2 USB Controller
ohci_hcd 0000:00:02.0: USB HC TakeOver from BIOS/SMM
ohci_hcd 0000:00:02.0: reset, control = 0x684
PCI: Setting latency timer of device 0000:00:02.0 to 64
ohci_hcd 0000:00:02.0: irq 20, pci mem e080a000
ohci_hcd 0000:00:02.0: new USB bus registered, assigned bus number 1
ohci_hcd 0000:00:02.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: nVidia Corporation nForce2 USB Controller
usb usb1: Manufacturer: Linux 2.6.5 ohci_hcd
usb usb1: SerialNumber: 0000:00:02.0
usb usb1: registering 1-0:1.0 (config #1, interface 0)
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: 3 ports detected
hub 1-0:1.0: standalone hub  
hub 1-0:1.0: unknown reserved power switching mode
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: 2ms 
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:02.0: created debug files
ohci_hcd 0000:00:02.0: OHCI controller state
ohci_hcd 0000:00:02.0: OHCI 1.0, with legacy support registers
ohci_hcd 0000:00:02.0: control 0x683 RWE RWC HCFS=operational CBSR=3
ohci_hcd 0000:00:02.0: cmdstatus 0x00000 SOC=0
ohci_hcd 0000:00:02.0: intrstatus 0x00000044 RHSC SF
ohci_hcd 0000:00:02.0: intrenable 0x80000002 MIE WDH
ohci_hcd 0000:00:02.0: hcca frame #0025
ohci_hcd 0000:00:02.0: roothub.a 01000203 POTPGT=1 NPS NDP=3
ohci_hcd 0000:00:02.0: roothub.b 00000000 PPCM=0000 DR=0000 
ohci_hcd 0000:00:02.0: roothub.status 00000000
ohci_hcd 0000:00:02.0: roothub.portstatus [0] 0x00010101 CSC PPS CCS
ohci_hcd 0000:00:02.0: roothub.portstatus [1] 0x00000100 PPS
ohci_hcd 0000:00:02.0: roothub.portstatus [2] 0x00000100 PPS
ohci_hcd 0000:00:02.1: nVidia Corporation nForce2 USB Controller (#2)
ohci_hcd 0000:00:02.1: USB HC TakeOver from BIOS/SMM
ohci_hcd 0000:00:02.1: reset, control = 0x684
PCI: Setting latency timer of device 0000:00:02.1 to 64
ohci_hcd 0000:00:02.1: irq 22, pci mem e080c000
ohci_hcd 0000:00:02.1: new USB bus registered, assigned bus number 2
ohci_hcd 0000:00:02.1: root hub device address 1
usb usb2: new device strings: Mfr=3, Product=2, SerialNumber=1
drivers/usb/core/message.c: USB device number 1 default language ID 0x409
usb usb2: Product: nVidia Corporation nForce2 USB Controller (#2)
usb usb2: Manufacturer: Linux 2.6.5 ohci_hcd
usb usb2: SerialNumber: 0000:00:02.1
usb usb2: registering 2-0:1.0 (config #1, interface 0)
hub 2-0:1.0: usb_probe_interface
hub 2-0:1.0: usb_probe_interface - got id
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 3 ports detected
hub 2-0:1.0: standalone hub  
hub 2-0:1.0: unknown reserved power switching mode
hub 2-0:1.0: global over-current protection
hub 2-0:1.0: Port indicators are not supported
hub 2-0:1.0: power on to power good time: 2ms 
hub 2-0:1.0: hub controller current requirement: 0mA
hub 2-0:1.0: local power source is good
hub 2-0:1.0: no over-current condition exists
hub 2-0:1.0: enabling power on all ports
ohci_hcd 0000:00:02.1: created debug files
ohci_hcd 0000:00:02.1: OHCI controller state
ohci_hcd 0000:00:02.1: OHCI 1.0, with legacy support registers
ohci_hcd 0000:00:02.1: control 0x683 RWE RWC HCFS=operational CBSR=3
ohci_hcd 0000:00:02.1: cmdstatus 0x00000 SOC=0
ohci_hcd 0000:00:02.1: intrstatus 0x00000004 SF
ohci_hcd 0000:00:02.1: intrenable 0x80000002 MIE WDH
ohci_hcd 0000:00:02.1: hcca frame #0026
ohci_hcd 0000:00:02.1: roothub.a 01000203 POTPGT=1 NPS NDP=3
ohci_hcd 0000:00:02.1: roothub.b 00000000 PPCM=0000 DR=0000 
ohci_hcd 0000:00:02.1: roothub.status 00000000
ohci_hcd 0000:00:02.1: roothub.portstatus [0] 0x00000100 PPS
ohci_hcd 0000:00:02.1: roothub.portstatus [1] 0x00000100 PPS
ohci_hcd 0000:00:02.1: roothub.portstatus [2] 0x00000100 PPS
drivers/usb/core/usb.c: registered new driver usbnet
ohci_hcd 0000:00:02.0: GetStatus roothub.portstatus [1] = 0x00010101 CSC PPS
CCS
hub 1-0:1.0: port 1, status 101, change 1, 12 Mb/s
hub 1-0:1.0: debounce: port 1: delay 100ms stable 4 status 0x101
ohci_hcd 0000:00:02.0: GetStatus roothub.portstatus [1] = 0x00100103 PRSC
PPS PES CCS
usb 1-1: new full speed USB device using address 2
usb 1-1: new device strings: Mfr=1, Product=2, SerialNumber=3
drivers/usb/core/message.c: USB device number 2 default language ID 0x409
usb 1-1: Product: USB Cable Modem
usb 1-1: registering 1-1:1.0 (config #1, interface 0)
usbnet 1-1:1.0: usb_probe_interface
usbnet 1-1:1.0: usb_probe_interface - got id
Unable to handle kernel NULL pointer dereference at virtual address 00000004
 printing eip:
c028ff64
*pde = 00000000
Oops: 0000 [#1]
DEBUG_PAGEALLOC
CPU:    0
EIP:    0060:[<c028ff64>]    Not tainted
EFLAGS: 00010296   (2.6.5) 
EIP is at usb_disable_interface+0x14/0x50
eax: df3a4ef8   ebx: 00000000   ecx: 00000000   edx: dffdaf38
esi: 00000001   edi: 00000000   ebp: df3aabf8   esp: df98bcfc   
ds: 007b   es: 007b   ss: 0068
Process khubd (pid: 5, threadinfo=df98a000 task=df9bb9e0)
Stack: 00000001 0000000b 00000001 00000001 df3d5d94 df3aabf8 c0290257
df3aabf8
       df3a4ef8 0000000b 00000001 00000001 00000001 00000000 00000000
00001388
       00000000 df3a4ef8 df3d5d94 df3d5d94 df3d5d44 00000001 c029e301
df3aabf8
Call Trace:
 [<c0290257>] usb_set_interface+0xb7/0x1a0
 [<c029e301>] get_endpoints+0xb1/0x120
 [<c029e4bb>] generic_cdc_bind+0xcb/0x220
 [<c029e708>] cdc_bind+0x28/0xe0
 [<c0263d7b>] alloc_netdev+0x7b/0xb0
 [<c02a084e>] usbnet_probe+0x49e/0x510
 [<c01a8a9d>] sysfs_new_inode+0x5d/0xb0
 [<c0287516>] usb_probe_interface+0xb6/0xd0
 [<c02526ef>] bus_match+0x3f/0x70
 [<c0252761>] device_attach+0x41/0xa0
 [<c0252965>] bus_add_device+0x75/0xc0
 [<c0251715>] device_add+0xa5/0x140
 [<c029068b>] usb_set_configuration+0x24b/0x2f0
 [<c0288530>] usb_new_device+0x2d0/0x5a0
 [<c028adca>] hub_port_connect_change+0x1ea/0x2f0
 [<c028b2f5>] hub_events+0x425/0x5e0
 [<c028b4dd>] hub_thread+0x2d/0x100
 [<c01198a0>] default_wake_function+0x0/0x20
 [<c028b4b0>] hub_thread+0x0/0x100
 [<c0104d91>] kernel_thread_helper+0x5/0x14

Code: 80 7b 04 00 74 26 31 f6 8d 74 26 00 8b 43 0c 47 0f b6 44 30 


-- 
Daniel J Blueman

"Sie haben neue Mails!" - Die GMX Toolbar informiert Sie beim Surfen!
Jetzt aktivieren unter http://www.gmx.net/info


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

* Re: [linux-usb-devel] [linux-2.6.5] oops when plugging CDC USB network device...
  2004-05-07 13:20 [linux-2.6.5] oops when plugging CDC USB network device Daniel Blueman
@ 2004-05-07 14:23 ` Alan Stern
  2004-05-11 10:54   ` Daniel Blueman
  0 siblings, 1 reply; 4+ messages in thread
From: Alan Stern @ 2004-05-07 14:23 UTC (permalink / raw)
  To: Daniel Blueman; +Cc: linux-kernel, linux-usb-devel

On Fri, 7 May 2004, Daniel Blueman wrote:

> When plugging a Motorola SurfBoard 5100 device into my box, khubd oopses.
> Kernel is stock linux-2.6.5.
> 
> Chipset is nForce 2 (OHCI), USB 2 EHCI controller disabled, so just USB 1.1
> controller active.
> 
> Please CC me if more information would be handy.
> 
> Harvested from kernel logs:

> usb 1-1: Product: USB Cable Modem
> usb 1-1: registering 1-1:1.0 (config #1, interface 0)
> usbnet 1-1:1.0: usb_probe_interface
> usbnet 1-1:1.0: usb_probe_interface - got id
> Unable to handle kernel NULL pointer dereference at virtual address 00000004
>  printing eip:
> c028ff64
> *pde = 00000000
> Oops: 0000 [#1]
> DEBUG_PAGEALLOC
> CPU:    0
> EIP:    0060:[<c028ff64>]    Not tainted
> EFLAGS: 00010296   (2.6.5) 
> EIP is at usb_disable_interface+0x14/0x50

This has been fixed in 2.6.6.

Alan Stern


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

* Re: [linux-usb-devel] [linux-2.6.5] oops when plugging CDC USB network device...
  2004-05-07 14:23 ` [linux-usb-devel] " Alan Stern
@ 2004-05-11 10:54   ` Daniel Blueman
  2004-05-11 14:53     ` David Brownell
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Blueman @ 2004-05-11 10:54 UTC (permalink / raw)
  To: Alan Stern, david-b; +Cc: linux-kernel, linux-usb-devel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="us-ascii", Size: 2120 bytes --]

Alan, David,

Thanks for your response - the problem observed in linux-2.6.5 is fixed in
2.6.6. Now I get a status code of -75 [1] and see no additional networking
devices.

Nothing jumps out from the ohci_q.c and related sources.

Any ideas?

--- [1]

ohci_hcd 0000:00:02.1: GetStatus roothub.portstatus [1] = 0x00010101 CSC PPS
CCS
hub 2-0:1.0: port 1, status 101, change 1, 12 Mb/s
hub 2-0:1.0: debounce: port 1: delay 100ms stable 4 status 0x101
ohci_hcd 0000:00:02.1: GetStatus roothub.portstatus [1] = 0x00100103 PRSC
PPS PES CCS
usb 2-1: new full speed USB device using address 3
usb 2-1: skipped 3 class/vendor specific configuration descriptors
usb 2-1: new device strings: Mfr=1, Product=2, SerialNumber=3
usb 2-1: default language 0x0409
usb 2-1: Product: USB Cable Modem  
usb 2-1: adding 2-1:1.0 (config #1, interface 0)  
usbnet 2-1:1.0: usb_probe_interface
usbnet 2-1:1.0: usb_probe_interface - got id
ohci_hcd 0000:00:02.1: urb da0fef78 path 1 ep0in 82d60000 cc 8 --> status
-75
usbnet: probe of 2-1:1.0 failed with error -75
usb 2-1: adding 2-1:1.1 (config #1, interface 1)

> On Fri, 7 May 2004, Daniel Blueman wrote:
> 
> > When plugging a Motorola SurfBoard 5100 device into my box, khubd
> oopses.
> > Kernel is stock linux-2.6.5.
> > 
> > Chipset is nForce 2 (OHCI), USB 2 EHCI controller disabled, so just USB
> 1.1
> > controller active.
> > 
> > Please CC me if more information would be handy.
> > 
> > Harvested from kernel logs:
> 
> > usb 1-1: Product: USB Cable Modem
> > usb 1-1: registering 1-1:1.0 (config #1, interface 0)
> > usbnet 1-1:1.0: usb_probe_interface
> > usbnet 1-1:1.0: usb_probe_interface - got id
> > Unable to handle kernel NULL pointer dereference at virtual address
> 00000004
> >  printing eip:
> > c028ff64
> > *pde = 00000000
> > Oops: 0000 [#1]
> > DEBUG_PAGEALLOC
> > CPU:    0
> > EIP:    0060:[<c028ff64>]    Not tainted
> > EFLAGS: 00010296   (2.6.5) 
> > EIP is at usb_disable_interface+0x14/0x50
> 
> This has been fixed in 2.6.6.
> 
> Alan Stern

-- 
Daniel J Blueman

NEU : GMX Internet.FreeDSL
Ab sofort DSL-Tarif ohne Grundgebühr: http://www.gmx.net/dsl


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

* Re: [linux-usb-devel] [linux-2.6.5] oops when plugging CDC USB network device...
  2004-05-11 10:54   ` Daniel Blueman
@ 2004-05-11 14:53     ` David Brownell
  0 siblings, 0 replies; 4+ messages in thread
From: David Brownell @ 2004-05-11 14:53 UTC (permalink / raw)
  To: Daniel Blueman; +Cc: Alan Stern, linux-kernel, linux-usb-devel

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

Daniel Blueman wrote:
> Alan, David,
> 
> Thanks for your response - the problem observed in linux-2.6.5 is fixed in
> 2.6.6. Now I get a status code of -75 [1] and see no additional networking
> devices.

In drivers/usb/core/message.c::usb_string(), try making the retry
cases consider not just -EPIPE faults but also -EOVERFLOW.  Likewise
in the get_descriptor() logic.  (Some devices seem to have firmware
bugs that cause those failures, and are often amenable to retries.)

Also, this patch should help correct the "missing diagnostics with
CONFIG_USB_DEBUG during CDC Ethernet probe()" issue ... and help
show more precisely where the problem is.

- Dave



[-- Attachment #2: usbnet.patch --]
[-- Type: text/plain, Size: 2304 bytes --]

--- linux-2.5/drivers/usb/net/usbnet.c	2004-04-23 19:19:49.000000000 -0700
+++ gadget-2.6/drivers/usb/net/usbnet.c	2004-05-09 13:10:23.000000000 -0700
@@ -107,7 +107,13 @@
  *
  *-------------------------------------------------------------------------*/
 
+// #define	DEBUG			// error path messages, extra info
+// #define	VERBOSE			// more; success messages
+
 #include <linux/config.h>
+#ifdef	CONFIG_USB_DEBUG
+#   define DEBUG
+#endif
 #include <linux/module.h>
 #include <linux/kmod.h>
 #include <linux/sched.h>
@@ -120,25 +126,15 @@
 #include <linux/mii.h>
 #include <asm/uaccess.h>
 #include <asm/unaligned.h>
-
-
-// #define	DEBUG			// error path messages, extra info
-// #define	VERBOSE			// more; success messages
-#define	REALLY_QUEUE
-
-#if !defined (DEBUG) && defined (CONFIG_USB_DEBUG)
-#   define DEBUG
-#endif
 #include <linux/usb.h>
-
 #include <asm/io.h>
 #include <asm/scatterlist.h>
 #include <linux/mm.h>
 #include <linux/dma-mapping.h>
 
-
 #define DRIVER_VERSION		"25-Aug-2003"
 
+
 /*-------------------------------------------------------------------------*/
 
 /*
@@ -148,13 +144,8 @@
  * For high speed, each frame comfortably fits almost 36 max size
  * Ethernet packets (so queues should be bigger).
  */
-#ifdef REALLY_QUEUE
 #define	RX_QLEN(dev) (((dev)->udev->speed == USB_SPEED_HIGH) ? 60 : 4)
 #define	TX_QLEN(dev) (((dev)->udev->speed == USB_SPEED_HIGH) ? 60 : 4)
-#else
-#define	RX_QLEN(dev)		1
-#define	TX_QLEN(dev)		1
-#endif
 
 // packets are always ethernet inside
 // ... except they can be bigger (limit of 64K with NetChip framing)
@@ -1006,7 +997,7 @@
 			if (!info->control || !info->data) {
 				dev_dbg (&intf->dev,
 					"master #%u/%p slave #%u/%p\n",
-					info->u->bMasterInterface0
+					info->u->bMasterInterface0,
 					info->control,
 					info->u->bSlaveInterface0,
 					info->data);
@@ -1142,10 +1133,13 @@
 	unsigned char	buf [13];
 
 	tmp = usb_string (dev->udev, e->iMACAddress, buf, sizeof buf);
-	if (tmp < 0)
+	if (tmp != 12) {
+		dev_dbg (&dev->udev->dev,
+			"bad MAC string %d fetch, %d\n", e->iMACAddress, tmp);
+		if (tmp >= 0)
+			tmp = -EINVAL;
 		return tmp;
-	else if (tmp != 12)
-		return -EINVAL;
+	}
 	for (i = tmp = 0; i < 6; i++, tmp += 2)
 		dev->net->dev_addr [i] =
 			 (nibble (buf [tmp]) << 4) + nibble (buf [tmp + 1]);

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

end of thread, other threads:[~2004-05-11 14:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-07 13:20 [linux-2.6.5] oops when plugging CDC USB network device Daniel Blueman
2004-05-07 14:23 ` [linux-usb-devel] " Alan Stern
2004-05-11 10:54   ` Daniel Blueman
2004-05-11 14:53     ` David Brownell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox