Return-Path: Received: from mga02.intel.com ([134.134.136.20]:8907 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934455AbeBLMVz (ORCPT ); Mon, 12 Feb 2018 07:21:55 -0500 From: Mathias Nyman To: Cc: , Zhengjun Xing , "# v4 . 15" , Mathias Nyman Subject: [PATCH 4/6] xhci: Fix xhci debugfs devices node disappearance after hibernation Date: Mon, 12 Feb 2018 14:24:49 +0200 Message-Id: <1518438291-5068-5-git-send-email-mathias.nyman@linux.intel.com> In-Reply-To: <1518438291-5068-1-git-send-email-mathias.nyman@linux.intel.com> References: <1518438291-5068-1-git-send-email-mathias.nyman@linux.intel.com> Sender: stable-owner@vger.kernel.org List-ID: From: Zhengjun Xing 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: # v4.15 Signed-off-by: Zhengjun Xing Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 1eeb339..b01bd64 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -1014,6 +1014,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)); -- 2.7.4