]> git.baikalelectronics.ru Git - uboot.git/commit
nvme: Fix number of blocks detection
authorJon Nettleton <jon@solid-run.com>
Thu, 3 Aug 2017 09:31:01 +0000 (02:31 -0700)
committerTom Rini <trini@konsulko.com>
Sun, 13 Aug 2017 19:17:32 +0000 (15:17 -0400)
commitedf10ff5b7c071e786876cbb59aa19e467d3aee5
treede56fd14eebea8131a2f53a6b73e528f127f9ebf
parent90a3dcf655294d64ee10d346ca03bb2d92c57f8d
nvme: Fix number of blocks detection

NVMe should use the nsze value from the queried device. This will
reflect the total number of blocks of the device and fix detecting
my Samsung 960 EVO 256GB.

Original:
Capacity: 40386.6 MB = 39.4 GB (82711872 x 512)

Fixed:
Capacity: 238475.1 MB = 232.8 GB (488397168 x 512)

Signed-off-by: Jon Nettleton <jon@solid-run.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
drivers/nvme/nvme.c