Received: by 10.223.185.116 with SMTP id b49csp1053801wrg; Fri, 23 Feb 2018 11:03:57 -0800 (PST) X-Google-Smtp-Source: AH8x224TbRmPeOUxUBXuJ98evHYe8+eRGxC45swEdlZI1gOcUBt/8UX8eN1cNo0CvAgRD7NXVyQe X-Received: by 10.99.163.111 with SMTP id v47mr2175405pgn.80.1519412637684; Fri, 23 Feb 2018 11:03:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519412637; cv=none; d=google.com; s=arc-20160816; b=eL2BuUMO4HvaDXIdNEgLno0zBKzllcXyQvbm2Wm9HA/xPVn7Y6DjtIrLrg5mpLdI// VZRCKgB5DuOdgMk6ryj3lU4Z4WOqUbPWX3mdIGxEEjNeRORWC4jAVNvUK0VIGWXHkY9s 50E1xAQCzc7uLdH/ma7AR5x3GiC/qu8lw4UUMINhX2JXMIOvlObFNdGQ2G2vHjteUP9L N11BCDjCbn5/TMGrcstojJ7suvC5wvIb4e3ZXLZhxCyZpZZ5tp3Gwv35nxHYdYf24dXM xfdZGs3RoV61n6qGvZHhyOdfInCJzQZo4xHdgynkcIvtnhn522evW8ThDuckNQGG0q4M GCXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=fIvJkW7iGp+iu29yXpmSOyI94f70L7BFzTv/3QhcV8w=; b=LUI6IyIjfcuebIZuqueNA0EeGvUov7leYMKRj6LdJ9rz0Io9EAjwT7rlH5sPt4CLAy RpCOLwjlFeHvCi3zEe6x77EwJxuVBChXsgGoiAlSzHqX3L0g9hyP5D+NeRV9LH8sSTjt XnwMfDnu+PpX4hfmNCcX16ukyQqb0Io3jrIRRhYuGzabFQAbtRYn28QNRHctM8AYbxq8 Oj7clydNu7/s5RwKZeGPhffSsmaHXpoXnpws10/lBKpHOC6Zad/8bRf2hZ0jAoSXo9YG VmA7c3rUZ+R0am7H0m3EDpYBNT5Z/LzXGtLV3r5mcs26FWKvQqSoEHAlCKah6zllLWdc 9rdw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k11si502035pgq.0.2018.02.23.11.03.43; Fri, 23 Feb 2018 11:03:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965659AbeBWS6o (ORCPT + 99 others); Fri, 23 Feb 2018 13:58:44 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:50604 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965625AbeBWS6f (ORCPT ); Fri, 23 Feb 2018 13:58:35 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 275C51127; Fri, 23 Feb 2018 18:58:34 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Zhengjun Xing , Mathias Nyman Subject: [PATCH 4.15 38/45] xhci: Fix xhci debugfs devices node disappearance after hibernation Date: Fri, 23 Feb 2018 19:29:17 +0100 Message-Id: <20180223170721.370977939@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170715.197760019@linuxfoundation.org> References: <20180223170715.197760019@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Zhengjun Xing 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: # v4.15 Signed-off-by: Zhengjun Xing Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/xhci.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -1018,6 +1018,7 @@ int xhci_resume(struct xhci_hcd *xhci, b 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));