summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorZhengjun Xing <zhengjun.xing@linux.intel.com>2018-02-12 14:24:49 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-02-25 11:15:43 +0100
commit99cfcdcbfb385181a375207a61e3abc2e1428c29 (patch)
tree23f041eae6ad6e9208d12c976116669613880739 /drivers/usb
parent177b1a5bc8fee58e20b811eb1b226589e2c3991a (diff)
xhci: Fix xhci debugfs devices node disappearance after hibernation
commit d91676717261578f429d3577dbe9154b26e8abf7 upstream. During system resume from hibernation, xhci host is reset, all the nodes in devices folder are removed in xhci_mem_cleanup function. Later nodes in /sys/kernel/debug/usb/xhci/* are created again in function xhci_run, but the nodes already exist, so the nodes still keep the old ones, finally device nodes in xhci debugfs folder /sys/kernel/debug/usb/xhci/*/devices/* are disappeared. This fix removed xhci debugfs nodes before the nodes are re-created, so all the nodes in xhci debugfs can be re-created successfully. Fixes: 02b6fdc2a153 ("usb: xhci: Add debugfs interface for xHCI driver") Cc: <stable@vger.kernel.org> # v4.15 Signed-off-by: Zhengjun Xing <zhengjun.xing@linux.intel.com> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/xhci.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index da6dbe3ebd8b..8d5ce028c3d6 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -1018,6 +1018,7 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
xhci_dbg(xhci, "cleaning up memory\n");
xhci_mem_cleanup(xhci);
+ xhci_debugfs_exit(xhci);
xhci_dbg(xhci, "xhci_stop completed - status = %x\n",
readl(&xhci->op_regs->status));