mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
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>
This commit is contained in:
parent
1977f93dac
commit
f53c398aa6
6 changed files with 35 additions and 18 deletions
|
@ -1709,8 +1709,8 @@ 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 != NULL &&
|
||||
ohci->usb_packet.owner->dev == dev) {
|
||||
usb_packet_is_inflight(&ohci->usb_packet) &&
|
||||
ohci->usb_packet.ep->dev == dev) {
|
||||
usb_cancel_packet(&ohci->usb_packet);
|
||||
ohci->async_td = 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue