aboutsummaryrefslogtreecommitdiff
path: root/hw/usb.h
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2012-03-02 13:22:29 +0100
committerGerd Hoffmann <kraxel@redhat.com>2012-03-07 12:28:05 +0100
commit1b4b29a11483a050855838014413c91e9c1f8c19 (patch)
treeb19a971f4fefffb8dd3201e792f133ad915e6170 /hw/usb.h
parent9424d4e7c67d9d0cbc50fc8a1d00db31772c37c5 (diff)
usb: add shortcut for control transfers
Add a more direct code path to submit control transfers. Instead of feeding three usb packets (setup, data, ack) to usb_handle_packet and have the do_token_* functions in usb.c poke the control transfer parameters out of it just submit a single packet carrying the actual data with the control xfer parameters filled into USBPacket->parameters. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb.h')
-rw-r--r--hw/usb.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/usb.h b/hw/usb.h
index f6df0ad0f8..d60d03df9c 100644
--- a/hw/usb.h
+++ b/hw/usb.h
@@ -327,6 +327,7 @@ struct USBPacket {
int pid;
USBEndpoint *ep;
QEMUIOVector iov;
+ uint64_t parameter; /* control transfers */
int result; /* transfer length or USB_RET_* status code */
/* Internal use by the USB layer. */
USBPacketState state;