From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web12.1096.1589352365594904392 for ; Tue, 12 May 2020 23:46:05 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: ray.ni@intel.com) IronPort-SDR: 543RrGKrmCDk1CPTllIbFOtDdZ1fqYnLz2N7GL5o5CAgLL6KwYOnNJFt4zmu6z74GKckdQ6kyB kG+Stfb4G0HA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2020 23:46:04 -0700 IronPort-SDR: 8o5ZW9nceXToG/AuWuF0tXP2IiVVBER/PJvmln9Ot49XYK/7g2VYsrXFXE9qaw8soDrsBoZkqg sdMbE/89aa0g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,386,1583222400"; d="scan'208";a="437387461" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga005.jf.intel.com with ESMTP; 12 May 2020 23:46:04 -0700 Received: from fmsmsx605.amr.corp.intel.com (10.18.126.85) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 12 May 2020 23:46:03 -0700 Received: from fmsmsx605.amr.corp.intel.com (10.18.126.85) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 12 May 2020 23:46:03 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Tue, 12 May 2020 23:46:03 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.210]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.26]) with mapi id 14.03.0439.000; Wed, 13 May 2020 14:46:00 +0800 From: "Ni, Ray" To: "Javeed, Ashraf" , "devel@edk2.groups.io" CC: "Wang, Jian J" , "Wu, Hao A" Subject: Re: [edk2-staging/UEFI_PCI_ENHANCE-2 PATCH 07/15] MdeModulePkg/PciBusDxe: Enable MaxPayloadSize feature Thread-Topic: [edk2-staging/UEFI_PCI_ENHANCE-2 PATCH 07/15] MdeModulePkg/PciBusDxe: Enable MaxPayloadSize feature Thread-Index: AQHWJuYUJe62JSGvi0ytnelqFKTApKig+CMAgASdH8A= Date: Wed, 13 May 2020 06:45:59 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D5C53ADFC@SHSMSX104.ccr.corp.intel.com> References: <20200510161412.13832-1-ashraf.javeed@intel.com> <20200510161412.13832-8-ashraf.javeed@intel.com> In-Reply-To: <20200510161412.13832-8-ashraf.javeed@intel.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action 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 > /** > @@ -220,6 +226,7 @@ PcieNotifyDeviceState ( >=20 > CopyMem (&PcieDeviceState, &PciIoDevice->DeviceState, sizeof (PciIoDev= ice->DeviceState)); >=20 > + PcieDeviceState.MaxPayloadSize =3D (UINT8)PciIoDevice->PciExpress= Capability.DeviceControl.Bits.MaxPayloadSize; My original idea is to directly use the PciIoDevice->DeviceState. Your patch is even better because if the policy value is AUTO, it's better = to report the actual value in HW to platform instead of AUTO. Can you remove the CopyMem() call? Thanks, Ray