]> git.baikalelectronics.ru Git - kernel.git/commit
xhci: Fix repeated xhci wake after suspend due to uncleared internal wake state
authorMathias Nyman <mathias.nyman@linux.intel.com>
Thu, 11 Mar 2021 11:53:53 +0000 (13:53 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 Mar 2021 12:03:06 +0000 (13:03 +0100)
commit73a5534fa87d776a517e9c64710ed29c5a2bda7e
tree450232517f19260ce97eb0bb130b10c06147bd18
parent7088e41c19c7be5f7eb3613af1881e3c8015b6d1
xhci: Fix repeated xhci wake after suspend due to uncleared internal wake state

If port terminations are detected in suspend, but link never reaches U0
then xHCI may have an internal uncleared wake state that will cause an
immediate wake after suspend.

This wake state is normally cleared when driver clears the PORT_CSC bit,
which is set after a device is enabled and in U0.

Write 1 to clear PORT_CSC for ports that don't have anything connected
when suspending. This makes sure any pending internal wake states in
xHCI are cleared.

Cc: stable@vger.kernel.org
Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20210311115353.2137560-5-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci.c