aboutsummaryrefslogtreecommitdiff
path: root/linux-user/ioctls.h
diff options
context:
space:
mode:
authorCortland Tölva <cst@tolva.net>2018-10-08 09:35:21 -0700
committerLaurent Vivier <laurent@vivier.eu>2018-10-19 14:05:10 +0200
commita133367ec1b689410f1e7427921e33bb1b569bd7 (patch)
treedf327f4841e0e50178dd440f0c84c49012b6fda9 /linux-user/ioctls.h
parent6c753a63eda27f2a35bda211d1fa490aebbc7459 (diff)
linux-user: Implement special usbfs ioctls.
Userspace submits a USB Request Buffer to the kernel, optionally discards it, and finally reaps the URB. Thunk buffers from target to host and back. Tested by running an i386 scanner driver on ARMv7 and by running the PowerPC lsusb utility on x86_64. The discardurb ioctl is not exercised in these tests. Signed-off-by: Cortland Tölva <cst@tolva.net> Message-Id: <20181008163521.17341-4-cst@tolva.net> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'linux-user/ioctls.h')
-rw-r--r--linux-user/ioctls.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h
index 92f6177f1d..ae8951625f 100644
--- a/linux-user/ioctls.h
+++ b/linux-user/ioctls.h
@@ -143,6 +143,14 @@
IOCTL(USBDEVFS_SETCONFIGURATION, IOC_W, MK_PTR(TYPE_INT))
IOCTL(USBDEVFS_GETDRIVER, IOC_R,
MK_PTR(MK_STRUCT(STRUCT_usbdevfs_getdriver)))
+ IOCTL_SPECIAL(USBDEVFS_SUBMITURB, IOC_W, do_ioctl_usbdevfs_submiturb,
+ MK_PTR(MK_STRUCT(STRUCT_usbdevfs_urb)))
+ IOCTL_SPECIAL(USBDEVFS_DISCARDURB, IOC_RW, do_ioctl_usbdevfs_discardurb,
+ MK_PTR(MK_STRUCT(STRUCT_usbdevfs_urb)))
+ IOCTL_SPECIAL(USBDEVFS_REAPURB, IOC_R, do_ioctl_usbdevfs_reapurb,
+ MK_PTR(TYPE_PTRVOID))
+ IOCTL_SPECIAL(USBDEVFS_REAPURBNDELAY, IOC_R, do_ioctl_usbdevfs_reapurb,
+ MK_PTR(TYPE_PTRVOID))
IOCTL(USBDEVFS_DISCSIGNAL, IOC_W,
MK_PTR(MK_STRUCT(STRUCT_usbdevfs_disconnectsignal)))
IOCTL(USBDEVFS_CLAIMINTERFACE, IOC_W, MK_PTR(TYPE_INT))