]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg NvmExpressDxe: Initialize IoAlign info for an NVMe device
authorHao Wu <hao.a.wu@intel.com>
Wed, 4 May 2016 08:22:30 +0000 (16:22 +0800)
committerHao Wu <hao.a.wu@intel.com>
Fri, 6 May 2016 00:56:04 +0000 (08:56 +0800)
The "IoAlign" field in EFI_BLOCK_IO_MEDIA of an NVMe device is not
initialized properly, leading to a zero value for this field.

It should be initialized from the "IoAlign" field in the
EFI_NVM_EXPRESS_PASS_THRU_MODE structure maintained by the NVMe
controller.

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>
MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.c

index 321dbdef9756d641e8f16c87f1dd0efe47109e17..cad061bdf76a8ecbb54f88f32e45b18d20af7ffb 100644 (file)
@@ -136,6 +136,7 @@ EnumerateNvmeDevNamespace (
     Device->Media.LogicalPartition = FALSE;\r
     Device->Media.ReadOnly       = FALSE;\r
     Device->Media.WriteCaching   = FALSE;\r
+    Device->Media.IoAlign        = Private->PassThruMode.IoAlign;\r
 \r
     Flbas     = NamespaceData->Flbas;\r
     LbaFmtIdx = Flbas & 0xF;\r