linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: dwc3: Fix debugfs creation flow
@ 2021-06-17  5:56 Minas Harutyunyan
  2021-06-17  6:10 ` Greg Kroah-Hartman
  2021-06-17  6:31 ` Jack Pham
  0 siblings, 2 replies; 9+ messages in thread
From: Minas Harutyunyan @ 2021-06-17  5:56 UTC (permalink / raw)
  To: linux-usb; +Cc: Greg Kroah-Hartman, Felipe Balbi, Jack Pham, Peter Chen

Creation EP's debugfs called earlier than debugfs folder for dwc3
device created. As result EP's debugfs are created in '/sys/kernel/debug'
instead of '/sys/kernel/debug/usb/dwc3.1.auto'.

Moved dwc3_debugfs_init() function call before calling
dwc3_core_init_mode() to allow create dwc3 debugfs parent before
creating EP's debugfs's.

Fixes: 8562d5bfc0fc ("USB: dwc3: remove debugfs root dentry storage")
Signed-off-by: Minas Harutyunyan <hminas@synopsys.com>
---
 drivers/usb/dwc3/core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index e0a8e796c158..ba74ad7f6995 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -1620,17 +1620,18 @@ static int dwc3_probe(struct platform_device *pdev)
 	}
 
 	dwc3_check_params(dwc);
+	dwc3_debugfs_init(dwc);
 
 	ret = dwc3_core_init_mode(dwc);
 	if (ret)
 		goto err5;
 
-	dwc3_debugfs_init(dwc);
 	pm_runtime_put(dev);
 
 	return 0;
 
 err5:
+	dwc3_debugfs_exit(dwc);
 	dwc3_event_buffers_cleanup(dwc);
 
 	usb_phy_shutdown(dwc->usb2_phy);

base-commit: 1da8116eb0c5dfc05cfb89896239badb18c4daf3
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-06-17 16:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-17  5:56 [PATCH] usb: dwc3: Fix debugfs creation flow Minas Harutyunyan
2021-06-17  6:10 ` Greg Kroah-Hartman
2021-06-17  7:11   ` Minas Harutyunyan
2021-06-17  7:33     ` Greg Kroah-Hartman
2021-06-17  9:14       ` Minas Harutyunyan
2021-06-17 11:01         ` Greg Kroah-Hartman
2021-06-17 16:20           ` Minas Harutyunyan
2021-06-17  6:31 ` Jack Pham
2021-06-17  7:24   ` Minas Harutyunyan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).