aboutsummaryrefslogtreecommitdiff
path: root/COPYRIGHT
diff options
context:
space:
mode:
authorBrooks Davis <brooks@FreeBSD.org>2021-12-17 21:28:14 +0000
committerBrooks Davis <brooks@FreeBSD.org>2021-12-17 21:28:14 +0000
commit0ec590d24e415dd36e38648630a0b963412ad87e (patch)
treea7dde475b61604cd39a5766f1f764565a02f3f5d /COPYRIGHT
parent45b48cbc2b5819cd6e3dee3632d66e55d5d7c101 (diff)
downloadsrc-0ec590d24e415dd36e38648630a0b963412ad87e.tar.gz
src-0ec590d24e415dd36e38648630a0b963412ad87e.zip
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)
Diffstat (limited to 'COPYRIGHT')
0 files changed, 0 insertions, 0 deletions