aboutsummaryrefslogtreecommitdiff
path: root/hw/usb-musb.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-musb.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-musb.c')
-rw-r--r--hw/usb-musb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/usb-musb.c b/hw/usb-musb.c
index 01e2e7c389..4f528d25e5 100644
--- a/hw/usb-musb.c
+++ b/hw/usb-musb.c
@@ -812,7 +812,8 @@ static void musb_async_cancel_device(MUSBState *s, USBDevice *dev)
for (ep = 0; ep < 16; ep++) {
for (dir = 0; dir < 2; dir++) {
- if (s->ep[ep].packey[dir].p.owner != dev) {
+ if (s->ep[ep].packey[dir].p.owner == NULL ||
+ s->ep[ep].packey[dir].p.owner->dev != dev) {
continue;
}
usb_cancel_packet(&s->ep[ep].packey[dir].p);