From: Greg Kroah-Hartman Date: Tue, 15 Jun 2021 10:24:24 +0000 (+0200) Subject: drop usb-dwc3-debugfs-add-and-remove-endpoint-dirs-dynamically.patch from everywhere X-Git-Tag: v4.4.273~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=19360d333755f842256597f21c385a1d431d7c79;p=thirdparty%2Fkernel%2Fstable-queue.git drop usb-dwc3-debugfs-add-and-remove-endpoint-dirs-dynamically.patch from everywhere --- diff --git a/queue-4.19/series b/queue-4.19/series index ddf53d57866..5512cc0eba4 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -35,7 +35,6 @@ cgroup1-don-t-allow-n-in-renaming.patch usb-f_ncm-ncm_bitrate-speed-is-unsigned.patch usb-f_ncm-only-first-packet-of-aggregate-needs-to-start-timer.patch usb-pd-set-pd_t_sink_wait_cap-to-310ms.patch -usb-dwc3-debugfs-add-and-remove-endpoint-dirs-dynamically.patch usb-dwc3-ep0-fix-null-pointer-exception.patch usb-typec-ucsi-clear-ppm-capability-data-in-ucsi_init-error-path.patch usb-gadget-f_fs-ensure-io_completion_wq-is-idle-during-unbind.patch diff --git a/queue-4.19/usb-dwc3-debugfs-add-and-remove-endpoint-dirs-dynamically.patch b/queue-4.19/usb-dwc3-debugfs-add-and-remove-endpoint-dirs-dynamically.patch deleted file mode 100644 index 7cab6b8a673..00000000000 --- a/queue-4.19/usb-dwc3-debugfs-add-and-remove-endpoint-dirs-dynamically.patch +++ /dev/null @@ -1,122 +0,0 @@ -From 8d396bb0a5b62b326f6be7594d8bd46b088296bd Mon Sep 17 00:00:00 2001 -From: Jack Pham -Date: Sat, 29 May 2021 12:29:32 -0700 -Subject: usb: dwc3: debugfs: Add and remove endpoint dirs dynamically - -From: Jack Pham - -commit 8d396bb0a5b62b326f6be7594d8bd46b088296bd upstream. - -The DWC3 DebugFS directory and files are currently created once -during probe. This includes creation of subdirectories for each -of the gadget's endpoints. This works fine for peripheral-only -controllers, as dwc3_core_init_mode() calls dwc3_gadget_init() -just prior to calling dwc3_debugfs_init(). - -However, for dual-role controllers, dwc3_core_init_mode() will -instead call dwc3_drd_init() which is problematic in a few ways. -First, the initial state must be determined, then dwc3_set_mode() -will have to schedule drd_work and by then dwc3_debugfs_init() -could have already been invoked. Even if the initial mode is -peripheral, dwc3_gadget_init() happens after the DebugFS files -are created, and worse so if the initial state is host and the -controller switches to peripheral much later. And secondly, -even if the gadget endpoints' debug entries were successfully -created, if the controller exits peripheral mode, its dwc3_eps -are freed so the debug files would now hold stale references. - -So it is best if the DebugFS endpoint entries are created and -removed dynamically at the same time the underlying dwc3_eps are. -Do this by calling dwc3_debugfs_create_endpoint_dir() as each -endpoint is created, and conversely remove the DebugFS entry when -the endpoint is freed. - -Fixes: 41ce1456e1db ("usb: dwc3: core: make dwc3_set_mode() work properly") -Cc: stable -Reviewed-by: Peter Chen -Signed-off-by: Jack Pham -Link: https://lore.kernel.org/r/20210529192932.22912-1-jackp@codeaurora.org -Signed-off-by: Greg Kroah-Hartman ---- - drivers/usb/dwc3/debug.h | 3 +++ - drivers/usb/dwc3/debugfs.c | 21 ++------------------- - drivers/usb/dwc3/gadget.c | 3 +++ - 3 files changed, 8 insertions(+), 19 deletions(-) - ---- a/drivers/usb/dwc3/debug.h -+++ b/drivers/usb/dwc3/debug.h -@@ -653,9 +653,12 @@ static inline const char *dwc3_gadget_ge - - - #ifdef CONFIG_DEBUG_FS -+extern void dwc3_debugfs_create_endpoint_dir(struct dwc3_ep *dep); - extern void dwc3_debugfs_init(struct dwc3 *); - extern void dwc3_debugfs_exit(struct dwc3 *); - #else -+static inline void dwc3_debugfs_create_endpoint_dir(struct dwc3_ep *dep) -+{ } - static inline void dwc3_debugfs_init(struct dwc3 *d) - { } - static inline void dwc3_debugfs_exit(struct dwc3 *d) ---- a/drivers/usb/dwc3/debugfs.c -+++ b/drivers/usb/dwc3/debugfs.c -@@ -725,30 +725,14 @@ static void dwc3_debugfs_create_endpoint - } - } - --static void dwc3_debugfs_create_endpoint_dir(struct dwc3_ep *dep, -- struct dentry *parent) -+void dwc3_debugfs_create_endpoint_dir(struct dwc3_ep *dep) - { - struct dentry *dir; - -- dir = debugfs_create_dir(dep->name, parent); -+ dir = debugfs_create_dir(dep->name, dep->dwc->root); - dwc3_debugfs_create_endpoint_files(dep, dir); - } - --static void dwc3_debugfs_create_endpoint_dirs(struct dwc3 *dwc, -- struct dentry *parent) --{ -- int i; -- -- for (i = 0; i < dwc->num_eps; i++) { -- struct dwc3_ep *dep = dwc->eps[i]; -- -- if (!dep) -- continue; -- -- dwc3_debugfs_create_endpoint_dir(dep, parent); -- } --} -- - void dwc3_debugfs_init(struct dwc3 *dwc) - { - struct dentry *root; -@@ -777,7 +761,6 @@ void dwc3_debugfs_init(struct dwc3 *dwc) - &dwc3_testmode_fops); - debugfs_create_file("link_state", S_IRUGO | S_IWUSR, root, dwc, - &dwc3_link_state_fops); -- dwc3_debugfs_create_endpoint_dirs(dwc, root); - } - } - ---- a/drivers/usb/dwc3/gadget.c -+++ b/drivers/usb/dwc3/gadget.c -@@ -2255,6 +2255,8 @@ static int dwc3_gadget_init_endpoint(str - INIT_LIST_HEAD(&dep->started_list); - INIT_LIST_HEAD(&dep->cancelled_list); - -+ dwc3_debugfs_create_endpoint_dir(dep); -+ - return 0; - } - -@@ -2298,6 +2300,7 @@ static void dwc3_gadget_free_endpoints(s - list_del(&dep->endpoint.ep_list); - } - -+ debugfs_remove_recursive(debugfs_lookup(dep->name, dwc->root)); - kfree(dep); - } - } diff --git a/queue-5.10/series b/queue-5.10/series index 4c847c348c7..b3c5045534d 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -69,7 +69,6 @@ usb-pd-set-pd_t_sink_wait_cap-to-310ms.patch usb-dwc3-meson-g12a-fix-usb2-phy-glue-init-when-phy0-is-disabled.patch usb-dwc3-meson-g12a-disable-the-regulator-in-the-error-handling-path-of-the-probe.patch usb-dwc3-gadget-bail-from-dwc3_gadget_exit-if-dwc-gadget-is-null.patch -usb-dwc3-debugfs-add-and-remove-endpoint-dirs-dynamically.patch usb-dwc3-ep0-fix-null-pointer-exception.patch usb-musb-fix-musb_quirk_b_disconnect_99-handling.patch usb-typec-wcove-use-le-to-cpu-conversion-when-accessing-msg-header.patch diff --git a/queue-5.10/usb-dwc3-debugfs-add-and-remove-endpoint-dirs-dynamically.patch b/queue-5.10/usb-dwc3-debugfs-add-and-remove-endpoint-dirs-dynamically.patch deleted file mode 100644 index 8b40987f821..00000000000 --- a/queue-5.10/usb-dwc3-debugfs-add-and-remove-endpoint-dirs-dynamically.patch +++ /dev/null @@ -1,122 +0,0 @@ -From 8d396bb0a5b62b326f6be7594d8bd46b088296bd Mon Sep 17 00:00:00 2001 -From: Jack Pham -Date: Sat, 29 May 2021 12:29:32 -0700 -Subject: usb: dwc3: debugfs: Add and remove endpoint dirs dynamically - -From: Jack Pham - -commit 8d396bb0a5b62b326f6be7594d8bd46b088296bd upstream. - -The DWC3 DebugFS directory and files are currently created once -during probe. This includes creation of subdirectories for each -of the gadget's endpoints. This works fine for peripheral-only -controllers, as dwc3_core_init_mode() calls dwc3_gadget_init() -just prior to calling dwc3_debugfs_init(). - -However, for dual-role controllers, dwc3_core_init_mode() will -instead call dwc3_drd_init() which is problematic in a few ways. -First, the initial state must be determined, then dwc3_set_mode() -will have to schedule drd_work and by then dwc3_debugfs_init() -could have already been invoked. Even if the initial mode is -peripheral, dwc3_gadget_init() happens after the DebugFS files -are created, and worse so if the initial state is host and the -controller switches to peripheral much later. And secondly, -even if the gadget endpoints' debug entries were successfully -created, if the controller exits peripheral mode, its dwc3_eps -are freed so the debug files would now hold stale references. - -So it is best if the DebugFS endpoint entries are created and -removed dynamically at the same time the underlying dwc3_eps are. -Do this by calling dwc3_debugfs_create_endpoint_dir() as each -endpoint is created, and conversely remove the DebugFS entry when -the endpoint is freed. - -Fixes: 41ce1456e1db ("usb: dwc3: core: make dwc3_set_mode() work properly") -Cc: stable -Reviewed-by: Peter Chen -Signed-off-by: Jack Pham -Link: https://lore.kernel.org/r/20210529192932.22912-1-jackp@codeaurora.org -Signed-off-by: Greg Kroah-Hartman ---- - drivers/usb/dwc3/debug.h | 3 +++ - drivers/usb/dwc3/debugfs.c | 21 ++------------------- - drivers/usb/dwc3/gadget.c | 3 +++ - 3 files changed, 8 insertions(+), 19 deletions(-) - ---- a/drivers/usb/dwc3/debug.h -+++ b/drivers/usb/dwc3/debug.h -@@ -413,9 +413,12 @@ static inline const char *dwc3_gadget_ge - - - #ifdef CONFIG_DEBUG_FS -+extern void dwc3_debugfs_create_endpoint_dir(struct dwc3_ep *dep); - extern void dwc3_debugfs_init(struct dwc3 *d); - extern void dwc3_debugfs_exit(struct dwc3 *d); - #else -+static inline void dwc3_debugfs_create_endpoint_dir(struct dwc3_ep *dep) -+{ } - static inline void dwc3_debugfs_init(struct dwc3 *d) - { } - static inline void dwc3_debugfs_exit(struct dwc3 *d) ---- a/drivers/usb/dwc3/debugfs.c -+++ b/drivers/usb/dwc3/debugfs.c -@@ -890,30 +890,14 @@ static void dwc3_debugfs_create_endpoint - } - } - --static void dwc3_debugfs_create_endpoint_dir(struct dwc3_ep *dep, -- struct dentry *parent) -+void dwc3_debugfs_create_endpoint_dir(struct dwc3_ep *dep) - { - struct dentry *dir; - -- dir = debugfs_create_dir(dep->name, parent); -+ dir = debugfs_create_dir(dep->name, dep->dwc->root); - dwc3_debugfs_create_endpoint_files(dep, dir); - } - --static void dwc3_debugfs_create_endpoint_dirs(struct dwc3 *dwc, -- struct dentry *parent) --{ -- int i; -- -- for (i = 0; i < dwc->num_eps; i++) { -- struct dwc3_ep *dep = dwc->eps[i]; -- -- if (!dep) -- continue; -- -- dwc3_debugfs_create_endpoint_dir(dep, parent); -- } --} -- - void dwc3_debugfs_init(struct dwc3 *dwc) - { - struct dentry *root; -@@ -944,7 +928,6 @@ void dwc3_debugfs_init(struct dwc3 *dwc) - &dwc3_testmode_fops); - debugfs_create_file("link_state", 0644, root, dwc, - &dwc3_link_state_fops); -- dwc3_debugfs_create_endpoint_dirs(dwc, root); - } - } - ---- a/drivers/usb/dwc3/gadget.c -+++ b/drivers/usb/dwc3/gadget.c -@@ -2665,6 +2665,8 @@ static int dwc3_gadget_init_endpoint(str - INIT_LIST_HEAD(&dep->started_list); - INIT_LIST_HEAD(&dep->cancelled_list); - -+ dwc3_debugfs_create_endpoint_dir(dep); -+ - return 0; - } - -@@ -2708,6 +2710,7 @@ static void dwc3_gadget_free_endpoints(s - list_del(&dep->endpoint.ep_list); - } - -+ debugfs_remove_recursive(debugfs_lookup(dep->name, dwc->root)); - kfree(dep); - } - } diff --git a/queue-5.12/series b/queue-5.12/series index 66464e70d55..6358ba3ec5f 100644 --- a/queue-5.12/series +++ b/queue-5.12/series @@ -88,7 +88,6 @@ usb-pd-set-pd_t_sink_wait_cap-to-310ms.patch usb-dwc3-meson-g12a-fix-usb2-phy-glue-init-when-phy0-is-disabled.patch usb-dwc3-meson-g12a-disable-the-regulator-in-the-error-handling-path-of-the-probe.patch usb-dwc3-gadget-bail-from-dwc3_gadget_exit-if-dwc-gadget-is-null.patch -usb-dwc3-debugfs-add-and-remove-endpoint-dirs-dynamically.patch usb-dwc3-ep0-fix-null-pointer-exception.patch usb-pci-quirks-disable-d3cold-on-xhci-suspend-for-s2idle-on-amd-renoir.patch usb-musb-fix-musb_quirk_b_disconnect_99-handling.patch diff --git a/queue-5.12/usb-dwc3-debugfs-add-and-remove-endpoint-dirs-dynamically.patch b/queue-5.12/usb-dwc3-debugfs-add-and-remove-endpoint-dirs-dynamically.patch deleted file mode 100644 index a1fa7ef7d8f..00000000000 --- a/queue-5.12/usb-dwc3-debugfs-add-and-remove-endpoint-dirs-dynamically.patch +++ /dev/null @@ -1,122 +0,0 @@ -From 8d396bb0a5b62b326f6be7594d8bd46b088296bd Mon Sep 17 00:00:00 2001 -From: Jack Pham -Date: Sat, 29 May 2021 12:29:32 -0700 -Subject: usb: dwc3: debugfs: Add and remove endpoint dirs dynamically - -From: Jack Pham - -commit 8d396bb0a5b62b326f6be7594d8bd46b088296bd upstream. - -The DWC3 DebugFS directory and files are currently created once -during probe. This includes creation of subdirectories for each -of the gadget's endpoints. This works fine for peripheral-only -controllers, as dwc3_core_init_mode() calls dwc3_gadget_init() -just prior to calling dwc3_debugfs_init(). - -However, for dual-role controllers, dwc3_core_init_mode() will -instead call dwc3_drd_init() which is problematic in a few ways. -First, the initial state must be determined, then dwc3_set_mode() -will have to schedule drd_work and by then dwc3_debugfs_init() -could have already been invoked. Even if the initial mode is -peripheral, dwc3_gadget_init() happens after the DebugFS files -are created, and worse so if the initial state is host and the -controller switches to peripheral much later. And secondly, -even if the gadget endpoints' debug entries were successfully -created, if the controller exits peripheral mode, its dwc3_eps -are freed so the debug files would now hold stale references. - -So it is best if the DebugFS endpoint entries are created and -removed dynamically at the same time the underlying dwc3_eps are. -Do this by calling dwc3_debugfs_create_endpoint_dir() as each -endpoint is created, and conversely remove the DebugFS entry when -the endpoint is freed. - -Fixes: 41ce1456e1db ("usb: dwc3: core: make dwc3_set_mode() work properly") -Cc: stable -Reviewed-by: Peter Chen -Signed-off-by: Jack Pham -Link: https://lore.kernel.org/r/20210529192932.22912-1-jackp@codeaurora.org -Signed-off-by: Greg Kroah-Hartman ---- - drivers/usb/dwc3/debug.h | 3 +++ - drivers/usb/dwc3/debugfs.c | 21 ++------------------- - drivers/usb/dwc3/gadget.c | 3 +++ - 3 files changed, 8 insertions(+), 19 deletions(-) - ---- a/drivers/usb/dwc3/debug.h -+++ b/drivers/usb/dwc3/debug.h -@@ -413,9 +413,12 @@ static inline const char *dwc3_gadget_ge - - - #ifdef CONFIG_DEBUG_FS -+extern void dwc3_debugfs_create_endpoint_dir(struct dwc3_ep *dep); - extern void dwc3_debugfs_init(struct dwc3 *d); - extern void dwc3_debugfs_exit(struct dwc3 *d); - #else -+static inline void dwc3_debugfs_create_endpoint_dir(struct dwc3_ep *dep) -+{ } - static inline void dwc3_debugfs_init(struct dwc3 *d) - { } - static inline void dwc3_debugfs_exit(struct dwc3 *d) ---- a/drivers/usb/dwc3/debugfs.c -+++ b/drivers/usb/dwc3/debugfs.c -@@ -890,30 +890,14 @@ static void dwc3_debugfs_create_endpoint - } - } - --static void dwc3_debugfs_create_endpoint_dir(struct dwc3_ep *dep, -- struct dentry *parent) -+void dwc3_debugfs_create_endpoint_dir(struct dwc3_ep *dep) - { - struct dentry *dir; - -- dir = debugfs_create_dir(dep->name, parent); -+ dir = debugfs_create_dir(dep->name, dep->dwc->root); - dwc3_debugfs_create_endpoint_files(dep, dir); - } - --static void dwc3_debugfs_create_endpoint_dirs(struct dwc3 *dwc, -- struct dentry *parent) --{ -- int i; -- -- for (i = 0; i < dwc->num_eps; i++) { -- struct dwc3_ep *dep = dwc->eps[i]; -- -- if (!dep) -- continue; -- -- dwc3_debugfs_create_endpoint_dir(dep, parent); -- } --} -- - void dwc3_debugfs_init(struct dwc3 *dwc) - { - struct dentry *root; -@@ -944,7 +928,6 @@ void dwc3_debugfs_init(struct dwc3 *dwc) - &dwc3_testmode_fops); - debugfs_create_file("link_state", 0644, root, dwc, - &dwc3_link_state_fops); -- dwc3_debugfs_create_endpoint_dirs(dwc, root); - } - } - ---- a/drivers/usb/dwc3/gadget.c -+++ b/drivers/usb/dwc3/gadget.c -@@ -2720,6 +2720,8 @@ static int dwc3_gadget_init_endpoint(str - INIT_LIST_HEAD(&dep->started_list); - INIT_LIST_HEAD(&dep->cancelled_list); - -+ dwc3_debugfs_create_endpoint_dir(dep); -+ - return 0; - } - -@@ -2763,6 +2765,7 @@ static void dwc3_gadget_free_endpoints(s - list_del(&dep->endpoint.ep_list); - } - -+ debugfs_remove_recursive(debugfs_lookup(dep->name, dwc->root)); - kfree(dep); - } - } diff --git a/queue-5.4/series b/queue-5.4/series index dd3a9bf76dc..b6f50715704 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -46,7 +46,6 @@ cgroup1-don-t-allow-n-in-renaming.patch usb-f_ncm-ncm_bitrate-speed-is-unsigned.patch usb-f_ncm-only-first-packet-of-aggregate-needs-to-start-timer.patch usb-pd-set-pd_t_sink_wait_cap-to-310ms.patch -usb-dwc3-debugfs-add-and-remove-endpoint-dirs-dynamically.patch usb-dwc3-ep0-fix-null-pointer-exception.patch usb-musb-fix-musb_quirk_b_disconnect_99-handling.patch usb-typec-wcove-use-le-to-cpu-conversion-when-accessing-msg-header.patch diff --git a/queue-5.4/usb-dwc3-debugfs-add-and-remove-endpoint-dirs-dynamically.patch b/queue-5.4/usb-dwc3-debugfs-add-and-remove-endpoint-dirs-dynamically.patch deleted file mode 100644 index 3a5a191c0c6..00000000000 --- a/queue-5.4/usb-dwc3-debugfs-add-and-remove-endpoint-dirs-dynamically.patch +++ /dev/null @@ -1,122 +0,0 @@ -From 8d396bb0a5b62b326f6be7594d8bd46b088296bd Mon Sep 17 00:00:00 2001 -From: Jack Pham -Date: Sat, 29 May 2021 12:29:32 -0700 -Subject: usb: dwc3: debugfs: Add and remove endpoint dirs dynamically - -From: Jack Pham - -commit 8d396bb0a5b62b326f6be7594d8bd46b088296bd upstream. - -The DWC3 DebugFS directory and files are currently created once -during probe. This includes creation of subdirectories for each -of the gadget's endpoints. This works fine for peripheral-only -controllers, as dwc3_core_init_mode() calls dwc3_gadget_init() -just prior to calling dwc3_debugfs_init(). - -However, for dual-role controllers, dwc3_core_init_mode() will -instead call dwc3_drd_init() which is problematic in a few ways. -First, the initial state must be determined, then dwc3_set_mode() -will have to schedule drd_work and by then dwc3_debugfs_init() -could have already been invoked. Even if the initial mode is -peripheral, dwc3_gadget_init() happens after the DebugFS files -are created, and worse so if the initial state is host and the -controller switches to peripheral much later. And secondly, -even if the gadget endpoints' debug entries were successfully -created, if the controller exits peripheral mode, its dwc3_eps -are freed so the debug files would now hold stale references. - -So it is best if the DebugFS endpoint entries are created and -removed dynamically at the same time the underlying dwc3_eps are. -Do this by calling dwc3_debugfs_create_endpoint_dir() as each -endpoint is created, and conversely remove the DebugFS entry when -the endpoint is freed. - -Fixes: 41ce1456e1db ("usb: dwc3: core: make dwc3_set_mode() work properly") -Cc: stable -Reviewed-by: Peter Chen -Signed-off-by: Jack Pham -Link: https://lore.kernel.org/r/20210529192932.22912-1-jackp@codeaurora.org -Signed-off-by: Greg Kroah-Hartman ---- - drivers/usb/dwc3/debug.h | 3 +++ - drivers/usb/dwc3/debugfs.c | 21 ++------------------- - drivers/usb/dwc3/gadget.c | 3 +++ - 3 files changed, 8 insertions(+), 19 deletions(-) - ---- a/drivers/usb/dwc3/debug.h -+++ b/drivers/usb/dwc3/debug.h -@@ -409,9 +409,12 @@ static inline const char *dwc3_gadget_ge - - - #ifdef CONFIG_DEBUG_FS -+extern void dwc3_debugfs_create_endpoint_dir(struct dwc3_ep *dep); - extern void dwc3_debugfs_init(struct dwc3 *); - extern void dwc3_debugfs_exit(struct dwc3 *); - #else -+static inline void dwc3_debugfs_create_endpoint_dir(struct dwc3_ep *dep) -+{ } - static inline void dwc3_debugfs_init(struct dwc3 *d) - { } - static inline void dwc3_debugfs_exit(struct dwc3 *d) ---- a/drivers/usb/dwc3/debugfs.c -+++ b/drivers/usb/dwc3/debugfs.c -@@ -878,30 +878,14 @@ static void dwc3_debugfs_create_endpoint - } - } - --static void dwc3_debugfs_create_endpoint_dir(struct dwc3_ep *dep, -- struct dentry *parent) -+void dwc3_debugfs_create_endpoint_dir(struct dwc3_ep *dep) - { - struct dentry *dir; - -- dir = debugfs_create_dir(dep->name, parent); -+ dir = debugfs_create_dir(dep->name, dep->dwc->root); - dwc3_debugfs_create_endpoint_files(dep, dir); - } - --static void dwc3_debugfs_create_endpoint_dirs(struct dwc3 *dwc, -- struct dentry *parent) --{ -- int i; -- -- for (i = 0; i < dwc->num_eps; i++) { -- struct dwc3_ep *dep = dwc->eps[i]; -- -- if (!dep) -- continue; -- -- dwc3_debugfs_create_endpoint_dir(dep, parent); -- } --} -- - void dwc3_debugfs_init(struct dwc3 *dwc) - { - struct dentry *root; -@@ -935,7 +919,6 @@ void dwc3_debugfs_init(struct dwc3 *dwc) - &dwc3_testmode_fops); - debugfs_create_file("link_state", S_IRUGO | S_IWUSR, root, dwc, - &dwc3_link_state_fops); -- dwc3_debugfs_create_endpoint_dirs(dwc, root); - } - } - ---- a/drivers/usb/dwc3/gadget.c -+++ b/drivers/usb/dwc3/gadget.c -@@ -2483,6 +2483,8 @@ static int dwc3_gadget_init_endpoint(str - INIT_LIST_HEAD(&dep->started_list); - INIT_LIST_HEAD(&dep->cancelled_list); - -+ dwc3_debugfs_create_endpoint_dir(dep); -+ - return 0; - } - -@@ -2526,6 +2528,7 @@ static void dwc3_gadget_free_endpoints(s - list_del(&dep->endpoint.ep_list); - } - -+ debugfs_remove_recursive(debugfs_lookup(dep->name, dwc->root)); - kfree(dep); - } - }