]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
nvme: call device_probe() after scanning
authorAKASHI Takahiro <takahiro.akashi@linaro.org>
Tue, 8 Mar 2022 11:36:42 +0000 (20:36 +0900)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 9 Apr 2022 19:06:31 +0000 (21:06 +0200)
Every time a nvme bus/port is scanned and a new device is detected,
we want to call device_probe() as it will give us a chance to run
additional post-processings for some purposes.

In particular, support for creating partitions on a device will be added.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/nvme/nvme.c

index 1d56517e9969f8b827a93cb55f4b986914b06a2f..a305305885ec6c13ad2c2c5e3f6bc48f2fb2d363 100644 (file)
@@ -884,6 +884,10 @@ int nvme_init(struct udevice *udev)
                                         -1, 512, 0, &ns_udev);
                if (ret)
                        goto free_id;
+
+               ret = blk_probe_or_unbind(ns_udev);
+               if (ret)
+                       goto free_id;
        }
 
        free(id);