Date: Sun, 21 Jun 2009 15:26:09 -0500 From: Jason Harmening <jason.harmening@gmail.com> To: Hans Petter Selasky <hselasky@c2i.net> Cc: freebsd-current@freebsd.org Subject: Re: USB keyboard/mouse combo fails to attach Message-ID: <20090621152609.05a4e3be@CORONA> In-Reply-To: <200906210300.14044.hselasky@c2i.net> References: <20090620140820.14273115@CORONA> <200906210300.14044.hselasky@c2i.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 21 Jun 2009 03:00:12 +0200 Hans Petter Selasky <hselasky@c2i.net> wrote: > > In /sys/dev/usb/usb_device.c : > > There is some code to re-enumerate the device, when errors are > detected. Maybe we should add an automatic re-enumeration in case the > full device descriptor cannot be retrieved aswell. > > Search for: > err = usbd_req_get_desc(udev, NULL, NULL, &udev->ddesc, > USB_MAX_IPACKET, USB_MAX_IPACKET, 0, UDESC_DEVICE, 0, 0); > if (err) { > DPRINTFN(0, "getting device descriptor " > "at addr %d failed, %s!\n", udev->address, > usbd_errstr(err)); > /* XXX try to re-enumerate the device */ > err = usbd_req_re_enumerate(udev, NULL); > if (err) { > goto done; > } > } > > Some lines down you patch the code like this: > > /* get the full device descriptor */ > err = usbd_req_get_device_desc(udev, NULL, &udev->ddesc); > if (err) { > DPRINTF("addr=%d, getting full desc failed\n", > udev->address); > + /* XXX try to re-enumerate the device */ > + err = usbd_req_re_enumerate(udev, NULL); > + if (err) { > + goto done; > + } > - goto done; > } > > --HPS That seems to work--thanks! So is this just flaky firmware then? I had such high hopes for the device, as it's advertised as needing no special drivers (in Windows of course), but I guess the firmware probably still "expects" the Windows HID layer on the other end...*sigh* Also, thanks for your tremendous work on the new USB stack! I should mention that while this device always *enumerated* under 7, it never completely *worked*--only the keyboard part seemed to work w/ the old HID layer. Also, it's really nice to be giant-free on a 4-CPU machine. --Jason
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090621152609.05a4e3be>