diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2013-08-12 08:30:39 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-08-12 08:30:39 -0500 |
commit | 283c8733b5a2e7ecd9a681656690ffef8dd675ae (patch) | |
tree | f5664a6f33b28b5f1ed8850103d5fc32081033d3 | |
parent | 2aa09da823c258b3636d0e73527510cd196c68e4 (diff) | |
parent | dad5b9ea0895c227bc9d48b7f0a6fa51eaaa8661 (diff) | |
download | hqemu-283c8733b5a2e7ecd9a681656690ffef8dd675ae.zip hqemu-283c8733b5a2e7ecd9a681656690ffef8dd675ae.tar.gz |
Merge remote-tracking branch 'kraxel/usb.87' into staging
# By Gerd Hoffmann
# Via Gerd Hoffmann
* kraxel/usb.87:
xhci: implement warm port reset
Message-id: 1375961495-20970-1-git-send-email-kraxel@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r-- | hw/usb/hcd-xhci.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index ff5f681..58c88b8 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -2672,7 +2672,7 @@ static void xhci_port_update(XHCIPort *port, int is_detach) xhci_port_notify(port, PORTSC_CSC); } -static void xhci_port_reset(XHCIPort *port) +static void xhci_port_reset(XHCIPort *port, bool warm_reset) { trace_usb_xhci_port_reset(port->portnr); @@ -2683,6 +2683,11 @@ static void xhci_port_reset(XHCIPort *port) usb_device_reset(port->uport->dev); switch (port->uport->dev->speed) { + case USB_SPEED_SUPER: + if (warm_reset) { + port->portsc |= PORTSC_WRC; + } + /* fall through */ case USB_SPEED_LOW: case USB_SPEED_FULL: case USB_SPEED_HIGH: @@ -2845,8 +2850,12 @@ static void xhci_port_write(void *ptr, hwaddr reg, switch (reg) { case 0x00: /* PORTSC */ /* write-1-to-start bits */ + if (val & PORTSC_WPR) { + xhci_port_reset(port, true); + break; + } if (val & PORTSC_PR) { - xhci_port_reset(port); + xhci_port_reset(port, false); break; } |