Bug 234469 - USB mouses, keyboards and quirks
Summary: USB mouses, keyboards and quirks
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: usb (show other bugs)
Version: 12.0-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-usb mailing list
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2018-12-28 16:49 UTC by David Fiander
Modified: 2019-01-06 15:52 UTC (History)
2 users (show)

See Also:


Attachments
Patch /sys/dev/usb/input/ukbd.c to check if the ums interface is disabled before failing (729 bytes, patch)
2018-12-28 16:49 UTC, David Fiander
no flags Details | Diff
dev/usb/input/ukbd.c patch (602 bytes, patch)
2019-01-06 15:52 UTC, David Fiander
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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 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