From 25d5de7d81a5b1a5c625775648d3d92e8398741c Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Tue, 13 Dec 2011 15:58:19 +0100 Subject: 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 --- hw/usb.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'hw/usb.h') 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); -- cgit 1.4.1