提交 f164041c 编写于 作者: M Mario Limonciello 提交者: Jialin Zhang

xhci: Don't show warning for reinit on known broken suspend

stable inclusion
from stable-v5.10.150
commit cc952e3bf61cf83e51dab80aba656da22dbc6d00
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I6D0XA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=cc952e3bf61cf83e51dab80aba656da22dbc6d00

--------------------------------

[ Upstream commit 484d6f7a ]

commit 8b328f80 ("xhci: re-initialize the HC during resume if HCE was
set") introduced a new warning message when the host controller error
was set and re-initializing.

This is expected behavior on some designs which already set
`xhci->broken_suspend` so the new warning is alarming to some users.

Modify the code to only show the warning if this was a surprising behavior
to the XHCI driver.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=216470
Fixes: 8b328f80 ("xhci: re-initialize the HC during resume if HCE was set")
Reported-by: NArtem S. Tashkinov <aros@gmx.com>
Signed-off-by: NMario Limonciello <mario.limonciello@amd.com>
Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20220921123450.671459-4-mathias.nyman@linux.intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NJialin Zhang <zhangjialin11@huawei.com>
上级 9e1e3731
......@@ -1163,7 +1163,8 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
/* re-initialize the HC on Restore Error, or Host Controller Error */
if (temp & (STS_SRE | STS_HCE)) {
reinit_xhc = true;
xhci_warn(xhci, "xHC error in resume, USBSTS 0x%x, Reinit\n", temp);
if (!xhci->broken_suspend)
xhci_warn(xhci, "xHC error in resume, USBSTS 0x%x, Reinit\n", temp);
}
if (reinit_xhc) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册