Skip to content

Commit

Permalink
DM USB: xHCI: add the resume state for PLS bits
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
xiaoguangwu authored and wenlingz committed Jul 12, 2019
1 parent c3d4cc3 commit 32d186b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions devicemodel/hw/pci/xhci.c
Expand Up @@ -1323,8 +1323,8 @@ pci_xhci_portregs_write(struct pci_xhci_vdev *xdev,
UPRINTF(LDBG, "Port new PLS: %d\r\n", newpls);

switch (newpls) {
case 0: /* U0 */
case 3: /* U3 */
case UPS_PORT_LS_U0:
case UPS_PORT_LS_U3:
if (oldpls != newpls) {
p->portsc &= ~XHCI_PS_PLS_MASK;
p->portsc |= XHCI_PS_PLS_SET(newpls);
Expand All @@ -1345,7 +1345,10 @@ pci_xhci_portregs_write(struct pci_xhci_vdev *xdev,
}
}
break;

case UPS_PORT_LS_RESUME:
p->portsc &= ~XHCI_PS_PLS_MASK;
p->portsc |= XHCI_PS_PLS_SET(newpls);
break;
default:
UPRINTF(LWRN, "Unhandled change port %d PLS %u\r\n",
port, newpls);
Expand Down

0 comments on commit 32d186b

Please sign in to comment.