Hide Forgot
Description of problem: xhci usb storage lost in guest after wakeup from S3. In qemu could always found the controller and device. Test this issue in win2012 guest and qemu report same message, but qxl driver has some problem, so cannot login guest to check. Version-Release number of selected component (if applicable): qemu-kvm-rhev-1.5.3-6.el7.x86_64 Kernel 3.10.0-28.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1.boot guest with xhci controller # /usr/libexec/qemu-kvm ... -device nec-usb-xhci,id=xhci \ -device usb-storage,drive=drive-usb-0-0,id=usb-0-0,removable=on,bus=xhci.0,port=1 \ -drive file=/home/usb,if=none,id=drive-usb-0-0,media=disk,format=qcow2 2.check usb device in guest # lsusb 3.do S3 in guest # echo -n "mem" > /sys/power/state 4.wakeup from S3 (qemu)system_wakeup 5.check usb device in guest again # lsusb Actual results: after step2: Bus 002 Device 002: ID 46f4:0001 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub after wakeup from s3, dmesg show: [ 119.343105] xhci_hcd 0000:00:04.0: xHCI host not responding to stop endpoint command. [ 119.343107] xhci_hcd 0000:00:04.0: Assuming host is dying, halting host. [ 119.343167] xhci_hcd 0000:00:04.0: HC died; cleaning up [ 119.343432] dpm_run_callback(): usb_dev_resume+0x0/0x20 returns -22 [ 119.343446] PM: Device 2-1 failed to resume async: error -22 hmp show: (qemu) xhci: xhci_kick_ep for disabled slot 1 xhci: slot id 1 not enabled after step5: Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Expected results: Additional info: ehci controller not hit this issue.
Test on qemu-kvm 1.5.0-1 hit the same issue. Test on qemu-kvm 1.4.0-4 hit bug 903105.
patch posted (upstream f1f8bc218a422081f36f0b325b3de5e6a5078b74)
Fix included in qemu-kvm-1.5.3-49.el7
Reproduce this bug with qemu-kvm-1.5.3-41.el7.x86_64. steps: 1.boot guest with xhci controller # /usr/libexec/qemu-kvm ... -device nec-usb-xhci,id=xhci \ -device usb-storage,drive=drive-usb-0-0,id=usb-0-0,removable=on,bus=xhci.0,port=1 \ -drive file=/home/usb,if=none,id=drive-usb-0-0,media=disk,format=qcow2 2.Enter s3 state, and resume. Result: dmesg: [ 37.743055] xhci_hcd 0000:00:05.0: xHCI host not responding to stop endpoint command. [ 37.743057] xhci_hcd 0000:00:05.0: Assuming host is dying, halting host. [ 37.743126] xhci_hcd 0000:00:05.0: HC died; cleaning up [ 37.743156] dpm_run_callback(): usb_dev_resume+0x0/0x20 returns -22 [ 37.743167] PM: Device 2-1 failed to resume async: error -22 [ 37.743348] PM: resume of devices complete after 10117.873 msecs [ 37.743687] usb 2-1: USB disconnect, device number 2 [ 37.744613] sd 2:0:0:0: [sda] Synchronizing SCSI cache [ 37.744638] sd 2:0:0:0: [sda] [ 37.744640] Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK [ 37.743518] Restarting tasks ... done. [root@localhost ~]# lsusb Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Update qemu-kvm package. Host: qemu-kvm-1.5.3-49.el7.x86_64 qemu-kvm-debuginfo-1.5.3-49.el7.x86_64 qemu-kvm-tools-1.5.3-49.el7.x86_64 libvirt-daemon-driver-qemu-1.1.1-22.el7.x86_64 qemu-img-1.5.3-49.el7.x86_64 qemu-kvm-common-1.5.3-49.el7.x86_64 Result: [ 89.471659] ata1.01: configured for MWDMA2 [ 89.628397] usb 2-1: reset SuperSpeed USB device number 2 using xhci_hcd [ 89.639656] xhci_hcd 0000:00:05.0: xHCI xhci_drop_endpoint called with disabled ep ffff880037259e80 [ 89.639657] xhci_hcd 0000:00:05.0: xHCI xhci_drop_endpoint called with disabled ep ffff880037259ec0 [ 89.639875] usb 2-1: Set SEL for device-initiated U1 failed. [ 89.639914] usb 2-1: Set SEL for device-initiated U2 failed. [ 89.640032] PM: resume of devices complete after 320.878 msecs [ 89.640115] Restarting tasks ... done. [ 90.592123] VFS: busy inodes on changed media or resized disk sda The problem in comment#0 not happening. but got "Set SEL for device-initiated U1 failed", not sure whether expected or not.
> The problem in comment#0 not happening. but got "Set SEL for > device-initiated U1 failed", not sure whether expected or not. Hi Gerd and Hai, QE filed a new bz[1] about this issue. Free to update your comment in new bz. [1]Bug 1071524 - Guest dmesg show "usb 2-1: Set SEL for device-initiated U1 failed" error after wakeup from S3
needinfo is leftover here I think, clearing ...
This request was resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you have further questions about the request.