freebsd-dev/sys/dev/usb
Brooks Davis 0ec590d24e usb: add 32-bit compat for FIFOs
Unlike most 32-bit compatability code, this isn't just a simple thunk
in the ioctl code.  An ioctl (USB_FS_INIT) is used to install a
pointer to an array of usb_fs_endpoint structs which are then used
by the ugen fifo code.  These struct contains an array of pointers
which requires translation.  We change the interfaces around
struct usb_fs_endpoint as follows:
 - We store the size of struct usb_fs_endpoint in struct usb_fifo
   in the USB_FS_INIT handler so we know the ABI of the userspace
   array.
 - APIs to manipulate userspace struct usb_fs_endpoint objects now
   take a struct usb_fifo and an index rather than a pointer to
   the object.  This allows most code to remain oblivious to the
   different struct usb_fs_endpoint sizes.
 - Add ugen_fs_copyin() which copies the struct usb_fs_endpoint
   from userspace, thunking it to the native size if required.
 - Uses of struct usb_fs_endpoint's ppBuffer member are now
   via ugen_fs_getbuffer() which produces a native pointer.
 - Updates to userspace are now handled by ugen_fs_update().

For clarity, single, fixed-sized members now are accessed with
fueword/suword rather than copyin/copyout.

Reviewed by:	hselasky, jrtc27 (prior version)
2021-12-17 21:28:14 +00:00
..
controller Create wrapper for Giant taken for newbus 2021-12-09 17:04:45 -07:00
gadget
input usb: real freebsd32 support for most ioctls 2021-12-17 21:28:13 +00:00
misc Fix typo on "Celsius" 2021-11-18 23:05:32 -07:00
net Create wrapper for Giant taken for newbus 2021-12-09 17:04:45 -07:00
quirk Add more USB quirks for Kingston devices. 2021-04-22 12:40:29 +02:00
serial ucom: s/sio/ucom/ 2021-12-06 10:10:27 -04:00
storage cam: fix xpt_bus_register and xpt_bus_deregister return errno 2021-06-28 16:13:03 -06:00
template
video
wlan net80211/drivers: improve ieee80211_rx_stats for band 2021-10-22 09:55:54 +00:00
ufm_ioctl.h
uftdiio.h
uled_ioctl.h
usb_bus.h
usb_busdma.c Fix busdma resource leak on usb device detach. 2021-09-28 13:29:10 -06:00
usb_busdma.h Fix busdma resource leak on usb device detach. 2021-09-28 13:29:10 -06:00
usb_cdc.h
usb_controller.h
usb_core.c
usb_core.h
usb_debug.c Update usb_timings_sysctl_handler() to accept any value for timings between 2021-05-18 15:52:41 +02:00
usb_debug.h
usb_dev.c usb: real freebsd32 support for most ioctls 2021-12-17 21:28:13 +00:00
usb_dev.h usb: add 32-bit compat for FIFOs 2021-12-17 21:28:14 +00:00
usb_device.c Create wrapper for Giant taken for newbus 2021-12-09 17:04:45 -07:00
usb_device.h
usb_dynamic.c
usb_dynamic.h
usb_endian.h
usb_error.c
usb_fdt_support.c
usb_fdt_support.h
usb_freebsd_loader.h
usb_freebsd.h
usb_generic.c usb: add 32-bit compat for FIFOs 2021-12-17 21:28:14 +00:00
usb_generic.h
usb_handle_request.c
usb_hid.c
usb_hub_acpi.c newbus: Move from bus_child_{pnpinfo,location}_src to bus_child_{pnpinfo,location} with sbuf 2021-06-22 20:52:06 -06:00
usb_hub_private.h newbus: Move from bus_child_{pnpinfo,location}_src to bus_child_{pnpinfo,location} with sbuf 2021-06-22 20:52:06 -06:00
usb_hub.c newbus: Move from bus_child_{pnpinfo,location}_src to bus_child_{pnpinfo,location} with sbuf 2021-06-22 20:52:06 -06:00
usb_hub.h
usb_if.m
usb_ioctl.h usb: add 32-bit compat for FIFOs 2021-12-17 21:28:14 +00:00
usb_lookup.c
usb_mbuf.c
usb_mbuf.h
usb_msctest.c
usb_msctest.h
usb_parse.c
usb_pci.h
usb_pf.c
usb_pf.h
usb_process.c
usb_process.h
usb_request.c
usb_request.h
usb_transfer.c Send a zero-length-packet first when opening a BULK endpoint for USB serial 2021-07-15 12:11:53 +02:00
usb_transfer.h Cleanup unused USB enums. 2021-07-15 12:38:42 +02:00
usb_util.c
usb_util.h
usb.h Narrow down the probe range for if_ure(4) compatible devices 2021-06-04 15:51:01 +02:00
usbdevs rtwn/usb: add product ID for Asus USB N10 Nano Rev. B1 2021-12-06 09:43:26 +02:00
usbdi_util.h
usbdi.h Send a zero-length-packet first when opening a BULK endpoint for USB serial 2021-07-15 12:11:53 +02:00
usbhid.h