]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/NvmExpressDxe: Correct the calculation of LbaFmtIdx of Identify name...
authorFeng Tian <feng.tian@intel.com>
Tue, 29 Oct 2013 01:31:02 +0000 (01:31 +0000)
committererictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 29 Oct 2013 01:31:02 +0000 (01:31 +0000)
Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14805 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpress.c

index ed1c4bf391a962b3f72b46b3d7bef0b5801aad68..4f187e3abbe3a0d5e0928286e6ef392375a4759d 100644 (file)
@@ -129,7 +129,7 @@ EnumerateNvmeDevNamespace (
     Device->Media.WriteCaching   = FALSE;\r
 \r
     Flbas     = NamespaceData->Flbas;\r
     Device->Media.WriteCaching   = FALSE;\r
 \r
     Flbas     = NamespaceData->Flbas;\r
-    LbaFmtIdx = Flbas & 3;\r
+    LbaFmtIdx = Flbas & 0xF;\r
     Lbads     = NamespaceData->LbaFormat[LbaFmtIdx].Lbads;\r
     Device->Media.BlockSize = (UINT32)1 << Lbads;\r
 \r
     Lbads     = NamespaceData->LbaFormat[LbaFmtIdx].Lbads;\r
     Device->Media.BlockSize = (UINT32)1 << Lbads;\r
 \r