mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
usb: Set USBEndpoint in usb_packet_setup().
With the separation of the device lookup (via usb_find_device) and packet processing we can lookup device and endpoint before setting up the usb packet. So we can initialize USBPacket->ep early and keep it valid for the whole lifecycle of the USBPacket. Also the devaddr and devep fields are not needed any more. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
63095ab54c
commit
079d0b7f1e
19 changed files with 91 additions and 86 deletions
|
@ -995,7 +995,7 @@ static int ccid_handle_data(USBDevice *dev, USBPacket *p)
|
|||
break;
|
||||
|
||||
case USB_TOKEN_IN:
|
||||
switch (p->devep & 0xf) {
|
||||
switch (p->ep->nr) {
|
||||
case CCID_BULK_IN_EP:
|
||||
if (!p->iov.size) {
|
||||
ret = USB_RET_NAK;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue