[Bug 282144] usb mouse incorrectly attaches to keyboard driver

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 20 Oct 2024 13:20:58 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=282144

--- Comment #6 from fjpavon <fjpavon@gmail.com> ---
I was investigating and i thin that the issue is related to the value of the
field bInterfaceProtocol

I get the value running the command usbconfig -d <id> dump_all_desc

From a usb mouse that is working and using the ums driver
bInterfaceProtocol = 0x0002

From the mouse with the kbd driver
bInterfaceProtocol = 0x0001

In the ums.c file the function ums_prove has the following check
        if ((uaa->info.bInterfaceSubClass == UISUBCLASS_BOOT) &&
            (uaa->info.bInterfaceProtocol == UIPROTO_MOUSE))
                return (BUS_PROBE_DEFAULT);

It comparing the value of uaa->info.bInterfaceProtocol with the constant
UIPROTO_MOUSE. 
The contstant is defined in usb.h 
#define UIPROTO_MOUSE           2

Can be the reason of the wrong assignment of the driver?

Thanks and kind regards

-- 
You are receiving this mail because:
You are the assignee for the bug.