u-boot/drivers/nvme
Bin Meng 478f7fc6a0 nvme: Skip block device creation for inactive namespaces
At present for each namespace there is a block device created for it.
There is no issue if the number of supported namespaces reported from
the NVMe device is only 1.

Since QEMU commit 7f0f1acedf15 ("hw/block/nvme: support multiple namespaces"),
the number of supported namespaces reported has been changed from 1
to 256, but not all of them are active namespaces. The actual active
one depends on the QEMU command line parameters. A common case is
that namespace 1 being active and all other 255 being inactive.

If a namespace is inactive, the namespace identify command returns a
zero filled data structure. We can use field NSZE (namespace size) to
decide whether a block device should be created for it.

Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2021-06-23 17:21:14 +08:00
..
Kconfig SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
Makefile SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
nvme-uclass.c nvme: Move block dev creation from uclass post_probe() to driver probe() 2021-06-23 17:21:14 +08:00
nvme.c nvme: Skip block device creation for inactive namespaces 2021-06-23 17:21:14 +08:00
nvme.h nvme: Use only 32-bit accesses in nvme_writeq/nvme_readq 2021-01-04 09:10:16 -05:00
nvme_show.c nvme: Fix warning of cast from pointer to integer of different size 2019-05-19 16:17:33 +08:00