diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2012-01-12 12:51:48 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2012-02-10 11:31:57 +0100 |
commit | f53c398aa603cea135ee58fd15249aeff7b9c7ea (patch) | |
tree | b36b1a2b09a720a3d9e20a838914f3549cc90b16 /hw/usb-uhci.c | |
parent | 1977f93dacf60466cd23b562ae498446b77d3b48 (diff) |
usb: USBPacket: add status, rename owner -> ep
Add enum to track the status of USBPackets, use that instead of the
owner pointer to figure whenever a usb packet is currently in flight
or not. Add some more packet status sanity checks. Also rename the
USBEndpoint pointer from "owner" to "ep".
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb-uhci.c')
-rw-r--r-- | hw/usb-uhci.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/usb-uhci.c b/hw/usb-uhci.c index a1f597ab83..ef0814570a 100644 --- a/hw/usb-uhci.c +++ b/hw/usb-uhci.c @@ -236,8 +236,8 @@ static void uhci_async_cancel_device(UHCIState *s, USBDevice *dev) UHCIAsync *curr, *n; QTAILQ_FOREACH_SAFE(curr, &s->async_pending, next, n) { - if (curr->packet.owner == NULL || - curr->packet.owner->dev != dev) { + if (!usb_packet_is_inflight(&curr->packet) || + curr->packet.ep->dev != dev) { continue; } uhci_async_unlink(s, curr); |