Skip to content

Commit 248468f

Browse files
matnymangregkh
authored andcommitted
xhci: dbc: enable back DbC in resume if it was enabled before suspend
commit 2bbd38f upstream. 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> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent a8d81c9 commit 248468f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

drivers/usb/host/xhci-dbgcap.c

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

1390-
if (dbc->state == DS_CONFIGURED)
1390+
switch (dbc->state) {
1391+
case DS_ENABLED:
1392+
case DS_CONNECTED:
1393+
case DS_CONFIGURED:
13911394
dbc->resume_required = 1;
1395+
break;
1396+
default:
1397+
break;
1398+
}
13921399

13931400
xhci_dbc_stop(dbc);
13941401

0 commit comments

Comments
 (0)