diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2012-01-12 13:23:01 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2012-02-10 11:31:57 +0100 |
commit | 079d0b7f1eedcc634c371fe05b617fdc55c8b762 (patch) | |
tree | 60ee42f36b295edb49fcb62af5912f769efa9991 /hw/usb.h | |
parent | 63095ab54c1ce554b1fc825fc678394ccb129e5b (diff) | |
download | qemu-079d0b7f1eedcc634c371fe05b617fdc55c8b762.zip qemu-079d0b7f1eedcc634c371fe05b617fdc55c8b762.tar.gz qemu-079d0b7f1eedcc634c371fe05b617fdc55c8b762.tar.bz2 |
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>
Diffstat (limited to 'hw/usb.h')
-rw-r--r-- | hw/usb.h | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -321,8 +321,6 @@ typedef enum USBPacketState { struct USBPacket { /* Data fields for use by the driver. */ int pid; - uint8_t devaddr; - uint8_t devep; USBEndpoint *ep; QEMUIOVector iov; int result; /* transfer length or USB_RET_* status code */ @@ -331,7 +329,7 @@ struct USBPacket { }; void usb_packet_init(USBPacket *p); -void usb_packet_setup(USBPacket *p, int pid, uint8_t addr, uint8_t ep); +void usb_packet_setup(USBPacket *p, int pid, USBEndpoint *ep); void usb_packet_addbuf(USBPacket *p, void *ptr, size_t len); int usb_packet_map(USBPacket *p, QEMUSGList *sgl); void usb_packet_unmap(USBPacket *p); |