usb-host: add special case for bus+addr
commite058fa2dd599ccc780d334558be9c1d155222b80
authorGerd Hoffmann <kraxel@redhat.com>
Fri, 3 Jun 2016 09:12:55 +0000 (3 11:12 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 13 Jun 2016 11:17:06 +0000 (13 13:17 +0200)
treeafedd087e8c778c1295582f471b985b44b87627b
parentda2fdd0bd1514a44309dd5be162ebfb6c166a716
usb-host: add special case for bus+addr

This patch changes usb-host behavior in case we hostbus= and hostaddr=
properties are used to identify the usb device in question.  Instead of
adding the device to the hotplug watchlist we try to open directly using
the given bus number and device address.

Putting a device specified by hostaddr to the hotplug watchlist isn't
a great idea as the address isn't a fixed property.  It changes every
time the device is plugged in.  So considering this case as "use the
device at bus:addr _now_" is more sane.  Also usb-host will throw errors
in case it can't initialize the host device.

Note: For devices on the hotplug watchlist (hostport or vendorid or
productid specified) qemu continues to ignore errors and keeps
monitoring the usb bus to see if the device eventually shows up.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 1464945175-28939-1-git-send-email-kraxel@redhat.com
hw/usb/host-libusb.c