aboutsummaryrefslogtreecommitdiff
path: root/hw/usb-ehci.c
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-ehci.c
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-ehci.c')
-rw-r--r--hw/usb-ehci.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/usb-ehci.c b/hw/usb-ehci.c
index 7c926c0d47..a3056614a6 100644
--- a/hw/usb-ehci.c
+++ b/hw/usb-ehci.c
@@ -715,7 +715,8 @@ static void ehci_queues_rip_device(EHCIState *ehci, USBDevice *dev)
EHCIQueue *q, *tmp;
QTAILQ_FOREACH_SAFE(q, &ehci->queues, next, tmp) {
- if (q->packet.owner != dev) {
+ if (q->packet.owner == NULL ||
+ q->packet.owner->dev != dev) {
continue;
}
ehci_free_queue(q);