diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2011-12-13 15:58:19 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2012-01-17 09:44:50 +0100 |
commit | 25d5de7d81a5b1a5c625775648d3d92e8398741c (patch) | |
tree | d27fdeb3d10f8fb510722ff093b814764d726cbb /hw/usb.h | |
parent | f003397ce95441cd8de01a728affb3de7accd1dd (diff) |
usb: link packets to endpoints not devices
Add USBEndpoint for the control endpoint to USBDevices. Link async
packets to the USBEndpoint instead of the USBDevice.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb.h')
-rw-r--r-- | hw/usb.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -177,6 +177,7 @@ struct USBEndpoint { uint8_t type; uint8_t ifnum; int max_packet_size; + USBDevice *dev; }; /* definition of a USB device */ @@ -204,6 +205,7 @@ struct USBDevice { int32_t setup_len; int32_t setup_index; + USBEndpoint ep_ctl; USBEndpoint ep_in[USB_MAX_ENDPOINTS]; USBEndpoint ep_out[USB_MAX_ENDPOINTS]; @@ -317,7 +319,7 @@ struct USBPacket { QEMUIOVector iov; int result; /* transfer length or USB_RET_* status code */ /* Internal use by the USB layer. */ - USBDevice *owner; + USBEndpoint *owner; }; void usb_packet_init(USBPacket *p); |