summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMathias Nyman <mathias.nyman@linux.intel.com>2025-10-14 01:55:42 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-10-29 14:07:04 +0100
commit03d7e8c749428fccfb8136ea3cc75d1eb70891c1 (patch)
treee8cd090672b4ee5369f9853b0461a9183b71bfbb /drivers
parent2c217d0e86885cf61138f084a7b81d3a38bebccf (diff)
downloadlinux-03d7e8c749428fccfb8136ea3cc75d1eb70891c1.tar.gz
linux-03d7e8c749428fccfb8136ea3cc75d1eb70891c1.tar.bz2
linux-03d7e8c749428fccfb8136ea3cc75d1eb70891c1.zip
xhci: dbc: enable back DbC in resume if it was enabled before suspend
commit 2bbd38fcd29670e46c0fdb9cd0e90507a8a1bf6a 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: 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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/host/xhci-dbgcap.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/usb/host/xhci-dbgcap.c b/drivers/usb/host/xhci-dbgcap.c
index 764657070883..bfd437269800 100644
--- a/drivers/usb/host/xhci-dbgcap.c
+++ b/drivers/usb/host/xhci-dbgcap.c
@@ -1319,8 +1319,15 @@ int xhci_dbc_suspend(struct xhci_hcd *xhci)
if (!dbc)
return 0;
- if (dbc->state == DS_CONFIGURED)
+ switch (dbc->state) {
+ case DS_ENABLED:
+ case DS_CONNECTED:
+ case DS_CONFIGURED:
dbc->resume_required = 1;
+ break;
+ default:
+ break;
+ }
xhci_dbc_stop(dbc);