]> git.dujemihanovic.xyz Git - u-boot.git/commit
virtio: call device_probe() in scanning
authorAKASHI Takahiro <takahiro.akashi@linaro.org>
Tue, 8 Mar 2022 11:36:45 +0000 (20:36 +0900)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 9 Apr 2022 19:06:31 +0000 (21:06 +0200)
commit75a9d7504180f01abb3f63ee894476f457c6dbb5
tree80819fcdf43f5bdf48a315f3317096cff4dbcd01
parent4c73b0344230129ec7493cf425922791e6132a30
virtio: call device_probe() in scanning

virtio_init() enumerates all the peripherals that are to be materialised
with udevices(UCLASS_VIRIO) and creates particular device instances
(UCLASS_BlK or whatever else) as children.
On the other hand, device_probe() won't be invoked against those resultant
udevices unlike other ordinary device drivers do in the driver model.

This is particularly inconvenient when we want to add "event notification"
callback so that we will be able to automatically create all efi_disk
objects in a later patch.

With this patch applied, "virtio scan" will work in a similar way
to "scsi rescan", "usb start" or others in term of 'probe' semantics.

I didn't add this change to virtio_init() itself because this function
may be called in board_init_r() (indirectly in board_late_init())
before UEFI subsustem is initialized.

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