From 9cc0168a70052638ffb40b09369a636d4fa84b36 Mon Sep 17 00:00:00 2001 From: Hao Wu Date: Wed, 4 May 2016 16:22:30 +0800 Subject: [PATCH] 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 Reviewed-by: Feng Tian --- MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.c | 1 + 1 file changed, 1 insertion(+) 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;