summary refs log tree commit diff stats
path: root/linux-user/syscall_types.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/syscall_types.h
parent6c753a63eda27f2a35bda211d1fa490aebbc7459 (diff)
downloadfocaccia-qemu-a133367ec1b689410f1e7427921e33bb1b569bd7.tar.gz
focaccia-qemu-a133367ec1b689410f1e7427921e33bb1b569bd7.zip
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/syscall_types.h')
-rw-r--r--linux-user/syscall_types.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/linux-user/syscall_types.h b/linux-user/syscall_types.h
index 6f64a8bdf7..b98a23b0f1 100644
--- a/linux-user/syscall_types.h
+++ b/linux-user/syscall_types.h
@@ -300,6 +300,26 @@ STRUCT(usbdevfs_connectinfo,
         TYPE_INT, /* devnum */
         TYPE_CHAR) /* slow */
 
+STRUCT(usbdevfs_iso_packet_desc,
+        TYPE_INT, /* length */
+        TYPE_INT, /* actual_length */
+        TYPE_INT) /* status */
+
+STRUCT(usbdevfs_urb,
+        TYPE_CHAR, /* type */
+        TYPE_CHAR, /* endpoint */
+        TYPE_INT, /* status */
+        TYPE_INT, /* flags */
+        TYPE_PTRVOID, /* buffer */
+        TYPE_INT, /* buffer_length */
+        TYPE_INT, /* actual_length */
+        TYPE_INT, /* start_frame */
+        TYPE_INT, /* union number_of_packets stream_id */
+        TYPE_INT, /* error_count */
+        TYPE_INT, /* signr */
+        TYPE_PTRVOID, /* usercontext */
+        MK_ARRAY(MK_STRUCT(STRUCT_usbdevfs_iso_packet_desc), 0)) /* desc */
+
 STRUCT(usbdevfs_ioctl,
         TYPE_INT, /* ifno */
         TYPE_INT, /* ioctl_code */