Bug 234469

Summary: USB mouses, keyboards and quirks
Product: Base System Reporter: David Fiander <david>
Component: usbAssignee: freebsd-usb (Nobody) <usb>
Status: New ---    
Severity: Affects Some People CC: cem, hselasky
Priority: --- Keywords: patch
Version: 12.0-RELEASE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Patch /sys/dev/usb/input/ukbd.c to check if the ums interface is disabled before failing
none
dev/usb/input/ukbd.c patch none

Description David Fiander 2018-12-28 16:49:31 UTC
Created attachment 200581 [details]
Patch /sys/dev/usb/input/ukbd.c to check if the ums interface is disabled before failing

According to dev/usb/input/ukbd.c,

	/*
	 * NOTE: We currently don't support USB mouse
	 * and USB keyboard on the same USB endpoint.
	 * Let "ums" driver win.
	 */

But if the device has UQ_UMS_IGNORE set, then neither interface is going to be used. This is basically the same problem that was fixed in bug #172458 in the generic "uhid" device.

This is obviously a rare occurrence, but it's annoying when it happens. I ran into it because the "Circuit Python" embedded python implementation that appears on many Adafruit dev boards, and is now starting to show up on other devices, does in fact implement a USB mouse/keyboard combo on a single endpoint.

The attached patch seems to work.
Comment 1 Hans Petter Selasky freebsd_committer freebsd_triage 2018-12-28 21:43:48 UTC
Patch looks good. Maybe wrap the long resulting line?
Comment 2 David Fiander 2019-01-06 15:52:45 UTC
Created attachment 200840 [details]
dev/usb/input/ukbd.c patch

OK, here's a patch with a better line break