summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHao Wu <hao.a.wu@intel.com>2016-05-04 16:22:30 +0800
committerHao Wu <hao.a.wu@intel.com>2016-05-06 08:56:04 +0800
commit9cc0168a70052638ffb40b09369a636d4fa84b36 (patch)
treeeee37434b07a06bf84f615fcfcfaab0b7436f05f
parent128946c9c38977ac2047c86d4143db2a172fc2f6 (diff)
downloadedk2-platforms-9cc0168a70052638ffb40b09369a636d4fa84b36.tar.xz
MdeModulePkg NvmExpressDxe: Initialize IoAlign info for an NVMe device
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>
-rw-r--r--MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.c b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.c
index 321dbdef97..cad061bdf7 100644
--- a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.c
+++ b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.c
@@ -136,6 +136,7 @@ EnumerateNvmeDevNamespace (
Device->Media.LogicalPartition = FALSE;
Device->Media.ReadOnly = FALSE;
Device->Media.WriteCaching = FALSE;
+ Device->Media.IoAlign = Private->PassThruMode.IoAlign;
Flbas = NamespaceData->Flbas;
LbaFmtIdx = Flbas & 0xF;