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>
This commit is contained in:
Hao Wu 2016-05-04 16:22:30 +08:00
parent 128946c9c3
commit 9cc0168a70
1 changed files with 1 additions and 0 deletions

View File

@ -136,6 +136,7 @@ EnumerateNvmeDevNamespace (
Device->Media.LogicalPartition = FALSE; Device->Media.LogicalPartition = FALSE;
Device->Media.ReadOnly = FALSE; Device->Media.ReadOnly = FALSE;
Device->Media.WriteCaching = FALSE; Device->Media.WriteCaching = FALSE;
Device->Media.IoAlign = Private->PassThruMode.IoAlign;
Flbas = NamespaceData->Flbas; Flbas = NamespaceData->Flbas;
LbaFmtIdx = Flbas & 0xF; LbaFmtIdx = Flbas & 0xF;