public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xhci: fix debugfs register accesses while suspended
@ 2023-04-05  9:03 Johan Hovold
  0 siblings, 0 replies; only message in thread
From: Johan Hovold @ 2023-04-05  9:03 UTC (permalink / raw)
  To: Mathias Nyman
  Cc: Greg Kroah-Hartman, Lu Baolu, Alan Stern, Oliver Neukum,
	Thinh Nguyen, Udipto Goswami, linux-usb, linux-kernel,
	Johan Hovold, stable

Wire up the debugfs regset device pointer so that the controller is
resumed before accessing registers to avoid crashing or locking up if it
happens to be runtime suspended.

Fixes: 02b6fdc2a153 ("usb: xhci: Add debugfs interface for xHCI driver")
Cc: stable@vger.kernel.org # 4.15: 30332eeefec8: debugfs: regset32: Add Runtime PM support
Cc: stable@vger.kernel.org # 4.15
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/usb/host/xhci-debugfs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/host/xhci-debugfs.c b/drivers/usb/host/xhci-debugfs.c
index 0bc7fe11f749..99baa60ef50f 100644
--- a/drivers/usb/host/xhci-debugfs.c
+++ b/drivers/usb/host/xhci-debugfs.c
@@ -133,6 +133,7 @@ static void xhci_debugfs_regset(struct xhci_hcd *xhci, u32 base,
 	regset->regs = regs;
 	regset->nregs = nregs;
 	regset->base = hcd->regs + base;
+	regset->dev = hcd->self.controller;
 
 	debugfs_create_regset32((const char *)rgs->name, 0444, parent, regset);
 }
-- 
2.39.2


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-04-05  9:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-05  9:03 [PATCH] xhci: fix debugfs register accesses while suspended Johan Hovold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox