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-ohci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'hw/usb-ohci.c') 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; } -- cgit v1.2.3