DM USB: xHCI: add the resume state for PLS bits

Add resume state for the Port Link Status (PLS) bits.

Tracked-On: #3401
Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
This commit is contained in:
Xiaoguang Wu 2019-07-09 21:24:36 +08:00 committed by wenlingz
parent c3d4cc36e1
commit 32d186ba68

View File

@ -1323,8 +1323,8 @@ pci_xhci_portregs_write(struct pci_xhci_vdev *xdev,
UPRINTF(LDBG, "Port new PLS: %d\r\n", newpls); UPRINTF(LDBG, "Port new PLS: %d\r\n", newpls);
switch (newpls) { switch (newpls) {
case 0: /* U0 */ case UPS_PORT_LS_U0:
case 3: /* U3 */ case UPS_PORT_LS_U3:
if (oldpls != newpls) { if (oldpls != newpls) {
p->portsc &= ~XHCI_PS_PLS_MASK; p->portsc &= ~XHCI_PS_PLS_MASK;
p->portsc |= XHCI_PS_PLS_SET(newpls); p->portsc |= XHCI_PS_PLS_SET(newpls);
@ -1345,7 +1345,10 @@ pci_xhci_portregs_write(struct pci_xhci_vdev *xdev,
} }
} }
break; break;
case UPS_PORT_LS_RESUME:
p->portsc &= ~XHCI_PS_PLS_MASK;
p->portsc |= XHCI_PS_PLS_SET(newpls);
break;
default: default:
UPRINTF(LWRN, "Unhandled change port %d PLS %u\r\n", UPRINTF(LWRN, "Unhandled change port %d PLS %u\r\n",
port, newpls); port, newpls);