mirror of https://github.com/acidanthera/audk.git
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:
parent
619e6cf19f
commit
60cfeeb3b6
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue