OSDN Git Service

usb/ohci: Don't use packet from OHCIState for isochronous transfers
authorBALATON Zoltan <balaton@eik.bme.hu>
Tue, 25 Jan 2022 13:33:20 +0000 (14:33 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Fri, 4 Mar 2022 08:34:21 +0000 (09:34 +0100)
commit3a4d06f26f2606dd5029b05b4aff97f198455249
tree8b99780239b47308e2a9dbb3f282286d66c72822
parentb6b0c066f5750c3c977b647509f225ba06038b60
usb/ohci: Don't use packet from OHCIState for isochronous transfers

Since isochronous transfers cannot be handled async (the function
returns error in that case) we don't need to remember the packet.
Avoid using the usb_packet field in OHCIState (as that can be a
waiting async packet on another endpoint) and allocate and use a local
USBPacket for the iso transfer instead. After this we don't have to
care if we're called from a completion callback or not so we can drop
that parameter as well.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Message-Id: <bf523d40f8088a84383cb00ffd2e6e82fa47790d.1643117600.git.balaton@eik.bme.hu>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/usb/hcd-ohci.c