Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: dfba2174dc42 ("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>

authored by

Mathias Nyman and committed by
Greg Kroah-Hartman
2bbd38fc f3d12ec8

+8 -1
+8 -1
drivers/usb/host/xhci-dbgcap.c
··· 1392 1392 if (!dbc) 1393 1393 return 0; 1394 1394 1395 - if (dbc->state == DS_CONFIGURED) 1395 + switch (dbc->state) { 1396 + case DS_ENABLED: 1397 + case DS_CONNECTED: 1398 + case DS_CONFIGURED: 1396 1399 dbc->resume_required = 1; 1400 + break; 1401 + default: 1402 + break; 1403 + } 1397 1404 1398 1405 xhci_dbc_stop(dbc); 1399 1406