summaryrefslogtreecommitdiff
path: root/hw/usb-ohci.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-ohci.c
parentf003397ce95441cd8de01a728affb3de7accd1dd (diff)
downloadqemu-25d5de7d81a5b1a5c625775648d3d92e8398741c.zip
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-ohci.c')
-rw-r--r--hw/usb-ohci.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/usb-ohci.c b/hw/usb-ohci.c
index 81488c48e2..69463d2f11 100644
--- a/hw/usb-ohci.c
+++ b/hw/usb-ohci.c
@@ -1707,7 +1707,9 @@ static void ohci_mem_write(void *opaque,
static void ohci_async_cancel_device(OHCIState *ohci, USBDevice *dev)
{
- if (ohci->async_td && ohci->usb_packet.owner == dev) {
+ if (ohci->async_td &&
+ ohci->usb_packet.owner != NULL &&
+ ohci->usb_packet.owner->dev == dev) {
usb_cancel_packet(&ohci->usb_packet);
ohci->async_td = 0;
}