diff --git a/drivers/virtio/fs.c b/drivers/virtio/fs.c index ac60047da5a..9437f31bdba 100644 --- a/drivers/virtio/fs.c +++ b/drivers/virtio/fs.c @@ -372,6 +372,8 @@ static int virtio_fs_mount(struct udevice *dev) if (uc_priv->mounted) return log_msg_ret("vfi", -EISCONN); + if (IS_ENABLED(CONFIG_SANDBOX)) + return log_msg_ret("vfs", -ENOENT); ret = virtio_fs_init(dev); if (ret) diff --git a/drivers/virtio/virtio-uclass.c b/drivers/virtio/virtio-uclass.c index 0f352d8dd68..44d6aafa0f5 100644 --- a/drivers/virtio/virtio-uclass.c +++ b/drivers/virtio/virtio-uclass.c @@ -447,7 +447,7 @@ U_BOOT_DRIVER(virtio_bootdev) = { }; BOOTDEV_HUNTER(virtio_bootdev_hunter) = { - .prio = BOOTDEVP_4_SCAN_FAST, + .prio = BOOTDEVP_2_INTERNAL_FAST, .uclass = UCLASS_VIRTIO, .hunt = virtio_bootdev_hunt, .drv = DM_DRIVER_REF(virtio_bootdev), diff --git a/test/boot/bootdev.c b/test/boot/bootdev.c index b1966f7d72c..d7483f52160 100644 --- a/test/boot/bootdev.c +++ b/test/boot/bootdev.c @@ -398,7 +398,7 @@ static int bootdev_test_hunter(struct unit_test_state *uts) ut_assert_nextline(" 4 scsi scsi_bootdev"); ut_assert_nextline(" 4 spi_flash sf_bootdev"); ut_assert_nextline(" 5 usb usb_bootdev"); - ut_assert_nextline(" 4 virtio virtio_bootdev"); + ut_assert_nextline(" 2 virtio virtio_bootdev"); ut_assert_nextline("(total hunters: %d)", HUNTER_COUNT); ut_assert_console_end(); @@ -478,7 +478,7 @@ static int bootdev_test_cmd_hunt(struct unit_test_state *uts) ut_assert_nextline(" 4 * scsi scsi_bootdev"); ut_assert_nextline(" 4 * spi_flash sf_bootdev"); ut_assert_nextline(" 5 * usb usb_bootdev"); - ut_assert_nextline(" 4 * virtio virtio_bootdev"); + ut_assert_nextline(" 2 * virtio virtio_bootdev"); ut_assert_nextline("(total hunters: %d)", HUNTER_COUNT); ut_assert_console_end(); @@ -503,8 +503,8 @@ static int bootdev_test_hunt_scan(struct unit_test_state *uts) ut_assertok(bootflow_scan_first(NULL, NULL, &iter, BOOTFLOWIF_SHOW | BOOTFLOWIF_HUNT | BOOTFLOWIF_SKIP_GLOBAL, &bflow)); - ut_asserteq(BIT(HUNTER_MMC) | BIT(HUNTER_SIMPLE_BUS), - std->hunters_used); + ut_asserteq(BIT(HUNTER_MMC) | BIT(HUNTER_SIMPLE_BUS) | + BIT(HUNTER_VIRTIO), std->hunters_used); return 0; } @@ -742,10 +742,11 @@ static int bootdev_test_next_prio(struct unit_test_state *uts) ut_assert_nextline("Hunting with: simple_bus"); ut_assert_nextline("Found 2 extension board(s)."); ut_assert_nextline("Hunting with: mmc"); + ut_assert_nextline("Hunting with: virtio"); ut_assert_console_end(); - ut_asserteq(BIT(HUNTER_MMC) | BIT(HUNTER_SIMPLE_BUS), - std->hunters_used); + ut_asserteq(BIT(HUNTER_MMC) | BIT(HUNTER_SIMPLE_BUS) | + BIT(HUNTER_VIRTIO), std->hunters_used); ut_assertok(bootdev_next_prio(&iter, &dev)); ut_asserteq_str("mmc1.bootdev", dev->name); @@ -765,7 +766,6 @@ static int bootdev_test_next_prio(struct unit_test_state *uts) * this scans all bootdevs of priority BOOTDEVP_4_SCAN_FAST before it * starts looking at the devices, so we se virtio as well */ - ut_assert_nextline("Hunting with: virtio"); ut_assert_nextlinen("SF: Detected m25p16"); ut_assertok(bootdev_next_prio(&iter, &dev)); diff --git a/test/boot/bootstd_common.h b/test/boot/bootstd_common.h index ce049ad8bd1..a653bfd142b 100644 --- a/test/boot/bootstd_common.h +++ b/test/boot/bootstd_common.h @@ -28,6 +28,7 @@ enum { HUNTER_MMC, /* ID of MMC hunter */ HUNTER_SCSI = 7, /* ID of SCSI hunter */ HUNTER_USB = 9, /* ID of USB hunter */ + HUNTER_VIRTIO, HUNTER_COUNT = 11, HUNTER_MAX = HUNTER_COUNT - 1, };