MdeModulePkg NvmExpressDxe: Ensure write-through for NVMe write command

Set the Force Unit Access (FUA) bit in NVMe Write - Command Dword 12 to
ensure write-through behavior.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
This commit is contained in:
Hao Wu 2016-03-25 09:46:58 +08:00
parent 619e6cf19f
commit 60cfeeb3b6
1 changed files with 4 additions and 1 deletions

View File

@ -127,7 +127,10 @@ WriteSectors (
CommandPacket.NvmeCmd->Cdw10 = (UINT32)Lba;
CommandPacket.NvmeCmd->Cdw11 = (UINT32)RShiftU64(Lba, 32);
CommandPacket.NvmeCmd->Cdw12 = (Blocks - 1) & 0xFFFF;
//
// Set Force Unit Access bit (bit 30) to use write-through behaviour
//
CommandPacket.NvmeCmd->Cdw12 = ((Blocks - 1) & 0xFFFF) | BIT30;
CommandPacket.MetadataBuffer = NULL;
CommandPacket.MetadataLength = 0;