aboutsummaryrefslogtreecommitdiff
path: root/hw/usb.h
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2011-12-13 15:58:19 +0100
committerGerd Hoffmann <kraxel@redhat.com>2012-01-17 09:44:50 +0100
commit25d5de7d81a5b1a5c625775648d3d92e8398741c (patch)
treed27fdeb3d10f8fb510722ff093b814764d726cbb /hw/usb.h
parentf003397ce95441cd8de01a728affb3de7accd1dd (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.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/usb.h b/hw/usb.h
index 5ea984cfdd..0776463b3b 100644
--- a/hw/usb.h
+++ b/hw/usb.h
@@ -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);