RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1012365 - xhci usb storage lost in guest after wakeup from S3
Summary: xhci usb storage lost in guest after wakeup from S3
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm
Version: 7.0
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: rc
: ---
Assignee: Gerd Hoffmann
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: Virt-S3/S4-7.0
TreeView+ depends on / blocked
 
Reported: 2013-09-26 11:07 UTC by Xu Han
Modified: 2014-06-18 03:38 UTC (History)
12 users (show)

Fixed In Version: qemu-kvm-1.5.3-49.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 11:22:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Xu Han 2013-09-26 11:07:20 UTC
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.

Comment 2 Xu Han 2013-09-27 07:14:40 UTC
Test on qemu-kvm 1.5.0-1 hit the same issue.
Test on qemu-kvm 1.4.0-4 hit bug 903105.

Comment 3 Gerd Hoffmann 2013-12-11 10:05:24 UTC
patch posted (upstream f1f8bc218a422081f36f0b325b3de5e6a5078b74)

Comment 5 Miroslav Rezanina 2014-02-19 08:47:46 UTC
Fix included in qemu-kvm-1.5.3-49.el7

Comment 7 mazhang 2014-02-25 08:40:39 UTC
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.

Comment 8 juzhang 2014-03-01 10:06:06 UTC
> 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

Comment 10 Gerd Hoffmann 2014-06-12 10:45:47 UTC
needinfo is leftover here I think, clearing ...

Comment 11 Ludek Smid 2014-06-13 11:22:04 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.