On Di, 2014-04-15 at 19:33 -0400, Ján Veselý wrote: > Hi, > > I found some more time to work on this. However, I'm not sure I > understand the purpose of compat property: > I noticed that the only place it's set is in PC_COMPAT_1_3 (is this > what you meant by older devices?),
Older machine types, yes. This switches the tablet to usb1 by default if you start qemu with -M pc-1.3 (or older), because it was usb1 only in qemu 1.3 & older. > I guess same setting for FS mouse and kbd should be added there as well. They need to go to the (probably not added yet) PC_COMPAT_2_0. > The switch statement in usb_tablet_initfn selects between two > descriptor structures, however, these structures are almost identical > with the sole exception of .high field being set in the HS version > (desc_tablet2). > > So changing the switch statement to: > if (us->usb_version < 2) > dev->usb_desc->high = NULL; > > should be OK for all usb hid devices, right? No. That struct is shared between all device instances, so if you muck with it all devices are affected, i.e. this ... qemu -device usb-tablet,usb_ver=1 -device usb_tablet,usb_ver=2 will not work correctly. cheers, Gerd