public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel] [PATCH] MdeModulePkg/PciBusDxe: Fix hotplug functionality for USB4 bridge
@ 2024-02-06 22:34 Hsueh, Hong-Chih (Neo) via groups.io
  2024-02-07 20:51 ` Laszlo Ersek
  0 siblings, 1 reply; 8+ messages in thread
From: Hsueh, Hong-Chih (Neo) via groups.io @ 2024-02-06 22:34 UTC (permalink / raw)
  To: devel; +Cc: feng1.ding, jiangang.he, abner.chang, ray.ni, gaoliming,
	Neo Hsueh

A USB4 or TBT bridge can be plugged or unplugged on USB4 port. The actions require PciHotPlugRequestNotify to add a root bridge or remove a root bridge completely.
In the plug-unplug-plug scenerio, PciHotPlugRequestNotify will return with no-action on second plug because bridge tree shows configured.
Destroy Pci Device Tree in function PciHotPlugRequestNotify for unplug event to fix this issue.

Cc: Feng Ding <feng1.ding@amd.com>
Cc: Jiangang He <jiangang.he@amd.com>
Signed-off-by: Neo Hsueh <Hong-Chih.Hsueh@amd.com>
---
 MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c
index 3f8c6e6da7..2b7af60e0a 100644
--- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c
+++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c
@@ -2103,6 +2103,8 @@ PciHotPlugRequestNotify (
       }
     }
 
+    DestroyPciDeviceTree (Bridge);
+
     //
     // End for
     //
-- 
2.40.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#115190): https://edk2.groups.io/g/devel/message/115190
Mute This Topic: https://groups.io/mt/104208348/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



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

end of thread, other threads:[~2024-08-16  6:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-06 22:34 [edk2-devel] [PATCH] MdeModulePkg/PciBusDxe: Fix hotplug functionality for USB4 bridge Hsueh, Hong-Chih (Neo) via groups.io
2024-02-07 20:51 ` Laszlo Ersek
2024-02-08 23:09   ` Ding, Feng (Sunnyvale) via groups.io
2024-02-20 19:48     ` [edk2-devel] [PATCH] MdeModulePkg/PciBusDxe: plug device hierarchy leak upon bridge hot-unplug Hsueh, Hong-Chih (Neo) via groups.io
2024-02-21 20:05       ` Laszlo Ersek
2024-02-22 16:33       ` Hsueh, Hong-Chih (Neo) via groups.io
2024-08-16  2:33     ` [edk2-devel] [PATCH] MdeModulePkg/PciBusDxe: Fix hotplug functionality for USB4 bridge Yoshinoya
2024-08-16  6:55       ` Ni, Ray

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox