Skip to content

Commit 2bbd38f

Browse files
matnymangregkh
authored andcommitted
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> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent f3d12ec commit 2bbd38f

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
@@ -1392,8 +1392,15 @@ int xhci_dbc_suspend(struct xhci_hcd *xhci)
13921392
if (!dbc)
13931393
return 0;
13941394

1395-
if (dbc->state == DS_CONFIGURED)
1395+
switch (dbc->state) {
1396+
case DS_ENABLED:
1397+
case DS_CONNECTED:
1398+
case DS_CONFIGURED:
13961399
dbc->resume_required = 1;
1400+
break;
1401+
default:
1402+
break;
1403+
}
13971404

13981405
xhci_dbc_stop(dbc);
13991406

0 commit comments

Comments
 (0)