Centos-kernel-stream-9/drivers/usb/dwc3
Desnes Nunes da3027723d usb: dwc3: imx8mp: fix software node kernel dump
JIRA: https://issues.redhat.com/browse/RHEL-78828

commit a4faee01179a4d9cbad9ba6be2da8637c68c1438
Author: Xu Yang <xu.yang_2@nxp.com>
Date: Tue, 26 Nov 2024 11:28:41 +0800

  When unbind and bind the device again, kernel will dump below warning:

  [  173.972130] sysfs: cannot create duplicate filename '/devices/platform/soc/4c010010.usb/software_node'
  [  173.981564] CPU: 2 UID: 0 PID: 536 Comm: sh Not tainted 6.12.0-rc6-06344-g2aed7c4a5c56 #144
  [  173.989923] Hardware name: NXP i.MX95 15X15 board (DT)
  [  173.995062] Call trace:
  [  173.997509]  dump_backtrace+0x90/0xe8
  [  174.001196]  show_stack+0x18/0x24
  [  174.004524]  dump_stack_lvl+0x74/0x8c
  [  174.008198]  dump_stack+0x18/0x24
  [  174.011526]  sysfs_warn_dup+0x64/0x80
  [  174.015201]  sysfs_do_create_link_sd+0xf0/0xf8
  [  174.019656]  sysfs_create_link+0x20/0x40
  [  174.023590]  software_node_notify+0x90/0x100
  [  174.027872]  device_create_managed_software_node+0xec/0x108
  ...

  The '4c010010.usb' device is a platform device created during the initcall
  and is never removed, which causes its associated software node to persist
  indefinitely.

  The existing device_create_managed_software_node() does not provide a
  corresponding removal function.

  Replace device_create_managed_software_node() with the
  device_add_software_node() and device_remove_software_node() pair to ensure
  proper addition and removal of software nodes, addressing this issue.

  Fixes: a9400f1979a0 ("usb: dwc3: imx8mp: add 2 software managed quirk properties for host mode")
  Cc: stable@vger.kernel.org
  Reviewed-by: Frank Li <Frank.Li@nxp.com>
  Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
  Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
  Link: https://lore.kernel.org/r/20241126032841.2458338-1-xu.yang_2@nxp.com
  Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Signed-off-by: Desnes Nunes <desnesn@redhat.com>
2025-03-19 21:24:06 -03:00
..
Kconfig usb: use "prompt" instead of "bool" for choice prompts 2025-03-19 21:23:46 -03:00
Makefile usb: dwc3: add Realtek DHC RTD SoC dwc3 glue layer driver 2024-04-25 00:11:54 -03:00
core.c usb: dwc3: core: Set force_gen1 bit for all applicable SuperSpeed ports 2025-03-19 21:23:49 -03:00
core.h usb: dwc3: core: Set force_gen1 bit for all applicable SuperSpeed ports 2025-03-19 21:23:49 -03:00
debug.h
debugfs.c
drd.c usb: dwc3: core: Refactor PHY logic to support Multiport Controller 2024-10-10 16:36:43 -03:00
dwc3-am62.c usb: dwc3: remove unnecessary platform_set_drvdata() 2024-03-18 15:42:30 -03:00
dwc3-exynos.c
dwc3-haps.c
dwc3-imx8mp.c usb: dwc3: imx8mp: fix software node kernel dump 2025-03-19 21:24:06 -03:00
dwc3-keystone.c usb: dwc3: remove unnecessary platform_set_drvdata() 2024-03-18 15:42:30 -03:00
dwc3-meson-g12a.c
dwc3-of-simple.c
dwc3-omap.c usb: Use (of|device)_property_present() for non-boolean properties 2025-03-19 21:23:46 -03:00
dwc3-pci.c usb: dwc3: pci: add support for the Intel Panther Lake 2024-10-10 16:36:47 -03:00
dwc3-qcom.c usb: Use (of|device)_property_present() for non-boolean properties 2025-03-19 21:23:46 -03:00
dwc3-rtk.c usb: dwc3: add missing of_node_put and platform_device_put 2024-04-25 00:12:01 -03:00
dwc3-st.c
dwc3-xilinx.c usb: dwc3: enable CCI support for AMD-xilinx DWC3 controller 2024-11-07 23:01:41 -03:00
ep0.c usb: dwc3: Correct some typos in comments 2025-03-19 16:21:50 -03:00
gadget.c usb: dwc3: gadget: Add missing check for single port RAM in TxFIFO resizing logic 2025-03-19 21:23:49 -03:00
gadget.h usb: dwc3: gadget: Rewrite endpoint allocation flow 2024-06-13 13:57:01 -03:00
host.c usb: dwc3: Correct some typos in comments 2025-03-19 16:21:50 -03:00
io.h
trace.c
trace.h
ulpi.c