From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web09.1755.1648518447322574167 for ; Mon, 28 Mar 2022 18:47:28 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=hbRIzgdx; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: hao.a.wu@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1648518447; x=1680054447; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=BbdlDiMjmXED5dggyKGXO/+rviYNb13Y6XHZXw43c8I=; b=hbRIzgdxMxkdkWSFH49anmulIBoDD5gm+NZmZxV69kWrYTIXMolpoh1e EF6L1Bj87SP6k0Jlzc4h5h3waz6i6SzrIZ71HJJ6h0pzFfPcQlAewUNHq lDgTogQVYsdP//H/8ugKCTgt5M8QrQEJdWKGWoGSY+w7PqPkG1lsOcp+9 3n0KdDvLQvnGXbfNwRKymN4wTSDA2AaCsIXw1cApdCdEGmMsuV1K4g2jX GtESogITrcdCnI9IB6ArPj/EdGT0DbN/MI3MznFHWPBmTto0UciM0eHra ty4R0i54aGu1SvBE27kAKgCUG4BgCq+d1dUo0HnvwNUaF+z9xIbk/S/9R A==; X-IronPort-AV: E=McAfee;i="6200,9189,10300"; a="322325712" X-IronPort-AV: E=Sophos;i="5.90,219,1643702400"; d="scan'208";a="322325712" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Mar 2022 18:47:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,219,1643702400"; d="scan'208";a="617974384" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by fmsmga004.fm.intel.com with ESMTP; 28 Mar 2022 18:47:25 -0700 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Mon, 28 Mar 2022 18:47:25 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX607.amr.corp.intel.com (10.22.229.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Mon, 28 Mar 2022 18:47:24 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Mon, 28 Mar 2022 18:47:24 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.171) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.21; Mon, 28 Mar 2022 18:47:24 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d6tkGmjQpoEjY2TGxik5nza/m97Mj7IEwE3coRaEdX5oPQZAz90Fz9SPcKfXsGkCz4W+mcCSViOw7dsYWUIKchw8odDObmst7SVov0CoqiQGmC09hUDlSfUerYagxF8HLUqRumZccyUy4e3M1dAKbvlmxKR0wubAhI2R/ZXxjVRvrgy+hXdP+Bf61oIGqM/kInxhn5aWNrL3elqJIq25Bvub4QzA89xnK5ffcEGjR9uwYsJd5Gyz/rWRhYloGPBJAWlY7cx9ORdVbGEP7/1pKqW4lMv8YZHvmVugAitN+7JfuaT6g+4BDtxf1NcHF+zj7HcKrpeuKwtu/EJMfB3qdQ== 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=LFZ0FlNIEIp1s8C9RUYHqRJE+ePlf/d+8Eny/Jg3jHc=; b=XUjDy4jk7WlLt2eYms7mjzHRY/xn3J9TTbHQpRX1WZCIPBlBgKbjZYjaINmBsYhb43bNfJdtpNNiajbDHwgR5wJiGio7HZHR3/j50171Pb3UNVp/IFGCeJuY/TIewwUBsyhwAqlMmEfC4dN4LQqnOvGkUA8xLhCxImR4JrEYuJ9Ppsf1jnKbh3AVGVr4shz4veyjHCWJ1BeItH3Xa4YOeGeTVRk1tD7NfWbkYKFkEY7VLHU7aIj76x19Ub6fOsFYd87RuSHIfk0jQ22tkMfNrd8/JnGxa8gsfYfKXHD4m7BepayI3HQLRSu3CvLiLUbk1HfDuBKSfLpFMUQ2X4Z40g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from DM6PR11MB4025.namprd11.prod.outlook.com (2603:10b6:5:197::31) by BN8PR11MB3668.namprd11.prod.outlook.com (2603:10b6:408:81::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5102.19; Tue, 29 Mar 2022 01:47:21 +0000 Received: from DM6PR11MB4025.namprd11.prod.outlook.com ([fe80::7852:37e2:513c:470b]) by DM6PR11MB4025.namprd11.prod.outlook.com ([fe80::7852:37e2:513c:470b%7]) with mapi id 15.20.5102.022; Tue, 29 Mar 2022 01:47:21 +0000 From: "Wu, Hao A" To: "devel@edk2.groups.io" , "Wu, Hao A" , "Bandaru, Purna Chandra Rao" CC: "Albecki, Mateusz" , "Gao, Liming" , "Liu, Zhiguang" Subject: Re: [edk2-devel] [PATCH] bRefClkFreq UFS card attribute need to be programmed after fDeviceInit Thread-Topic: [edk2-devel] [PATCH] bRefClkFreq UFS card attribute need to be programmed after fDeviceInit Thread-Index: AQHYQEJs/zcrMO2BuESmhQ6jEdDf0azT9PAggAGoQtA= Date: Tue, 29 Mar 2022 01:47:21 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 816fc0db-ebcd-4ce0-93c9-08da112610ff x-ms-traffictypediagnostic: BN8PR11MB3668:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: wU8OT4kYpqzfhsx9Fmnu/uvOBrTUQEpxl6aVF/wYvqywyUMDNefEyBPRffBgrK5N0219xrdsZALTrgQDoZKUmOP8moYlseauV8TbMRQf8NibyDIcVp7C9MxiiY4ithkXCd9FnB/pyIpktJZL6na+73eng6UlRsO9N9OuGPmrWR+bE/AxNJx4thRvI33Gotm8JDUIKb54blwEqe4WODXwkgs5rH08CFiy1nl4MCUG//nWpAq9OIctWMYvM4Pvidet8tF+8cZHAHVxTJK2sLHOXIXwGUECBgIIzGIsx67/o6rLUQvFRis4htP3wi53mQ52+9cF26UwcK8hcP2Isk50QCHCtgx0pV6z4iE5/l0/d6g4CX4yuP0PXwS+1opolNYzd5/Opob5kuSnKxE1eo3e6VwRrTOipTAYA+n1gBl42zaHPOTOtG/Y/wpeG7ybBBj+sDAQ2i5XHsS+Xy/Tf8xW2a4yH0ki/5DCFju61U3jWBKJ6ZCUKE+d9fq0uQy7AR3DzHkh4Ojj8gUsfJqdpN4VJLTWOSy1msk9NYm0u6aZN29U34guY0ZLDShJsT1YDY8X0jTv5qJX600kP+GsHg4LoGC4/lvPnUymi4KxOuDTlMGZ3D2fpzYXwcT76JemnmZt3pXDbaXPg/Y8g2qsuuWJLrP1EDPfobQowLBHjDhwmZRKyhasUqnkFo/7jBz6zQiLm7fzcBGjxoNF/KuHU6P53BOFRTXAQwN1TbCnSnxZD0KKRQ3n/CPL3S05n1Ge6T7EFIRM34zkISi5RItY4V3HnVhlAe3UOWAXRilP7Cq+LdVLws2mzzAhOXa6Di81QcbK6uM/2lUY0m9hfEe1GyyL4gNxdOGqtTiPhZaeTucj4ew= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR11MB4025.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(38070700005)(966005)(64756008)(66556008)(9686003)(76116006)(5660300002)(66946007)(83380400001)(66446008)(66476007)(316002)(186003)(26005)(7696005)(2906002)(55016003)(53546011)(6506007)(82960400001)(33656002)(110136005)(54906003)(508600001)(38100700002)(107886003)(8936002)(4326008)(52536014)(86362001)(6636002)(8676002)(71200400001)(122000001)(145543001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?5WnweiZLlz4EcQVgxn6/zZtBj9UpjlGhEd6ASZTl0WEXRzBKv4dBk3DEUUtB?= =?us-ascii?Q?wHHsq1VMAQ+AjTrYvoZMmkJkHB8tto1euEGEYNfYnMtrSsnHUEvChmPztk2z?= =?us-ascii?Q?+zItvUKQC2vhMfj7tqzQ896qKw0qFjigI8/drdJqGq0i18fou2IUVUf6MVdr?= =?us-ascii?Q?ir7ZH84D8881kd+LOkDbaMLLSfR5xH2sWicVbtff88daT8VYatSjCEx2jcoE?= =?us-ascii?Q?b4Gr6dwNi1w+YHvUahUMIOtrb7w/39lcxJPCRSOoLHnOjd3lR8SuVjKZ3Ryv?= =?us-ascii?Q?iuh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B/fN?= =?us-ascii?Q?95aYn9ZnV8j80jOkRUi+ce1nL7ucMIsbfNHhYmKeSFu0MEw8KBeINNyNciL3?= =?us-ascii?Q?xA0knIAchEN2gEu/tGs6YBhFFeAuOxEEUSm/xjQ0S6Fl89inb33jnb2Cm/TE?= =?us-ascii?Q?Ms4Kl3xFw1vV4CZk7CLwa1TyTNQAPnaAPWsCjcy9rNtrnc5WisrZKvoW+dYi?= =?us-ascii?Q?B9yG0LZOcP/5vrrNiH88r2cNi+PJidryueIOh+KdDQryLukmKQR9pTq1mosd?= =?us-ascii?Q?uzWdRBV5kOUmhyOweFP1u9/BeeQmuJIYjgvri4alA4T4vIwgK+UPcrVXWpxn?= =?us-ascii?Q?n5oQuMnwpQJvZJp3XOuWeM3PsqUmV0QL/YXjKsrR6b76DjkmjcPyIFwWGzHo?= =?us-ascii?Q?dr9+R51rZJ2T0zqEufjAr85qjTgaBMGpQOYSZ58Dxo/k7zrICUn1jDaoSo/6?= =?us-ascii?Q?K566D27X0LSm96mA+YJrG0yjYBAtY05E4ZuYXsTpq0h/YTSjMzfxxaN64Q7y?= =?us-ascii?Q?yjXHV4wGnh4V8A9E7y5u8OOo31qaYKNidJ6rerfNHnCX9V2ljePBv5/eitC4?= =?us-ascii?Q?+dH344JJZA=3D=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB4025.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 816fc0db-ebcd-4ce0-93c9-08da112610ff X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Mar 2022 01:47:21.6711 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: IP0ur9wwUerge8mUl4Oa9Pdrd4RxGC6nvy+fOD5+Len324usciw42iDMQRcLYKVPeGCHLJ8WBrICBRIhEfuhOQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR11MB3668 Return-Path: hao.a.wu@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Pushed via: PR - https://github.com/tianocore/edk2/pull/2701 Commit - https://github.com/tianocore/edk2/commit/7456990e8eebe3b935447253b= b6d1d3129839122 Best Regards, Hao Wu > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Wu, Hao A > Sent: Monday, March 28, 2022 8:30 AM > To: devel@edk2.groups.io; Bandaru, Purna Chandra Rao > > Cc: Albecki, Mateusz ; Gao, Liming > ; Liu, Zhiguang > Subject: Re: [edk2-devel] [PATCH] bRefClkFreq UFS card attribute need to = be > programmed after fDeviceInit >=20 > Will slightly modify the subject to: > MdeModulePkg/Ufs: bRefClkFreq attribute be programmed after fDeviceInit >=20 > Reviewed-by: Hao A Wu Will wait a day before merging > to see if comment from other reviewers. >=20 > Best Regards, > Hao Wu >=20 > > -----Original Message----- > > From: devel@edk2.groups.io On Behalf Of > > Bandaru, Purna Chandra Rao > > Sent: Friday, March 25, 2022 8:18 PM > > To: devel@edk2.groups.io > > Cc: Bandaru, Purna Chandra Rao ; > > Wu, Hao A ; Albecki, Mateusz > > ; Gao, Liming ; > > Liu, Zhiguang > > Subject: [edk2-devel] [PATCH] bRefClkFreq UFS card attribute need to > > be programmed after fDeviceInit > > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3886 > > > > bRefClkFreq UFS card attribute need to be read and written after > > successful fDeviceInit and NOP response so that link will be stable. > > > > Cc: Wu Hao A > > Cc: Albecki Mateusz > > Cc: Liming Gao > > Cc: Zhiguang Liu > > > > Signed-off-by: Purna Chandra Rao Bandaru > > > > --- > > .../Bus/Ufs/UfsPassThruDxe/UfsPassThru.c | 34 +++++++++---------- > > 1 file changed, 17 insertions(+), 17 deletions(-) > > > > diff --git a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c > > b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c > > index dc78e09678..ae593ff03a 100644 > > --- a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c > > +++ b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c > > @@ -919,6 +919,23 @@ UfsPassThruDriverBindingStart ( > > goto Error; > > } > > > > + // > > + // UFS 2.0 spec Section 13.1.3.3: > > + // At the end of the UFS Interconnect Layer initialization on both > > + host and device side, // the host shall send a NOP OUT UPIU to > > + verify that the > > device UTP Layer is ready. > > + // > > + Status =3D UfsExecNopCmds (Private); > > + if (EFI_ERROR (Status)) { > > + DEBUG ((DEBUG_ERROR, "Ufs Sending NOP IN command Error, Status > > =3D %r\n", Status)); > > + goto Error; > > + } > > + > > + Status =3D UfsFinishDeviceInitialization (Private); if (EFI_ERROR > > + (Status)) { > > + DEBUG ((DEBUG_ERROR, "Device failed to finish initialization, > > + Status =3D %r\n", > > Status)); > > + goto Error; > > + } > > + > > if ((mUfsHcPlatform !=3D NULL) && > > ((mUfsHcPlatform->RefClkFreq =3D=3D EdkiiUfsCardRefClkFreq19p2Mh= z) || > > (mUfsHcPlatform->RefClkFreq =3D=3D EdkiiUfsCardRefClkFreq26Mhz)= || > > @@ - > > 967,23 +984,6 @@ UfsPassThruDriverBindingStart ( > > } > > } > > > > - // > > - // UFS 2.0 spec Section 13.1.3.3: > > - // At the end of the UFS Interconnect Layer initialization on both > > host and device side, > > - // the host shall send a NOP OUT UPIU to verify that the device UTP > > Layer is ready. > > - // > > - Status =3D UfsExecNopCmds (Private); > > - if (EFI_ERROR (Status)) { > > - DEBUG ((DEBUG_ERROR, "Ufs Sending NOP IN command Error, Status > > =3D %r\n", Status)); > > - goto Error; > > - } > > - > > - Status =3D UfsFinishDeviceInitialization (Private); > > - if (EFI_ERROR (Status)) { > > - DEBUG ((DEBUG_ERROR, "Device failed to finish initialization, Stat= us > =3D %r\n", > > Status)); > > - goto Error; > > - } > > - > > // > > // Check if 8 common luns are active and set corresponding bit mask. > > // > > -- > > 2.31.1.windows.1 > > > > > > > > > > >=20 >=20 >=20 >=20 >=20