[PATCH] hw/usb: fix xhci port notify

Nikita Ostrenkov posted 1 patch 1 year ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20231117082411.2586-1-n.ostrenkov@gmail.com
Maintainers: Gerd Hoffmann <kraxel@redhat.com>
There is a newer version of this series
hw/usb/hcd-xhci.c | 1 +
1 file changed, 1 insertion(+)
[PATCH] hw/usb: fix xhci port notify
Posted by Nikita Ostrenkov 1 year ago
From MCF5253 Reference manual https://www.nxp.com/docs/en/reference-manual/MCF5253RM.pdf

Host mode: The controller sets this bit to a one when on any port a Connect Status occurs, a PortEnable/Disable Change occurs, an Over Current Change occurs, or the Force Port Resume bit is set as theresult of a J-K transition on the suspended port.
---
 hw/usb/hcd-xhci.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index 4b60114207..1b2f4ac721 100644
--- a/hw/usb/hcd-xhci.c
+++ b/hw/usb/hcd-xhci.c
@@ -2627,6 +2627,7 @@ static void xhci_port_notify(XHCIPort *port, uint32_t bits)
     if (!xhci_running(port->xhci)) {
         return;
     }
+    port->xhci->usbsts |= USBSTS_PCD;
     xhci_event(port->xhci, &ev, 0);
 }
 
-- 
2.34.1