From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mx.groups.io with SMTP id smtpd.web12.1019.1576546684264795741 for ; Mon, 16 Dec 2019 17:38:04 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.20, mailfrom: ray.ni@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Dec 2019 17:38:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,323,1571727600"; d="scan'208";a="217356791" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga006.jf.intel.com with ESMTP; 16 Dec 2019 17:38:03 -0800 Received: from fmsmsx115.amr.corp.intel.com (10.18.116.19) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 16 Dec 2019 17:38:03 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx115.amr.corp.intel.com (10.18.116.19) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 16 Dec 2019 17:38:03 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.90]) by shsmsx102.ccr.corp.intel.com ([169.254.2.109]) with mapi id 14.03.0439.000; Tue, 17 Dec 2019 09:38:01 +0800 From: "Ni, Ray" To: "Javeed, Ashraf" , "devel@edk2.groups.io" CC: "Wang, Jian J" , "Wu, Hao A" Subject: Re: [edk2-devel] [edk2-staging/UEFI_PCI_ENHANCE-2 PATCH 03/12] PciBusDxe: Separation of the PCI device registration and start Thread-Topic: [edk2-devel] [edk2-staging/UEFI_PCI_ENHANCE-2 PATCH 03/12] PciBusDxe: Separation of the PCI device registration and start Thread-Index: AQHVmdHzr5znFu2yV0yGSxmjusHFM6e863UQ Date: Tue, 17 Dec 2019 01:38:00 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D5C39FE01@SHSMSX104.ccr.corp.intel.com> References: <20191101150952.3340-1-ashraf.javeed@intel.com> <15D3127A98E21087.7420@groups.io> <95C5C2B113DE604FB208120C742E982457917197@BGSMSX101.gar.corp.intel.com> In-Reply-To: <95C5C2B113DE604FB208120C742E982457917197@BGSMSX101.gar.corp.intel.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOTk1MmIwNGEtYzQ4YS00MGJkLWE0ZDgtZWI5NmQwZjMxNzdjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiclF3VHNxTkhmT1R6OGE1TVlVNk4xOHVNYnkwNUNQcXIrd3g3Uktvb0FsNWE1UUdnZWE0U2VlN1ZBYUw2RVlFeCJ9 x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: ray.ni@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Ashraf, The change looks good. 2 minor comments: 1. StartPciRootPortsOnBridge() Can it be renamed to EnablePciDevicesOnBridge()? Because it basically calls PciIo.Attribute() to enable the devices. A= nd I am not sure the enable only applies to PCI root ports. There could be = PCI devices behind P2P bridge. 2. + if (EFI_ERROR (Status) =3D=3D EFI_NOT_FOUND) { Should be "if (EFI_ERROR (Status)) {" > > EFI_STATUS > > -StartPciDevicesOnBridge ( > > +StartPciRootPortsOnBridge ( > > + IN EFI_HANDLE Controller, > > + IN PCI_IO_DEVICE *RootBridge > > + ) > + if (EFI_ERROR (Status) =3D=3D EFI_NOT_FOUND) { > > + return Status; > > + } else { > > + // > > + // finally start those PCI bridge port devices only > > + // > > + return StartPciRootPortsOnBridge ( > > + Controller, > > + RootBridge > > + ); > > + } > > +} > > + > > /** > > Start to manage all the PCI devices it found previously under > > the entire host bridge. > > -- > > 2.21.0.windows.1 > > > > > >=20