NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/42572: misc usb devices failing to attach



>Number:         42572
>Category:       kern
>Synopsis:       misc usb devices failing to attach
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jan 03 14:45:00 +0000 2010
>Originator:     leo%marco.de@localhost
>Release:        NetBSD 5.99.23
>Organization:
Matthias Pfaller                            Software Entwicklung
marco Systemanalyse und Entwicklung GmbH    Tel   +49 8131 5161 41
Hans-Böckler-Str. 2, D 85221 Dachau         Fax   +49 8131 5161 66
http://www.marco.de/                        Email leo%marco.de@localhost
>Environment:
        
        
System: NetBSD slug 5.99.23 NetBSD 5.99.23 (SLUG) #40: Sun Jan 3 14:46:32 CET 
2010 leo@slug:/usr/src/sys/arch/i386/compile/SLUG i386
Architecture: i386
Machine: i386
>Description:
        I have a siemens gigaset usb dect bridge which fails to attach
        with
                Jan  3 11:48:02 slug /netbsd: usbd_reset_port: port 2 reset 
done, error=NORMAL_COMPLETION
                Jan  3 11:48:02 slug /netbsd: usbd_new_device bus=0xcc994004 
port=2 depth=1 speed=2
                Jan  3 11:48:02 slug /netbsd: usbd_setup_pipe: dev=0xc2ad6d00 
iface=0x0 ep=0xc2ad6d24 pipe=0xc2ad6d04
                Jan  3 11:48:02 slug /netbsd: usbd_get_desc: type=1, index=0, 
len=8
                Jan  3 11:48:02 slug /netbsd: usbd_new_device: adding unit 
addr=3, rev=110, class=0, subclass=0, protocol=0, maxpacket=16, len=18, speed=2
                Jan  3 11:48:02 slug /netbsd: usbd_get_device_desc:
                Jan  3 11:48:02 slug /netbsd: usbd_get_desc: type=1, index=0, 
len=18
                Jan  3 11:48:02 slug /netbsd: usbd_new_device: addr=3, getting 
full desc failed
                Jan  3 11:48:02 slug /netbsd: usbd_remove_device: 0xc2ad6d00
                Jan  3 11:48:02 slug /netbsd: usbd_ar_pipe: pipe=0xc2abfa00
                Jan  3 11:48:02 slug /netbsd: uhub_explore: usb_new_device 
failed, error=IOERROR
                Jan  3 11:48:02 slug /netbsd: uhub4: device problem, disabling 
port 2
        After applying the appended patch (I found an old freebsd pr kern/41243
        from 2004 which does the same thing), I get the following result:
                Jan  3 14:48:01 slug /netbsd: ugen0 at uhub4 port 2
                Jan  3 14:48:01 slug /netbsd: ugen0: Siemens AG USB DECT 
device, rev 1.10/2.60, addr 3
        I have a couple of usb sticks at work which fail with "device error"
        as well. I hope these will work with this patch as well (can't test
        at the moment).
>How-To-Repeat:
        Plug in a "Siemens AG USB DECT device".
>Fix:
        Apply the following patch:
--- usb_subr.c  12 Nov 2009 20:11:35 -0000      1.167
+++ usb_subr.c  3 Jan 2010 14:33:52 -0000
@@ -1158,14 +1158,6 @@
 
        USETW(dev->def_ep_desc.wMaxPacketSize, dd->bMaxPacketSize);
 
-       err = usbd_reload_device_desc(dev);
-       if (err) {
-               DPRINTFN(-1, ("usbd_new_device: addr=%d, getting full desc "
-                             "failed\n", addr));
-               usbd_remove_device(dev, up);
-               return (err);
-       }
-
        /* Set the address */
        DPRINTFN(5, ("usbd_new_device: setting device address=%d\n", addr));
        err = usbd_set_address(dev, addr);
@@ -1181,6 +1173,14 @@
        dev->address = addr;    /* new device address now */
        bus->devices[addr] = dev;
 
+       err = usbd_reload_device_desc(dev);
+       if (err) {
+               DPRINTFN(-1, ("usbd_new_device: addr=%d, getting full desc "
+                             "failed\n", addr));
+               usbd_remove_device(dev, up);
+               return (err);
+       }
+
        /* Re-establish the default pipe with the new address. */
        usbd_kill_pipe(dev->default_pipe);
        err = usbd_setup_pipe(dev, 0, &dev->def_ep, USBD_DEFAULT_INTERVAL,

>Unformatted:
        
        


Home | Main Index | Thread Index | Old Index