Page MenuHomeFreeBSD

hid: Import usbhid - USB transport backend for HID subsystem
ClosedPublic

Authored by wulf on Jan 2 2021, 12:31 PM.

Details

Summary

This implements hid_if.m methods for HID-over-USB protocol [1].

Also, this adds USBHID_ENABLED kernel option which changes device_probe()
priority and adds/removes PnP records to prefer usbhid over ums, ukbd, wmt
and other USB HID device drivers.

The module is based on uhid(4) driver.

It is disabled by default for now due to conflicts with existing USB HID drivers.

[1] https://www.usb.org/sites/default/files/hid1_11.pdf

Diff Detail

Repository
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

wulf requested review of this revision.Jan 2 2021, 12:31 PM
wulf created this revision.
sys/dev/usb/input/usbhid.c
161

I think this usbd_transfer_stop(xfer) is superfluous.

wulf marked an inline comment as done.
wulf added inline comments.
sys/dev/usb/input/usbhid.c
161

usbd_transfer_stop(xfer) moved to usbhid_intr_stop() routine and replaced with usbd_transfer_drain()

This revision is now accepted and ready to land.Jan 4 2021, 10:10 AM
This revision was automatically updated to reflect the committed changes.
wulf marked an inline comment as done.