Skip to content

Commit 315d114

Browse files
matnymantoddkjos
authored andcommitted
UPSTREAM: xhci: dbc: enable back DbC in resume if it was enabled before suspend
DbC is currently only enabled back if it's in configured state during suspend. If system is suspended after DbC is enabled, but before the device is properly enumerated by the host, then DbC would not be enabled back in resume. Always enable DbC back in resume if it's suspended in enabled, connected, or configured state Cc: stable <stable@kernel.org> Fixes: dfba217 ("usb: xhci: Add DbC support in xHCI driver") Tested-by: Łukasz Bartosik <ukaszb@chromium.org> Change-Id: I8541d2bcff82ed843298ef7867285b051d632bb1 Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit 2bbd38f) Bug: 424155152 Change-Id: I0888ec4d631fdebaa658157357d63a9abf177fc7 Signed-off-by: Łukasz Bartosik <ukaszb@google.com>
1 parent 8bbbd20 commit 315d114

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

drivers/usb/host/xhci-dbgcap.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1389,8 +1389,15 @@ int xhci_dbc_suspend(struct xhci_hcd *xhci)
13891389
if (!dbc)
13901390
return 0;
13911391

1392-
if (dbc->state == DS_CONFIGURED)
1392+
switch (dbc->state) {
1393+
case DS_ENABLED:
1394+
case DS_CONNECTED:
1395+
case DS_CONFIGURED:
13931396
dbc->resume_required = 1;
1397+
break;
1398+
default:
1399+
break;
1400+
}
13941401

13951402
xhci_dbc_stop(dbc);
13961403

0 commit comments

Comments
 (0)