opnsense-src/sys/dev/usb
Vladimir Kondratyev fd6690e2d5 hidraw(4): Add additional hidraw input/output report ioctls
to Linux hidraw compatibility API.

Respective Linux commit f43d3870cafa made by Dean Camera message is:

Currently the hidraw module can only read and write feature HID reports on
demand, via dedicated ioctls. Input reports are read from the device through
the read() interface, while output reports are written through the write
interface().

This is insufficient; it is desirable in many situations to be able to read and
write input and output reports through the control interface to cover
additional scenarios:

  - Reading an input report by its report ID, to get initial state
  - Writing an input report, to set initial input state in the device
  - Reading an output report by its report ID, to obtain current state
  - Writing an output report by its report ID, out of band

This patch adds these missing ioctl requests to read and write the remaining
HID report types. Note that not all HID backends will neccesarily support this
(e.g. while the USB link layer supports setting Input reports, others may not).

FreeBSD native uhid(4) compatible API already has similar ioctls.

MFC after:	3 days
2025-04-27 12:07:35 +03:00
..
controller usb: Use bus_detach_children instead of bus_generic_detach 2025-03-12 10:54:49 -04:00
gadget
input wsp: Fix whitespaces 2025-03-07 20:53:35 +03:00
misc usb: Kill left-over cdefs.h includes 2025-03-04 14:44:22 -07:00
net usb: if_ure: stop touching the mbuf accounting on rxq insertion 2025-04-20 13:28:12 -05:00
quirk umass/quirk: Remove useless quirk for Transcend flash 2025-03-15 21:47:44 -06:00
serial usb: Kill left-over cdefs.h includes 2025-03-04 14:44:22 -07:00
storage umass: Remove some 20-year-old dead code 2025-03-10 20:33:15 -06:00
template usb: Kill left-over cdefs.h includes 2025-03-04 14:44:22 -07:00
video Use bus_generic_detach instead of device_delete_children in detach 2025-01-02 13:24:28 -05:00
wlan if_run: Add sitecom device id 2025-04-01 09:00:07 +01:00
ufm_ioctl.h
uftdiio.h
uled_ioctl.h
usb.h usb: increase USB_PORT_RESET_RECOVERY 2024-09-06 12:34:30 -06:00
usb_bus.h usb: change LIST to SLIST to avoid LinuxKPI conflicts 2024-09-24 22:53:28 +00:00
usb_busdma.c
usb_busdma.h
usb_cdc.h
usb_controller.h
usb_core.c
usb_core.h
usb_debug.c
usb_debug.h
usb_dev.c kern: Make fileops and filterops tables const where possible 2024-11-26 21:04:21 +00:00
usb_dev.h usb: change LIST to SLIST to avoid LinuxKPI conflicts 2024-09-24 22:53:28 +00:00
usb_device.c usb: fix loop in usb_config_parse 2024-11-10 21:53:18 -05:00
usb_device.h usb: change LIST to SLIST to avoid LinuxKPI conflicts 2024-09-24 22:53:28 +00:00
usb_dynamic.c
usb_dynamic.h
usb_endian.h
usb_error.c
usb_fdt_support.c
usb_fdt_support.h
usb_freebsd.h
usb_freebsd_loader.h
usb_generic.c
usb_generic.h
usb_handle_request.c
usb_hid.c
usb_hub.c
usb_hub.h
usb_hub_acpi.c
usb_hub_private.h
usb_if.m
usb_ioctl.h hidraw(4): Add additional hidraw input/output report ioctls 2025-04-27 12:07:35 +03:00
usb_lookup.c
usb_mbuf.c
usb_mbuf.h
usb_msctest.c usb-msctest: Be more conservative setting GETMAXLUN quirk 2025-03-16 13:23:25 -06:00
usb_msctest.h
usb_parse.c
usb_pci.h
usb_pf.c
usb_pf.h
usb_process.c usb: serial: allow the open/close sleep to be interruptible 2024-12-10 19:23:10 -06:00
usb_process.h usb: serial: allow the open/close sleep to be interruptible 2024-12-10 19:23:10 -06:00
usb_request.c
usb_request.h
usb_transfer.c
usb_transfer.h
usb_util.c
usb_util.h
usbdevs if_run: Add sitecom device id 2025-04-01 09:00:07 +01:00
usbdi.h usb: serial: allow the open/close sleep to be interruptible 2024-12-10 19:23:10 -06:00
usbdi_util.h
usbhid.h