usb: use iovecs in USBPacket
Zap data pointer from USBPacket, add a QEMUIOVector instead.
Add a bunch of helper functions to manage USBPacket data.
Switch over users to the new interface.
Note that USBPacket->len was used for two purposes: First to
pass in the buffer size and second to return the number of
transfered bytes or the status code on async transfers. There
is a new result variable for the latter. A new status code
was added to catch uninitialized result.
Nobody creates iovecs with more than one element (yet).
Some users are (temporarely) limited to iovecs with a single
element to keep the patch size as small as possible.
Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com>
Showing
- Makefile.objs 1 addition, 0 deletionsMakefile.objs
- hw/bt-hid.c 8 additions, 8 deletionshw/bt-hid.c
- hw/milkymist-softusb.c 4 additions, 4 deletionshw/milkymist-softusb.c
- hw/usb-bt.c 12 additions, 19 deletionshw/usb-bt.c
- hw/usb-ccid.c 25 additions, 21 deletionshw/usb-ccid.c
- hw/usb-ehci.c 8 additions, 13 deletionshw/usb-ehci.c
- hw/usb-hid.c 4 additions, 2 deletionshw/usb-hid.c
- hw/usb-hub.c 5 additions, 3 deletionshw/usb-hub.c
- hw/usb-libhw.c 63 additions, 0 deletionshw/usb-libhw.c
- hw/usb-msd.c 8 additions, 4 deletionshw/usb-msd.c
- hw/usb-musb.c 11 additions, 11 deletionshw/usb-musb.c
- hw/usb-net.c 22 additions, 43 deletionshw/usb-net.c
- hw/usb-ohci.c 11 additions, 12 deletionshw/usb-ohci.c
- hw/usb-serial.c 3 additions, 2 deletionshw/usb-serial.c
- hw/usb-uhci.c 17 additions, 21 deletionshw/usb-uhci.c
- hw/usb-wacom.c 4 additions, 2 deletionshw/usb-wacom.c
- hw/usb.c 72 additions, 14 deletionshw/usb.c
- hw/usb.h 11 additions, 2 deletionshw/usb.h
- usb-bsd.c 2 additions, 2 deletionsusb-bsd.c
- usb-linux.c 14 additions, 13 deletionsusb-linux.c
Loading
Please register or sign in to comment