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