From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 80D75740041 for ; Thu, 22 Feb 2024 16:33:32 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=mjKwNo9gyAufjTIwqkKuvaTIJ9Uj/+7THTkP17d1L/M=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:msip_labels:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type; s=20140610; t=1708619611; v=1; b=EXbJnzV1jkb5gPlIemq8Y6CDYM/I5Y0CFd6f62u6HCsDASbc4DmWZQASBTxK91kElS99XpUT EovyH0orsB9B3sa8657b4LSiUFgJZt9hkmuiAHOJDiPQXtmXZNm88cFGG/xK+f5cpJFTnCYbz0E fP+D2SY1wlr+QrzgrKdhSThI= X-Received: by 127.0.0.2 with SMTP id 6SvWYY7687511xpFP6DoiLIZ; Thu, 22 Feb 2024 08:33:31 -0800 X-Received: from NAM10-DM6-obe.outbound.protection.outlook.com (NAM10-DM6-obe.outbound.protection.outlook.com [40.107.93.77]) by mx.groups.io with SMTP id smtpd.web11.17254.1708619610602181531 for ; Thu, 22 Feb 2024 08:33:30 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gYjtx7jjnNsXg3cUgDpD3Nj0nvBrU9cojTNtXbqL8TdrHCRxqE/OBE4POAJ2MF7qxTTb5JapiVjxxUXLhzMlL03Mr3eV/Js72AVapRHB9sD7TLMW9n29wVHetvZt/VSTGnIOazgIig5lV6vEU1+ElzIJCZDGJsHwaGdUggrT9yNNXKr1A4svgSNYdZLja4bcjZAj2bCwtfej3rXlHda40Un+0XwvdmqKghSk6XxkLcx7V1ulUFq9CY1jHK9FHpy8j6BRxfwZdpEmMz4R7eMhAFLIAjDvMsZPOgj1ZaPZSpol0GbgdEdFuVfarz8LVrVk0BQcFwiO5jSByj0YI57ClA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=fKjTT6wWvK4Vm/Dlxp7yHCT1/+q0ARk43CkgSW9CfU0=; b=Cba3FQb35bsRlNP84Wzr8lf0TGsg8854IlDrEeGUgQytp6mNtwgb1P56vio9PSmjjqrLYdSd07Hv8e8uM66YEYGcJFBoPqsYTNiVRAc+2tiVn9W97MEBzileyCEaVLoz3r3KskbUwKaJbHj/EOHwNCydTntWTycp6VaAw3p9fGiNR/XwZz3SdNG7Of4/oXbE9cDqwyTbgYUHtu+g3R8D+FmGLTZh7ERLLJqE7Zs8czPy0qZIsNtJ6IRLc5RL4lum6dl+Gmw0H3vp/J4SepbaDd3Xmf61zbRMV/TS+b64j/XQB6VNc+2HUwlEslOf9k9Uc7kkUsXhaNWhWGHQPJgmiQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none X-Received: from BL1PR12MB5288.namprd12.prod.outlook.com (2603:10b6:208:314::23) by CH3PR12MB9123.namprd12.prod.outlook.com (2603:10b6:610:1a4::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.24; Thu, 22 Feb 2024 16:33:27 +0000 X-Received: from BL1PR12MB5288.namprd12.prod.outlook.com ([fe80::810:bc27:5e3d:c1a4]) by BL1PR12MB5288.namprd12.prod.outlook.com ([fe80::810:bc27:5e3d:c1a4%4]) with mapi id 15.20.7316.018; Thu, 22 Feb 2024 16:33:27 +0000 From: "Hsueh, Hong-Chih (Neo) via groups.io" To: "Ding, Feng (Sunnyvale)" , Laszlo Ersek , "devel@edk2.groups.io" CC: "He, Jiangang" , "Chang, Abner" , "ray.ni@intel.com" , "gaoliming@byosoft.com.cn" , "Gopal, Pradeep" Subject: Re: [edk2-devel] [PATCH] MdeModulePkg/PciBusDxe: plug device hierarchy leak upon bridge hot-unplug Thread-Topic: [edk2-devel] [PATCH] MdeModulePkg/PciBusDxe: plug device hierarchy leak upon bridge hot-unplug Thread-Index: AQHaZDXNnqh9gmFfP0OYQW6xhIqVmrEWkM/4 Date: Thu, 22 Feb 2024 16:33:27 +0000 Message-ID: References: <76e2a0274cd2620ee43a5942c307d63c6c095d3b.1707258489.git.Hong-Chih.Hsueh@amd.com> <200b9430-0263-e76e-afca-d4ea14f23612@redhat.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Enabled=True;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SetDate=2024-02-22T16:33:28.576Z;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Name=General;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ContentBits=0;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Method=Standard; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BL1PR12MB5288:EE_|CH3PR12MB9123:EE_ x-ms-office365-filtering-correlation-id: de84dc4c-121c-4804-4328-08dc33c3ff40 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: QeDicjj/p8zE0Zj8BPhvz4DvDT6SrB0Tj9W0ZBV29WtkIcbJ1yxilLxP4m/i4vKQFseCCn5LK3s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KbkL?= =?us-ascii?Q?PBelbAyCH8dip6ILF1QMwJsFNSCGRnUD59tQBNcYvpBqE6hRBCvEKPXUHnw4?= =?us-ascii?Q?woK0BktSdA0uD9Zznfz1Q9SGOZiU1/AfHZ4ja7X+iOaXVf69yxGGLZIxpRIl?= =?us-ascii?Q?lYAPXWM0MEjYxgGKrUOcYbEPQO1I1p4bVG8cSaU354wa8HYhS7pdpd7lUgsH?= =?us-ascii?Q?CX9rMpBnBQlkakOKnxJBmf2lLY6eAIaYKlnqNKzQ9Tys15H/Wtu/I3pI69LZ?= =?us-ascii?Q?VKXaZ7h0+s8T/WK2Xb6Iqw3U0eTU//p4YFHzS6aEWQshhawSKo7PhTRC8u75?= =?us-ascii?Q?tpGqXasDaEpNCT4UnzU=3D?= MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BL1PR12MB5288.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: de84dc4c-121c-4804-4328-08dc33c3ff40 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Feb 2024 16:33:27.3344 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: iNsPftHDxGSQO07PeAJ31sgRqAGe+VKpKIDBiHriQiwwOjzl7fE2PB6M1WnAUc6uc3Y4l4fmXs/OxN8fR/3wSw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB9123 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,hong-chih.hsueh@amd.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: TUXSLouUq4BbUIwoHse5SQJxx7686176AA= Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_BL1PR12MB5288DB9893189E893CB2715BB9562BL1PR12MB5288namp_" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=EXbJnzV1; dmarc=pass (policy=none) header.from=groups.io; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}") --_000_BL1PR12MB5288DB9893189E893CB2715BB9562BL1PR12MB5288namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable [AMD Official Use Only - General] Please kindly ignore this mail thread as I have created and sent out [PATCH= V2] with correct title in another mail thread for review. Thank you. Regards, Neo ________________________________ From: Hsueh, Hong-Chih (Neo) Sent: Tuesday, February 20, 2024 1:48 PM To: Ding, Feng (Sunnyvale) ; Laszlo Ersek ; devel@edk2.groups.io Cc: He, Jiangang ; Chang, Abner ;= ray.ni@intel.com ; gaoliming@byosoft.com.cn ; Gopal, Pradeep Subject: Re: [edk2-devel] [PATCH] MdeModulePkg/PciBusDxe: plug device hiera= rchy leak upon bridge hot-unplug Hi Feng & Laszlo, Thank you for the feedback, I have changed the title of this email and the = title of the commit message of this patch. The new patch as attached. If this patch looks good to you, could you pleas= e help to add reviewed-by? Thanks! Regards, Neo ________________________________ From: Ding, Feng (Sunnyvale) Sent: Thursday, February 8, 2024 5:09 PM To: Laszlo Ersek ; devel@edk2.groups.io ; Hsueh, Hong-Chih (Neo) Cc: He, Jiangang ; Chang, Abner ;= ray.ni@intel.com ; gaoliming@byosoft.com.cn ; Gopal, Pradeep Subject: RE: [edk2-devel] [PATCH] MdeModulePkg/PciBusDxe: Fix hotplug funct= ionality for USB4 bridge [AMD Official Use Only - General] Hi Laszlo, " MdeModulePkg/PciBusDxe: plug device hierarchy leak upon bridge hot-unplug= " is perfect description for the issue. "a root bridge" is "a (PCIe Hotplug) bridge", locating anywhere. Thanks feng -----Original Message----- From: Laszlo Ersek Sent: Wednesday, February 7, 2024 12:51 PM To: devel@edk2.groups.io; Hsueh, Hong-Chih (Neo) Cc: Ding, Feng (Sunnyvale) ; He, Jiangang ; Chang, Abner ; ray.ni@intel.com; gaoliming@b= yosoft.com.cn Subject: Re: [edk2-devel] [PATCH] MdeModulePkg/PciBusDxe: Fix hotplug funct= ionality for USB4 bridge Caution: This message originated from an External Source. Use proper cautio= n when opening attachments, clicking links, or responding. On 2/6/24 23:34, Hsueh, Hong-Chih (Neo) via groups.io wrote: > A USB4 or TBT bridge can be plugged or unplugged on USB4 port. The action= s require PciHotPlugRequestNotify to add a root bridge or remove a root bri= dge completely. > In the plug-unplug-plug scenerio, PciHotPlugRequestNotify will return wit= h no-action on second plug because bridge tree shows configured. > Destroy Pci Device Tree in function PciHotPlugRequestNotify for unplug ev= ent to fix this issue. > > Cc: Feng Ding > Cc: Jiangang He > Signed-off-by: Neo Hsueh > --- > MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c b/MdeModulePk= g/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 > // I think the subject line is too specific. This patch appears to fix a gener= al resource leak in the PCI hot-unplug functionality. Writing up the USB4 a= ngle in the commit message is welcome in my opinion, but the subject should= state something like: MdeModulePkg/PciBusDxe: plug device hierarchy leak upon bridge hot-unplug (And I think the bridge doesn't even have to be a *root* bridge for the lea= k to occur; is that right?) Laszlo -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115834): https://edk2.groups.io/g/devel/message/115834 Mute This Topic: https://groups.io/mt/104474693/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- --_000_BL1PR12MB5288DB9893189E893CB2715BB9562BL1PR12MB5288namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

[AMD Official Use Only - General]


Please kindly ignore this mail thread as I have created and sent out [PATCH= V2] with correct title in another mail thread for review.

Thank you.

Regards,
Neo

From: Hsueh, Hong-Chih (Neo= ) <Hong-Chih.Hsueh@amd.com>
Sent: Tuesday, February 20, 2024 1:48 PM
To: Ding, Feng (Sunnyvale) <feng1.ding@amd.com>; Laszlo Ersek = <lersek@redhat.com>; devel@edk2.groups.io <devel@edk2.groups.io>= ;
Cc: He, Jiangang <Jiangang.He@amd.com>; Chang, Abner <Abner= .Chang@amd.com>; ray.ni@intel.com <ray.ni@intel.com>; gaoliming@by= osoft.com.cn <gaoliming@byosoft.com.cn>; Gopal, Pradeep <Pradeep.G= opal@amd.com>
Subject: Re: [edk2-devel] [PATCH] MdeModulePkg/PciBusDxe: plug devic= e hierarchy leak upon bridge hot-unplug
 
Hi Feng & Laszlo,

Thank you for the feedback, I have changed the title of this email and the = title of the commit message of this patch.
The new patch as attached. If this patch looks good to you, could you pleas= e help to add reviewed-by?

Thanks!

Regards,
Neo


From: Ding, Feng = (Sunnyvale) <feng1.ding@amd.com>
Sent: Thursday, February 8, 2024 5:09 PM
To: Laszlo Ersek <lersek@redhat.com>; devel@edk2.groups.i= o <devel@edk2.groups.io>; Hsueh, Hong-Chih (Neo) <Hong-Chih.Hsueh@= amd.com>
Cc: He, Jiangang <Jiangang.He@amd.com>; Chang, Abner <= Abner.Chang@amd.com>; ray.ni@intel.com <ray.ni@intel.com>; gaolimi= ng@byosoft.com.cn <gaoliming@byosoft.com.cn>; Gopal, Pradeep <Prad= eep.Gopal@amd.com>
Subject: RE: [edk2-devel] [PATCH] MdeModulePkg/PciBusDxe: Fix h= otplug functionality for USB4 bridge
 
_._,_._,_

Groups.io Links:

=20 You receive all messages sent to this group. =20 =20

View/Reply Online (#115834) | =20 | Mute= This Topic | New Topic
Your Subscriptio= n | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
--_000_BL1PR12MB5288DB9893189E893CB2715BB9562BL1PR12MB5288namp_--