From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 47C4E21E1DACF for ; Mon, 7 Aug 2017 00:13:23 -0700 (PDT) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Aug 2017 00:15:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,336,1498546800"; d="scan'208";a="134466076" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga005.jf.intel.com with ESMTP; 07 Aug 2017 00:14:16 -0700 Received: from fmsmsx102.amr.corp.intel.com (10.18.124.200) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 7 Aug 2017 00:14:15 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX102.amr.corp.intel.com (10.18.124.200) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 7 Aug 2017 00:14:15 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.151]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.188]) with mapi id 14.03.0319.002; Mon, 7 Aug 2017 15:14:14 +0800 From: "Wu, Hao A" To: "Ni, Ruiyu" , "edk2-devel@lists.01.org" Thread-Topic: [edk2] [PATCH 0/2] Notify NVME HW when system reset happens Thread-Index: AQHTDy27opoXH982gESL6QvIakhveaJ4b2Zw Date: Mon, 7 Aug 2017 07:14:14 +0000 Message-ID: References: <20170807033142.177248-1-ruiyu.ni@intel.com> In-Reply-To: <20170807033142.177248-1-ruiyu.ni@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH 0/2] Notify NVME HW when system reset happens X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Aug 2017 07:13:23 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Ray, Just for curiosity, I checked the NVME spec for the purpose of a shutdown notification to the controller when there is a power-off for the device. An= d found the following: 1. Will increase the field 'Unsafe Shutdowns' in the SMART/Health Informati= on data (Section 5.10.1.2). 2. Subsequent reads for locations written to the volatile write cache that = were not written to non-volatile storage may return older data. (Section 6.4.2.1= ) For 2, the implementation of the NVME driver always sets the Force Unit=20 Access (FUA) bit for write operations. Hence, the read operation will refle= ct the latest data on device. So missing the shutdown notification will increase the number of 'Unsafe Shutdowns' tracked by the controller. Is there any other issue being introd= uced by missing the notification? Besides, the change is good for me. Best Regards, Hao Wu > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Ru= iyu > Ni > Sent: Monday, August 07, 2017 11:32 AM > To: edk2-devel@lists.01.org > Subject: [edk2] [PATCH 0/2] Notify NVME HW when system reset happens >=20 > Per NVM Express Spec, software should notify NVME HW when shutdown > occurs. >=20 > The host should set the Shutdown Notification (CC.SHN) field to 01b > to indicate a normal shutdown operation. The controller indicates > when shutdown processing is completed by updating the Shutdown Status > (CSTS.SHST) field to 10b. >=20 > Ruiyu Ni (2): > MdePkg/Nvme: Add NVME shutdown notification related macros > MdeModulePkg/NvmExpressDxe: Notify NVME HW when system reset > happens >=20 > MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.c | 7 +- > MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.h | 23 ++- > .../Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf | 3 +- > MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c | 181 > ++++++++++++++++++++- > MdePkg/Include/IndustryStandard/Nvme.h | 6 +- > 5 files changed, 215 insertions(+), 5 deletions(-) >=20 > -- > 2.12.2.windows.2 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel