Date: Mon, 11 Jan 2010 09:08:49 +0100 From: Hans Petter Selasky <hselasky@c2i.net> To: freebsd-arch@freebsd.org Cc: Michael Grant <Michael.Grant@students.wits.ac.za>, freebsd-bugs@freebsd.org Subject: Re: New USB ums driver returns incorrect value on probe Message-ID: <201001110908.49441.hselasky@c2i.net> In-Reply-To: <fc32e93d160b5.4b4ae3fa@students.wits.ac.za> References: <fc32e93d160b5.4b4ae3fa@students.wits.ac.za>
next in thread | previous in thread | raw e-mail | index | archive | help
On Monday 11 January 2010 07:40:26 Michael Grant wrote: > Good day, > > I am trying to port an excellent driver for a HID peripheral to the new USB > stack on 8.0 and noticed some strange behaviour: The device, by default, > operates as a mouse and only once a sensible driver communicates to it > will the device enter an extended mode. The interesting thing is that > this device is never given to the driver to be probed. > > I notice in the DEVICE_PROBE(9) man page: "If a success code of zero is > returned, the driver can assume that it will be the one attached". > > Now looking in /usr/src/sys/dev/usb/input/ums.c > > if ((uaa->info.bInterfaceSubClass == UISUBCLASS_BOOT) && > (uaa->info.bInterfaceProtocol == UIPROTO_MOUSE)) > return (0); > > I think the return value should be BUS_PROBE_DEFAULT and not 0, after all > the ums driver is generic. > > I have not submitted a PR, should I do that as well or is a post to this > list sufficient? > if ((uaa->info.bInterfaceSubClass == UISUBCLASS_BOOT) && (uaa->info.bInterfaceProtocol == UIPROTO_MOUSE)) return (BUS_PROBE_GENERIC); This has been fixed in newer source code, 8+9 I believe. --HPS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001110908.49441.hselasky>