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.2088.1576552751967773073 for ; Mon, 16 Dec 2019 19:19:12 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.20, mailfrom: ashraf.javeed@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Dec 2019 19:19:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,324,1571727600"; d="scan'208";a="217635858" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga003.jf.intel.com with ESMTP; 16 Dec 2019 19:19:11 -0800 Received: from fmsmsx158.amr.corp.intel.com (10.18.116.75) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 16 Dec 2019 19:19:10 -0800 Received: from bgsmsx152.gar.corp.intel.com (10.224.48.50) by fmsmsx158.amr.corp.intel.com (10.18.116.75) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 16 Dec 2019 19:19:10 -0800 Received: from bgsmsx101.gar.corp.intel.com ([169.254.1.143]) by BGSMSX152.gar.corp.intel.com ([169.254.6.141]) with mapi id 14.03.0439.000; Tue, 17 Dec 2019 08:49:07 +0530 From: "Javeed, Ashraf" To: "Ni, Ray" , "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: AQHVkMZ7F0DOg8c0FUGhxv9UALvPWqeIghqAgDT1YACAAHdL4A== Date: Tue, 17 Dec 2019 03:19:06 +0000 Message-ID: <95C5C2B113DE604FB208120C742E98245797B7EF@BGSMSX101.gar.corp.intel.com> References: <20191101150952.3340-1-ashraf.javeed@intel.com> <15D3127A98E21087.7420@groups.io> <95C5C2B113DE604FB208120C742E982457917197@BGSMSX101.gar.corp.intel.com> <734D49CCEBEEF84792F5B80ED585239D5C39FE01@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <734D49CCEBEEF84792F5B80ED585239D5C39FE01@SHSMSX104.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOTk1MmIwNGEtYzQ4YS00MGJkLWE0ZDgtZWI5NmQwZjMxNzdjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiclF3VHNxTkhmT1R6OGE1TVlVNk4xOHVNYnkwNUNQcXIrd3g3Uktvb0FsNWE1UUdnZWE0U2VlN1ZBYUw2RVlFeCJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.223.10.10] MIME-Version: 1.0 Return-Path: ashraf.javeed@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable My response in line. Thanks Ashraf > -----Original Message----- > From: Ni, Ray > Sent: Tuesday, December 17, 2019 7:08 AM > 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 >=20 > Ashraf, > The change looks good. >=20 > 2 minor comments: > 1. StartPciRootPortsOnBridge() > Can it be renamed to EnablePciDevicesOnBridge()? > Because it basically calls PciIo.Attribute() to enable the devices.= And I am not > sure the enable only applies to PCI root ports. There could be PCI devic= es behind > P2P bridge. It enables only Type 1 PCI devices (Root Port, PCIe-to-PCI Bridge, PCIe sw= itch upstream/downstream ports), and no endpoint (Type 0) devices. >=20 > 2. + if (EFI_ERROR (Status) =3D=3D EFI_NOT_FOUND) { > Should be "if (EFI_ERROR (Status)) {" Good catch! Will fix this. >=20 > > > 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