mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 07:25:03 +01:00
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: dfba2174dc ("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>
This commit is contained in:
parent
f3d12ec847
commit
2bbd38fcd2
1 changed files with 8 additions and 1 deletions
|
|
@ -1392,8 +1392,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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue