Skip to contentSkip to conversation

Introduce new "no_guest_reset" parameter for usb-host device (fwd)

PATCH Gerd Hoffmann 1 participant 1 message Jan 7, 2019 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): alpine.DEB.2.11.1812271413170.12302@REDDOT

#1 lore raw
Quoted 2 lines · Alexander Kappner

Resending; forgot to CC maintainer.

Now the list mail address is wrong (.com instead of .org).

Quoted 6 lines

1) Guest recognizes new device, sends reset to emulated USB host
2) QEMU's USB host sends reset to host kernel
3) Host kernel resets device
4) After reset, host kernel determines that some part of the device descriptor has changed ("device firmware changed" in dmesg), so host kernel decides to re-enumerate the device.

Not sure this is actually the reason ...

Quoted 6 lines

5) Re-enumeration causes QEMU to disconnect and reconnect the device in the guest.
6) goto 1)

Here's from the host kernel (note the "device firmware changed" lines")

Quoted 8 lines
[3677704.473050] usb 1-1.3: new high-speed USB device number 53 using ehci-pci
[3677704.555594] usb 1-1.3: New USB device found, idVendor=05ac, idProduct=12a8, bcdDevice=11.08
[3677704.555599] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[3677704.555602] usb 1-1.3: Product: iPhone
[3677704.555605] usb 1-1.3: Manufacturer: Apple Inc.
[3677704.555607] usb 1-1.3: SerialNumber: [[removed]]
[3677709.401040] usb 1-1.3: reset high-speed USB device number 53 using ehci-pci
[3677709.479486] usb 1-1.3: device firmware changed

.. here it is ...

Quoted 9 lines
[3677709.479842] usb 1-1.3: USB disconnect, device number 53
[3677709.546039] usb 1-1.3: new high-speed USB device number 54 using ehci-pci
[3677709.627471] usb 1-1.3: New USB device found, idVendor=05ac, idProduct=12a8, bcdDevice=11.08
[3677709.627476] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[3677709.627479] usb 1-1.3: Product: iPhone
[3677709.627481] usb 1-1.3: Manufacturer: Apple Inc.
[3677709.627483] usb 1-1.3: SerialNumber: [[removed]]
[3677762.320044] usb 1-1.3: reset high-speed USB device number 54 using ehci-pci
[3677762.615630] usb 1-1.3: USB disconnect, device number 54

... but on the second cycle this is missing but there is still a disconnect.

Could be the phone actually disconnects.

Quoted 3 lines

introduced for the usb-host device. I can confirm that the configuration described above (iPhone XS + Mojave guest) works flawlessly with no_guest_reset=True specified.

Can you make this "guest-reset=false"? Otherwise the patch looks fine.

thanks,
Gerd