Skip to contentSkip to conversation

xhci: fix debugfs register accesses while suspended

PATCH New Johan Hovold 1 participant 1 message Apr 5, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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 [email protected] # 4.15: 30332eeefec8: debugfs: regset32: Add Runtime PM support
---
 drivers/usb/host/xhci-debugfs.c | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/host/xhci-debugfs.c +1 -0
index 0bc7fe11f749..99baa60ef50f 100644
@@ -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);
 }
Signature · 1 line
2.39.2