mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
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>
This commit is contained in:
parent
9424d4e7c6
commit
1b4b29a114
2 changed files with 60 additions and 0 deletions
1
hw/usb.h
1
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue