New USB ums driver returns incorrect value on probe

Michael Grant Michael.Grant at
Mon Jan 11 07:01:12 UTC 2010

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?

Kind regards, 

Mike Grant.
<html><p><font face = "verdana" size = "0.8" color = "navy">This communication is intended for the addressee only. It is confidential. If you have received this communication in error, please notify us immediately and destroy the original message. You may not copy or disseminate this communication without the permission of the University. Only authorized signatories are competent to enter into agreements on behalf of the University and recipients are thus advised that the content of this message may not be legally binding on the University and may contain the personal views and opinions of the author, which are not necessarily the views and opinions of The University of the Witwatersrand, Johannesburg. All agreements between the University and outsiders are subject to South African Law unless the University agrees in writing to the contrary.</font></p></html>

More information about the freebsd-bugs mailing list