[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20230405090342.7363-1-johan+linaro@kernel.org>
Date: Wed, 5 Apr 2023 11:03:42 +0200
From: Johan Hovold <johan+linaro@...nel.org>
To: Mathias Nyman <mathias.nyman@...el.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Lu Baolu <baolu.lu@...ux.intel.com>,
Alan Stern <stern@...land.harvard.edu>,
Oliver Neukum <oneukum@...e.com>,
Thinh Nguyen <Thinh.Nguyen@...opsys.com>,
Udipto Goswami <quic_ugoswami@...cinc.com>,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
Johan Hovold <johan+linaro@...nel.org>, stable@...r.kernel.org
Subject: [PATCH] xhci: fix debugfs register accesses while suspended
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@...r.kernel.org # 4.15: 30332eeefec8: debugfs: regset32: Add Runtime PM support
Cc: stable@...r.kernel.org # 4.15
Signed-off-by: Johan Hovold <johan+linaro@...nel.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
Powered by blists - more mailing lists