qemu/hw/usb
Gerd Hoffmann b63e10508b usb: assign unique serial numbers to hid devices
Windows guests have trouble dealing with usb devices having identical
serial numbers.  So, assign unique serial numbers to usb hid devices.
All other usb devices have this already.

In the past the fixed serial number has been used to indicate working
remote setup to linux guests.  Here is a bit of history:

 * First there was nothing.
 * Then I added a rule to udev checking for serial == 42.
   (this is in rhel-6).
 * Then systemd + udev merged.
 * Then I changed the rule to check for serial != 1 instead, so we can
   use any serial but "1" which is the one the old broken devices had
   (this is in rhel-7).  March 2014 in upstream systemd.
 * Then all usb power management rules where dropped from systemd (June
   2015).  Which I figured today (Sept 2018), after wondering that the
   rules are gone in fedora 28.

So, three years ago the serial number check was dropped upstream, yet I
hav't seen a single report about autosuspend issues (or cpu usage for
usb emulation going up, which is the typical symtom).

So I figured I can stop worring that changing the serial number will
break things and just do it.

And even if it turns out autosuspend is still an issue:  I think
meanwhile we can really stop worrying about guests running in old qemu
versions with broken usb suspend (fixed in 0.13 !).  If needed we can
enable autosuspend unconditionally in guests.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20190110125108.22834-1-kraxel@redhat.com
2019-01-30 06:47:52 +01:00
..
bus.c usb: drop unnecessary usb_device_post_load checks 2019-01-08 12:37:52 +01:00
ccid-card-emulated.c qemu/queue.h: leave head structs anonymous unless necessary 2019-01-11 15:46:55 +01:00
ccid-card-passthru.c hw/usb: Use the IEC binary prefix definitions 2018-07-02 15:41:16 +02:00
ccid.h usb-ccid: convert CCIDCardClass::exitfn() -> unrealize() 2018-01-26 07:59:33 +01:00
chipidea.c usb: Add basic code to emulate Chipidea USB IP 2018-02-09 10:40:30 +00:00
combined-packet.c qemu/queue.h: simplify reverse access to QTAILQ 2019-01-11 15:46:55 +01:00
core.c usb: don't wakeup during coldplug 2017-05-29 14:18:09 +02:00
desc-msos.c usb: use local path for local headers 2018-06-01 19:20:38 +03:00
desc.c usb: use local path for local headers 2018-06-01 19:20:38 +03:00
desc.h all: Clean up includes 2016-02-23 12:43:05 +00:00
dev-audio.c usb-audio: ignore usb packages with wrong size 2019-01-10 09:56:19 +01:00
dev-bluetooth.c avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
dev-hid.c usb: assign unique serial numbers to hid devices 2019-01-30 06:47:52 +01:00
dev-hub.c avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
dev-mtp.c qemu/queue.h: simplify reverse access to QTAILQ 2019-01-11 15:46:55 +01:00
dev-network.c qemu/queue.h: leave head structs anonymous unless necessary 2019-01-11 15:46:55 +01:00
dev-serial.c usb: use local path for local headers 2018-06-01 19:20:38 +03:00
dev-smartcard-reader.c hw/usb: Use the IEC binary prefix definitions 2018-07-02 15:41:16 +02:00
dev-storage.c block: Remove deprecated -drive option serial 2018-08-15 12:50:39 +02:00
dev-uas.c Revert "usb: release the created buses" 2018-06-18 09:15:51 +02:00
dev-wacom.c usb: use local path for local headers 2018-06-01 19:20:38 +03:00
hcd-ehci-pci.c usb: move ehci_create_ich9_with_companions to hw/i386 2019-01-08 12:43:41 +01:00
hcd-ehci-sysbus.c hw/usb: Add generic sys-bus EHCI controller 2019-01-08 12:41:32 +01:00
hcd-ehci.c qemu/queue.h: simplify reverse access to QTAILQ 2019-01-11 15:46:55 +01:00
hcd-ehci.h qemu/queue.h: simplify reverse access to QTAILQ 2019-01-11 15:46:55 +01:00
hcd-musb.c Replace all occurances of __FUNCTION__ with __func__ 2018-01-22 09:46:18 +01:00
hcd-ohci.c usb: ohci: make num_ports to an unsinged integer 2018-10-29 10:25:12 +01:00
hcd-uhci.c remove space-tab sequences 2019-01-11 15:46:55 +01:00
hcd-xhci-nec.c xhci: split into multiple files 2017-05-29 14:03:35 +02:00
hcd-xhci.c xhci: fix guest-triggerable assert 2018-07-03 09:50:39 +02:00
hcd-xhci.h xhci: split into multiple files 2017-05-29 14:03:35 +02:00
host-libusb.c usb-host: reset and close libusb_device_handle before qemu exit 2018-12-10 14:39:54 +01:00
host-stub.c usb: Remove legacy -usbdevice options (host, serial, disk and net) 2018-01-26 07:15:08 +01:00
host.h usb-host: move legacy cmd line bits 2013-02-19 12:30:05 +01:00
libhw.c usb: Clean up includes 2016-01-29 15:07:23 +00:00
Makefile.objs usb: Add basic code to emulate Chipidea USB IP 2018-02-09 10:40:30 +00:00
quirks-ftdi-ids.h
quirks-pl2303-ids.h
quirks.c usb: Clean up includes 2016-01-29 15:07:23 +00:00
quirks.h
redirect.c vmstate: constify VMStateField 2018-11-27 15:35:15 +01:00
trace-events trace-events: fix code style: print 0x before hex numbers 2017-08-01 12:13:07 +01:00
tusb6010.c usb/tusb6010: Convert sysbus init function to realize function 2018-12-13 13:48:02 +00:00
xen-usb.c xen: re-name XenDevice to XenLegacyDevice... 2019-01-14 13:45:40 +00:00