lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 18 May 2021 19:16:40 +0800
From:   Kai-Heng Feng <kai.heng.feng@...onical.com>
To:     mathias.nyman@...el.com
Cc:     Kai-Heng Feng <kai.heng.feng@...onical.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-usb@...r.kernel.org (open list:USB XHCI DRIVER),
        linux-kernel@...r.kernel.org (open list)
Subject: [PATCH] xhci: State explicitly when the controller is inaccessible

Sometimes the dmesg says "Controller not ready at resume" because CNR is
flagged. But what actually happens is that the whole USBSTS becomes
inaccessible, and the reason could be disabled PCI I/O space or faulty
firmware/hardware.

So state the reason explicitly to make the message more clear.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@...onical.com>
---
 drivers/usb/host/xhci.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index ca9385d22f68..0e6fbe1f4fcc 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -1117,8 +1117,9 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
 		retval = xhci_handshake(&xhci->op_regs->status,
 					STS_CNR, 0, 10 * 1000 * 1000);
 		if (retval) {
-			xhci_warn(xhci, "Controller not ready at resume %d\n",
-				  retval);
+			xhci_warn(xhci, "Controller is %s at resume %d\n",
+				  retval == -ENODEV ? "inaccessible" :
+				  "not ready", retval);
 			spin_unlock_irq(&xhci->lock);
 			return retval;
 		}
-- 
2.31.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ