[U-Boot] [PATCH] NVMe: do PCI enumerate before nvme scan

Make sure that the PCI busses are enumerated before trying to find a NVMe device.
Signed-off-by: Patrick Wildt patrick@blueri.se
diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h index 3570a32dff..563f1bf5fa 100644 --- a/include/config_distro_bootcmd.h +++ b/include/config_distro_bootcmd.h @@ -185,6 +185,7 @@ "nvme_init=" \ "if ${nvme_need_init}; then " \ "setenv nvme_need_init false; " \ + BOOTENV_RUN_PCI_ENUM \ "nvme scan; " \ "fi\0" \ \

Hi Patrick,
On Thu, Oct 3, 2019 at 3:58 AM Patrick Wildt patrick@blueri.se wrote:
Make sure that the PCI busses are enumerated before trying to find a NVMe device.
Signed-off-by: Patrick Wildt patrick@blueri.se
diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h index 3570a32dff..563f1bf5fa 100644 --- a/include/config_distro_bootcmd.h +++ b/include/config_distro_bootcmd.h @@ -185,6 +185,7 @@ "nvme_init=" \ "if ${nvme_need_init}; then " \ "setenv nvme_need_init false; " \
BOOTENV_RUN_PCI_ENUM \
I think we need insert this to "nvme_boot=", just like "virtio_boot=" does.
"nvme scan; " \ "fi\0" \ \
Regards, Bin

Make sure that the PCI busses are enumerated before trying to find a NVMe device.
Signed-off-by: Patrick Wildt patrick@blueri.se --- Changes for v2: - moved from nvme_init to nvme_boot
diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h index 3570a32dff..fc0935fa21 100644 --- a/include/config_distro_bootcmd.h +++ b/include/config_distro_bootcmd.h @@ -189,6 +189,7 @@ "fi\0" \ \ "nvme_boot=" \ + BOOTENV_RUN_PCI_ENUM \ BOOTENV_RUN_NVME_INIT \ BOOTENV_SHARED_BLKDEV_BODY(nvme) #define BOOTENV_DEV_NVME BOOTENV_DEV_BLKDEV

On Thu, Oct 3, 2019 at 5:11 PM Patrick Wildt patrick@blueri.se wrote:
Make sure that the PCI busses are enumerated before trying to find a NVMe device.
Signed-off-by: Patrick Wildt patrick@blueri.se
Changes for v2:
- moved from nvme_init to nvme_boot
Reviewed-by: Bin Meng bmeng.cn@gmail.com

On Thu, Oct 03, 2019 at 11:10:57AM +0200, Patrick Wildt wrote:
Make sure that the PCI busses are enumerated before trying to find a NVMe device.
Signed-off-by: Patrick Wildt patrick@blueri.se Reviewed-by: Bin Meng bmeng.cn@gmail.com
Applied to u-boot/master, thanks!
participants (3)
-
Bin Meng
-
Patrick Wildt
-
Tom Rini