From patchwork Wed Dec 7 08:51:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1713152 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=OBnJd90S; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NRrzW26Ptz23ns for ; Wed, 7 Dec 2022 20:08:07 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B4D578574A; Wed, 7 Dec 2022 09:57:28 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="OBnJd90S"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B177385748; Wed, 7 Dec 2022 09:57:26 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id C067D85573 for ; Wed, 7 Dec 2022 09:57:19 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-pl1-x636.google.com with SMTP id y4so16436690plb.2 for ; Wed, 07 Dec 2022 00:57:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5at/OZG3/OKlGeQ7uuWw450QeblfUInK5KVN/MJeLf8=; b=OBnJd90ShcvfGvXMS/uzw1yCinN/qDFta8vOjarjD+W2TYGu6nh2BEH/DJRvO0sX7R 9HDAvkTGjK3rO+bMp82QtPsOrmwVFXqtDTGtz9ETFYOejd8GfLA1/brOoXTfsoJRD3rd zcmG97SlmdIFubg9M9XU1kIqzCE9UUynDvUOE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5at/OZG3/OKlGeQ7uuWw450QeblfUInK5KVN/MJeLf8=; b=eIEKN9TYmKXjPENxt0Y7vGp6Vv29cSV5LsdrZobyr06wPtypnGuUZ4W8CyFwm0lnUx QvoRhAGSxVileFydV2/QR/eF03oSBBHJDxuY+7glWse77d6TKEjhoaT1PzGEHKIcrF0M 6tWg5X51i0Zw9i1Hh2udaSrJy6P1dwosDRw7yuhpOtAphYrqtLrVHMMJPmEnIqRjPJ0s s0Yhso/afft59FzpGqrg3FouN5qFr7zkNPC4wYhftGVY0E8P9azH9EVfUK1+o4Y485ak 6vo/cnSWR881iS4QDx+GYXieXsyDGRN0NatEQki8LAuegaLB8uMLqtHfqvSqLbcnhD+w HoKg== X-Gm-Message-State: ANoB5plSWvfFDm9zUMvdos6g45p+yZD66oAGKhT9kELGYcoKSM956FSb yXuhHSWJ4jBc6pJ21nj/KYpW9a2KUS6L0D3A X-Google-Smtp-Source: AA0mqf5EAw3Dx22s06Gs2kMw12K84Do7pT9EYDy096Xj47qgLBN0YrTYWcTzb/Qa410HUcgfdgXn7g== X-Received: by 2002:a17:90b:2744:b0:218:7675:ba83 with SMTP id qi4-20020a17090b274400b002187675ba83mr64690367pjb.61.1670403437709; Wed, 07 Dec 2022 00:57:17 -0800 (PST) Received: from localhost.localdomain ([27.110.126.54]) by smtp.gmail.com with ESMTPSA id l16-20020a170903121000b0018157b415dbsm14145514plh.63.2022.12.07.00.57.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Dec 2022 00:57:17 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: U-Boot Custodians , Simon Glass , AKASHI Takahiro , Bin Meng , Jaehoon Chung , Jagan Teki , Joe Hershberger , Marek Vasut , Peng Fan , Ramon Fried , Stefan Roese , Vignesh R Subject: [PATCH 59/71] bootstd: Add a new pre-scan priority for bootdevs Date: Wed, 7 Dec 2022 21:51:25 +1300 Message-Id: <20221207085137.445249-60-sjg@chromium.org> X-Mailer: git-send-email 2.39.0.rc0.267.gcb52ba06e7-goog In-Reply-To: <20221207085137.445249-1-sjg@chromium.org> References: <20221207085137.445249-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean We need extensions to be set up before we start trying to boot any of the bootdevs. Add a new priority before all the others for tht sort of thing. Also add a 'none' option, so that the first one is not 0. While we are here, comment enum bootdev_prio_t fully and expand the test for the 'bootdev hunt' command. Signed-off-by: Simon Glass --- boot/bootdev-uclass.c | 8 ++++++ doc/develop/bootstd.rst | 2 +- drivers/block/ide.c | 4 +-- drivers/mmc/mmc_bootdev.c | 4 +-- drivers/mtd/spi/sf_bootdev.c | 4 +-- drivers/nvme/nvme-uclass.c | 4 +-- drivers/scsi/scsi_bootdev.c | 4 +-- drivers/usb/host/usb_bootdev.c | 4 +-- drivers/virtio/virtio-uclass.c | 4 +-- include/bootdev.h | 35 ++++++++++++++++++----- net/eth_bootdev.c | 4 +-- test/boot/bootdev.c | 51 +++++++++++++++++++++------------- 12 files changed, 84 insertions(+), 44 deletions(-) diff --git a/boot/bootdev-uclass.c b/boot/bootdev-uclass.c index e8686159f2b..5ed310c554f 100644 --- a/boot/bootdev-uclass.c +++ b/boot/bootdev-uclass.c @@ -630,6 +630,7 @@ static int build_order(struct udevice *bootstd, struct udevice **order, int bootdev_setup_iter_order(struct bootflow_iter *iter, struct udevice **devp) { struct udevice *bootstd, *dev = *devp, **order; + bool show = iter->flags & BOOTFLOWF_SHOW; struct uclass *uc; int count, upto; int ret; @@ -640,6 +641,13 @@ int bootdev_setup_iter_order(struct bootflow_iter *iter, struct udevice **devp) return log_msg_ret("std", ret); } + /* hunt for any pre-scan devices */ + if (iter->flags & BOOTFLOWF_HUNT) { + ret = bootdev_hunt_prio(BOOTDEVP_1_PRE_SCAN, show); + if (ret) + return log_msg_ret("pre", ret); + } + /* Handle scanning a single device */ if (dev) { iter->flags |= BOOTFLOWF_SINGLE_DEV; diff --git a/doc/develop/bootstd.rst b/doc/develop/bootstd.rst index 1ccc49424eb..bfa8cbd7561 100644 --- a/doc/develop/bootstd.rst +++ b/doc/develop/bootstd.rst @@ -211,7 +211,7 @@ A bootdev driver is typically fairly simple. Here is one for mmc:: { struct bootdev_uc_plat *ucp = dev_get_uclass_plat(dev); - ucp->prio = BOOTDEVP_0_INTERNAL_FAST; + ucp->prio = BOOTDEVP_2_INTERNAL_FAST; return 0; } diff --git a/drivers/block/ide.c b/drivers/block/ide.c index 80c8b64de2f..1ad9b6c1267 100644 --- a/drivers/block/ide.c +++ b/drivers/block/ide.c @@ -1060,7 +1060,7 @@ static int ide_bootdev_bind(struct udevice *dev) { struct bootdev_uc_plat *ucp = dev_get_uclass_plat(dev); - ucp->prio = BOOTDEVP_3_SCAN_SLOW; + ucp->prio = BOOTDEVP_5_SCAN_SLOW; return 0; } @@ -1089,7 +1089,7 @@ U_BOOT_DRIVER(ide_bootdev) = { }; BOOTDEV_HUNTER(ide_bootdev_hunter) = { - .prio = BOOTDEVP_3_SCAN_SLOW, + .prio = BOOTDEVP_5_SCAN_SLOW, .uclass = UCLASS_IDE, .hunt = ide_bootdev_hunt, .drv = DM_DRIVER_REF(ide_bootdev), diff --git a/drivers/mmc/mmc_bootdev.c b/drivers/mmc/mmc_bootdev.c index 300208f0c71..b57b8a62276 100644 --- a/drivers/mmc/mmc_bootdev.c +++ b/drivers/mmc/mmc_bootdev.c @@ -15,7 +15,7 @@ static int mmc_bootdev_bind(struct udevice *dev) { struct bootdev_uc_plat *ucp = dev_get_uclass_plat(dev); - ucp->prio = BOOTDEVP_0_INTERNAL_FAST; + ucp->prio = BOOTDEVP_2_INTERNAL_FAST; return 0; } @@ -37,7 +37,7 @@ U_BOOT_DRIVER(mmc_bootdev) = { }; BOOTDEV_HUNTER(mmc_bootdev_hunter) = { - .prio = BOOTDEVP_0_INTERNAL_FAST, + .prio = BOOTDEVP_2_INTERNAL_FAST, .uclass = UCLASS_MMC, .drv = DM_DRIVER_REF(mmc_bootdev), }; diff --git a/drivers/mtd/spi/sf_bootdev.c b/drivers/mtd/spi/sf_bootdev.c index 2272e8567ce..d6b47b11ce4 100644 --- a/drivers/mtd/spi/sf_bootdev.c +++ b/drivers/mtd/spi/sf_bootdev.c @@ -53,7 +53,7 @@ static int sf_bootdev_bind(struct udevice *dev) { struct bootdev_uc_plat *ucp = dev_get_uclass_plat(dev); - ucp->prio = BOOTDEVP_2_SCAN_FAST; + ucp->prio = BOOTDEVP_4_SCAN_FAST; return 0; } @@ -76,7 +76,7 @@ U_BOOT_DRIVER(sf_bootdev) = { }; BOOTDEV_HUNTER(sf_bootdev_hunter) = { - .prio = BOOTDEVP_2_SCAN_FAST, + .prio = BOOTDEVP_4_SCAN_FAST, .uclass = UCLASS_SPI_FLASH, .drv = DM_DRIVER_REF(sf_bootdev), }; diff --git a/drivers/nvme/nvme-uclass.c b/drivers/nvme/nvme-uclass.c index 7a8ff06e78c..f3af6a27b63 100644 --- a/drivers/nvme/nvme-uclass.c +++ b/drivers/nvme/nvme-uclass.c @@ -17,7 +17,7 @@ static int nvme_bootdev_bind(struct udevice *dev) { struct bootdev_uc_plat *ucp = dev_get_uclass_plat(dev); - ucp->prio = BOOTDEVP_2_SCAN_FAST; + ucp->prio = BOOTDEVP_4_SCAN_FAST; return 0; } @@ -62,7 +62,7 @@ U_BOOT_DRIVER(nvme_bootdev) = { }; BOOTDEV_HUNTER(nvme_bootdev_hunter) = { - .prio = BOOTDEVP_2_SCAN_FAST, + .prio = BOOTDEVP_4_SCAN_FAST, .uclass = UCLASS_NVME, .hunt = nvme_bootdev_hunt, .drv = DM_DRIVER_REF(nvme_bootdev), diff --git a/drivers/scsi/scsi_bootdev.c b/drivers/scsi/scsi_bootdev.c index 2367b33da9c..991013fe1ef 100644 --- a/drivers/scsi/scsi_bootdev.c +++ b/drivers/scsi/scsi_bootdev.c @@ -16,7 +16,7 @@ static int scsi_bootdev_bind(struct udevice *dev) { struct bootdev_uc_plat *ucp = dev_get_uclass_plat(dev); - ucp->prio = BOOTDEVP_2_SCAN_FAST; + ucp->prio = BOOTDEVP_4_SCAN_FAST; return 0; } @@ -55,7 +55,7 @@ U_BOOT_DRIVER(scsi_bootdev) = { }; BOOTDEV_HUNTER(scsi_bootdev_hunter) = { - .prio = BOOTDEVP_2_SCAN_FAST, + .prio = BOOTDEVP_4_SCAN_FAST, .uclass = UCLASS_SCSI, .hunt = scsi_bootdev_hunt, .drv = DM_DRIVER_REF(scsi_bootdev), diff --git a/drivers/usb/host/usb_bootdev.c b/drivers/usb/host/usb_bootdev.c index 66d0b6ae8f5..32919f99286 100644 --- a/drivers/usb/host/usb_bootdev.c +++ b/drivers/usb/host/usb_bootdev.c @@ -15,7 +15,7 @@ static int usb_bootdev_bind(struct udevice *dev) { struct bootdev_uc_plat *ucp = dev_get_uclass_plat(dev); - ucp->prio = BOOTDEVP_3_SCAN_SLOW; + ucp->prio = BOOTDEVP_5_SCAN_SLOW; return 0; } @@ -42,7 +42,7 @@ U_BOOT_DRIVER(usb_bootdev) = { }; BOOTDEV_HUNTER(usb_bootdev_hunter) = { - .prio = BOOTDEVP_3_SCAN_SLOW, + .prio = BOOTDEVP_5_SCAN_SLOW, .uclass = UCLASS_USB, .hunt = usb_bootdev_hunt, .drv = DM_DRIVER_REF(usb_bootdev), diff --git a/drivers/virtio/virtio-uclass.c b/drivers/virtio/virtio-uclass.c index 27efac0d48e..91af412ec1d 100644 --- a/drivers/virtio/virtio-uclass.c +++ b/drivers/virtio/virtio-uclass.c @@ -360,7 +360,7 @@ static int virtio_bootdev_bind(struct udevice *dev) { struct bootdev_uc_plat *ucp = dev_get_uclass_plat(dev); - ucp->prio = BOOTDEVP_2_SCAN_FAST; + ucp->prio = BOOTDEVP_4_SCAN_FAST; return 0; } @@ -405,7 +405,7 @@ U_BOOT_DRIVER(virtio_bootdev) = { }; BOOTDEV_HUNTER(virtio_bootdev_hunter) = { - .prio = BOOTDEVP_2_SCAN_FAST, + .prio = BOOTDEVP_4_SCAN_FAST, .uclass = UCLASS_VIRTIO, .hunt = virtio_bootdev_hunt, .drv = DM_DRIVER_REF(virtio_bootdev), diff --git a/include/bootdev.h b/include/bootdev.h index b7973fa5760..65d14f24686 100644 --- a/include/bootdev.h +++ b/include/bootdev.h @@ -21,15 +21,36 @@ struct udevice; * * Smallest value is the highest priority. By default, bootdevs are scanned from * highest to lowest priority + * + * BOOTDEVP_0_NONE: Invalid value, do not use + * @BOOTDEVP_6_PRE_SCAN: Scan bootdevs with this priority always, before + * starting any bootflow scan + * @BOOTDEVP_2_INTERNAL_FAST: Internal devices which don't need scanning and + * generally very quick to access, e.g. less than 100ms + * @BOOTDEVP_3_INTERNAL_SLOW: Internal devices which don't need scanning but + * take a significant fraction of a second to access + * @BOOTDEVP_4_SCAN_FAST: Extenal devices which need scanning or bus + * enumeration to find, but this enumeration happens quickly, typically under + * 100ms + * @BOOTDEVP_5_SCAN_SLOW: Extenal devices which need scanning or bus + * enumeration to find. The enumeration takes significant fraction of a second + * to complete + * @BOOTDEVP_6_NET_BASE: Basic network devices which are quickly and easily + * available. Typically used for an internal Ethernet device + * @BOOTDEVP_7_NET_FALLBACK: Secondary network devices which require extra time + * to start up, or are less desirable. Typically used for secondary Ethernet + * devices. Note that USB ethernet devices are found during USB enumeration, + * so do not use this priority */ enum bootdev_prio_t { - BOOTDEVP_0_INTERNAL_FAST = 10, - BOOTDEVP_1_INTERNAL_SLOW = 20, - BOOTDEVP_2_SCAN_FAST = 30, - BOOTDEVP_3_SCAN_SLOW = 40, - BOOTDEVP_4_NET_BASE = 50, - BOOTDEVP_5_NET_FALLBACK = 60, - BOOTDEVP_6_SYSTEM = 70, + BOOTDEVP_0_NONE, + BOOTDEVP_1_PRE_SCAN, + BOOTDEVP_2_INTERNAL_FAST, + BOOTDEVP_3_INTERNAL_SLOW, + BOOTDEVP_4_SCAN_FAST, + BOOTDEVP_5_SCAN_SLOW, + BOOTDEVP_6_NET_BASE, + BOOTDEVP_7_NET_FALLBACK, BOOTDEVP_COUNT, }; diff --git a/net/eth_bootdev.c b/net/eth_bootdev.c index bcbb35a74cd..13e5fcd3bdf 100644 --- a/net/eth_bootdev.c +++ b/net/eth_bootdev.c @@ -60,7 +60,7 @@ static int eth_bootdev_bind(struct udevice *dev) { struct bootdev_uc_plat *ucp = dev_get_uclass_plat(dev); - ucp->prio = BOOTDEVP_4_NET_BASE; + ucp->prio = BOOTDEVP_6_NET_BASE; return 0; } @@ -112,7 +112,7 @@ U_BOOT_DRIVER(eth_bootdev) = { }; BOOTDEV_HUNTER(eth_bootdev_hunt) = { - .prio = BOOTDEVP_4_NET_BASE, + .prio = BOOTDEVP_6_NET_BASE, .uclass = UCLASS_ETH, .hunt = eth_bootdev_hunt, .drv = DM_DRIVER_REF(eth_bootdev), diff --git a/test/boot/bootdev.c b/test/boot/bootdev.c index f9653633a68..86607f7695e 100644 --- a/test/boot/bootdev.c +++ b/test/boot/bootdev.c @@ -247,14 +247,14 @@ static int bootdev_test_hunter(struct unit_test_state *uts) bootdev_list_hunters(std); ut_assert_nextline("Prio Used Uclass Hunter"); ut_assert_nextlinen("----"); - ut_assert_nextline(" 50 ethernet eth_bootdev"); - ut_assert_nextline(" 40 ide ide_bootdev"); - ut_assert_nextline(" 10 mmc mmc_bootdev"); - ut_assert_nextline(" 30 nvme nvme_bootdev"); - ut_assert_nextline(" 30 scsi scsi_bootdev"); - ut_assert_nextline(" 30 spi_flash sf_bootdev"); - ut_assert_nextline(" 40 usb usb_bootdev"); - ut_assert_nextline(" 30 virtio virtio_bootdev"); + ut_assert_nextline(" 6 ethernet eth_bootdev"); + ut_assert_nextline(" 5 ide ide_bootdev"); + ut_assert_nextline(" 2 mmc mmc_bootdev"); + ut_assert_nextline(" 4 nvme nvme_bootdev"); + 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("(total hunters: 8)"); ut_assert_console_end(); @@ -284,17 +284,28 @@ static int bootdev_test_cmd_hunt(struct unit_test_state *uts) ut_assertok(run_command("bootdev hunt -l", 0)); ut_assert_nextline("Prio Used Uclass Hunter"); ut_assert_nextlinen("----"); + ut_assert_nextline(" 6 ethernet eth_bootdev"); + ut_assert_skip_to_line("(total hunters: 8)"); + ut_assert_console_end(); + + /* Use the MMC hunter and see that it updates */ + ut_assertok(run_command("bootdev hunt mmc", 0)); + ut_assertok(run_command("bootdev hunt -l", 0)); + ut_assert_skip_to_line(" 5 ide ide_bootdev"); + ut_assert_nextline(" 2 * mmc mmc_bootdev"); ut_assert_skip_to_line("(total hunters: 8)"); ut_assert_console_end(); /* Scan all hunters */ sandbox_set_eth_enable(false); - + test_set_skip_delays(true); ut_assertok(run_command("bootdev hunt", 0)); ut_assert_nextline("Hunting with: ethernet"); ut_assert_nextline("Hunting with: ide"); ut_assert_nextline("Bus 0: not available "); - ut_assert_nextline("Hunting with: mmc"); + + /* mmc hunter has already been used so should not run again */ + ut_assert_nextline("Hunting with: nvme"); ut_assert_nextline("Hunting with: scsi"); ut_assert_nextline("scanning bus for devices..."); @@ -309,14 +320,14 @@ static int bootdev_test_cmd_hunt(struct unit_test_state *uts) ut_assertok(run_command("bootdev hunt -l", 0)); ut_assert_nextlinen("Prio"); ut_assert_nextlinen("----"); - ut_assert_nextline(" 50 * ethernet eth_bootdev"); - ut_assert_nextline(" 40 * ide ide_bootdev"); - ut_assert_nextline(" 10 * mmc mmc_bootdev"); - ut_assert_nextline(" 30 * nvme nvme_bootdev"); - ut_assert_nextline(" 30 * scsi scsi_bootdev"); - ut_assert_nextline(" 30 * spi_flash sf_bootdev"); - ut_assert_nextline(" 40 * usb usb_bootdev"); - ut_assert_nextline(" 30 * virtio virtio_bootdev"); + ut_assert_nextline(" 6 * ethernet eth_bootdev"); + ut_assert_nextline(" 5 * ide ide_bootdev"); + ut_assert_nextline(" 2 * mmc mmc_bootdev"); + ut_assert_nextline(" 4 * nvme nvme_bootdev"); + 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("(total hunters: 8)"); ut_assert_console_end(); @@ -370,14 +381,14 @@ static int bootdev_test_hunt_prio(struct unit_test_state *uts) test_set_skip_delays(true); console_record_reset_enable(); - ut_assertok(bootdev_hunt_prio(BOOTDEVP_2_SCAN_FAST, false)); + ut_assertok(bootdev_hunt_prio(BOOTDEVP_4_SCAN_FAST, false)); ut_assert_nextline("scanning bus for devices..."); ut_assert_skip_to_line(" Type: Hard Disk"); ut_assert_nextlinen(" Capacity:"); ut_assert_console_end(); /* now try a different priority, verbosely */ - ut_assertok(bootdev_hunt_prio(BOOTDEVP_3_SCAN_SLOW, true)); + ut_assertok(bootdev_hunt_prio(BOOTDEVP_5_SCAN_SLOW, true)); ut_assert_nextline("Hunting with: ide"); ut_assert_nextline("Bus 0: not available "); ut_assert_nextline("Hunting with: usb");