qemu-e2k/hw/usb
Samuel Brian 896b6757f9 usb-host: support devices with sparse/non-sequential USB interfaces
Some USB devices have sparse interface numbering which is not able to be
passthroughed.
For example, the Sierra Wireless MC7455/MC7430:

  # lsusb  -D /dev/bus/usb/003/003 | egrep '1199|9071|bNumInterfaces|bInterfaceNumber'
  Device: ID 1199:9071 Sierra Wireless, Inc.
    idVendor           0x1199 Sierra Wireless, Inc.
    idProduct          0x9071
      bNumInterfaces          5
        bInterfaceNumber        0
        bInterfaceNumber        2
        bInterfaceNumber        3
        bInterfaceNumber        8
        bInterfaceNumber       10

In this case, the interface numbers are 0, 2, 3, 8, 10 and not the
0, 1, 2, 3, 4 that QEMU tries to claim.

This change allows sparse USB interface numbering.
Instead of only claiming the interfaces in the range reported by the USB
device through bNumInterfaces, QEMU attempts to claim all possible
interfaces.

v2 to fix broken v1 patch formatting.
v3 to fix indentation.

Signed-off-by: Samuel Brian <sam.brian@accelerated.com>
Message-id: 20170613234039.27201-1-sam.brian@accelerated.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-06-21 15:30:08 +02:00
..
bus.c error: Apply error_propagate_null.cocci again 2017-04-24 09:13:45 +02:00
ccid-card-emulated.c Remove/replace sysemu/char.h inclusion 2017-06-02 11:33:52 +04:00
ccid-card-passthru.c char: make chr_fe_deinit() optionaly delete backend 2017-06-02 11:33:53 +04:00
ccid.h
combined-packet.c
core.c usb: don't wakeup during coldplug 2017-05-29 14:18:09 +02:00
desc-msos.c
desc.c usb: accept usb3 control requests 2017-02-06 10:23:17 +01:00
desc.h
dev-audio.c usb: replace handle_destroy with unrealize 2017-02-23 15:40:19 +01:00
dev-bluetooth.c usb: replace handle_destroy with unrealize 2017-02-23 15:40:19 +01:00
dev-hid.c usb: replace handle_destroy with unrealize 2017-02-23 15:40:19 +01:00
dev-hub.c usb-hub: set PORT_STAT_C_SUSPEND on host-initiated wake-up 2017-05-29 14:17:59 +02:00
dev-mtp.c usb: Set category and description of the MTP device 2017-01-24 23:26:54 +03:00
dev-network.c usb: replace handle_destroy with unrealize 2017-02-23 15:40:19 +01:00
dev-serial.c char: move CharBackend handling in char-fe unit 2017-06-02 11:33:53 +04:00
dev-smartcard-reader.c usb-ccid: make ccid_write_data_block() cope with null buffers 2017-05-07 09:57:51 +03:00
dev-storage.c -----BEGIN PGP SIGNATURE----- 2017-03-02 15:25:37 +00:00
dev-uas.c usb: release the created buses 2017-03-01 11:51:29 +04:00
dev-wacom.c usb: replace handle_destroy with unrealize 2017-02-23 15:40:19 +01:00
hcd-ehci-pci.c usb: ehci: fix memory leak in ehci 2017-02-21 08:11:42 +01:00
hcd-ehci-sysbus.c
hcd-ehci.c ehci: stop recursive calls to ehci_work_bh 2017-06-13 12:17:33 +02:00
hcd-ehci.h ehci: stop recursive calls to ehci_work_bh 2017-06-13 12:17:33 +02:00
hcd-musb.c
hcd-ohci.c ohci: relax link check 2017-03-09 09:46:13 +01:00
hcd-uhci.c
hcd-xhci-nec.c xhci: split into multiple files 2017-05-29 14:03:35 +02:00
hcd-xhci.c xhci: only update dequeue ptr on completed transfers 2017-06-12 16:14:04 +02:00
hcd-xhci.h xhci: split into multiple files 2017-05-29 14:03:35 +02:00
host-legacy.c
host-libusb.c usb-host: support devices with sparse/non-sequential USB interfaces 2017-06-21 15:30:08 +02:00
host-stub.c hw/ppc/spapr: Fix boot path of usb-host storage devices 2017-01-31 10:10:13 +11:00
host.h
libhw.c
Makefile.objs xhci: add CONFIG_USB_XHCI_NEC option 2017-05-29 14:03:36 +02:00
quirks-ftdi-ids.h
quirks-pl2303-ids.h
quirks.c
quirks.h
redirect.c char: make chr_fe_deinit() optionaly delete backend 2017-06-02 11:33:53 +04:00
trace-events xhci: apply limits to loops 2017-02-21 08:11:43 +01:00
tusb6010.c
xen-usb.c qobject: Use simpler QDict/QList scalar insertion macros 2017-05-09 09:13:51 +02:00