Message ID | 20220210081124.86612-8-takahiro.akashi@linaro.org |
---|---|
State | Changes Requested, archived |
Delegated to: | Heinrich Schuchardt |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=aDLUm+3+; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JvTzC0HJPz9s5B for <incoming@patchwork.ozlabs.org>; Thu, 10 Feb 2022 19:13:42 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 757B081A03; Thu, 10 Feb 2022 09:12:59 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="aDLUm+3+"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F41088309D; Thu, 10 Feb 2022 09:12:55 +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,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) (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 D89968321B for <u-boot@lists.denx.de>; Thu, 10 Feb 2022 09:12:38 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=takahiro.akashi@linaro.org Received: by mail-pf1-x42d.google.com with SMTP id d187so8875657pfa.10 for <u-boot@lists.denx.de>; Thu, 10 Feb 2022 00:12:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rPa/7DDkj4iBuuTqq6EESbf96QBNWiHX8VcQZUMtLjo=; b=aDLUm+3+Yz7cW+SNMPY52K2jnSS23UDTtYa+OPiM8m6EceAkiCb6nWevD4fhYnVJlX 9uZEe7zNisvBtIB/P/GUVIGLSiB4FJpvMUoUtf3zZGOKXsBdOwHnZR7Lashsm+B0qpm4 krV3GStIc8iGuCTborWjCPgKQupvJdHMIW47NkGho0igELcyyHCsmBANEsqNQxjtzXbg pouIRHYfLlCy3d+/nWWHtq8UOA+mRH3iFMN64Fw9LLH6ymdpXghqxg/8syTpt5vs+0Cw UiajjUSPNkt6Vzxo1LD3zA+AULHNCz4IPyWcHSiHWQSJhSgTzA8+skFyLPnE+x6xNr13 yFbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rPa/7DDkj4iBuuTqq6EESbf96QBNWiHX8VcQZUMtLjo=; b=gFMlVA2ehWfJ4kXCR/I3TXElcP0gBoQn2OQeWyk9rGnIeZ2QHYfnp/3upteYi0OHrt nQJoZ85q6O8iPDAu1BeKxFKzsM3obGov2AkMPqCWg5ajf07X+3fjk1+vDmO/6xiwLU3j g+AR8NpiHtZwPvpeh/GXKtn55biMipMXqMpFbEH8Pt22POVuyVGl+PxWlN19MWaNycRX QvTniL7gvYMW4AaA/UUy9Q4IKTEH6YKeVYl+jV8hNebnHUbzjQ74WJZ/609diYygGKmY r+7eVkuPMMNcLl1SHtwZuolZ5XZJ4vEUpYGcJBEwe0iRGFNrd7Z0wX1uxrI78Ox8odek sm8Q== X-Gm-Message-State: AOAM532ZAQqdniHDVcor83qYkrJnrH+duIQMwM82B1OFL2/LXCdBgURm vuw+1xV7WUG05PSvTtm0+5Psow== X-Google-Smtp-Source: ABdhPJywMNxdxp1RHrNmiVdu3iHEvHg3oQX4QrUZspL2RBi9nOJqBjV+nYiDYb67vUXzmbMou2QwMg== X-Received: by 2002:a05:6a00:2305:: with SMTP id h5mr6460979pfh.13.1644480757246; Thu, 10 Feb 2022 00:12:37 -0800 (PST) Received: from localhost.localdomain ([2400:4050:c3e1:100:412e:384:fab9:f24]) by smtp.gmail.com with ESMTPSA id lk8sm1529208pjb.40.2022.02.10.00.12.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Feb 2022 00:12:36 -0800 (PST) From: AKASHI Takahiro <takahiro.akashi@linaro.org> To: lukma@denx.de, peng.fan@nxp.com, jh80.chung@samsung.com, bmeng.cn@gmail.com, peng.ma@nxp.com, sr@denx.de, xypron.glpk@gmx.de, sjg@chromium.org, ilias.apalodimas@linaro.org Cc: masami.hiramatsu@linaro.org, u-boot@lists.denx.de, AKASHI Takahiro <takahiro.akashi@linaro.org> Subject: [PATCH v2 07/20] virtio: call device_probe() in scanning Date: Thu, 10 Feb 2022 17:11:11 +0900 Message-Id: <20220210081124.86612-8-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220210081124.86612-1-takahiro.akashi@linaro.org> References: <20220210081124.86612-1-takahiro.akashi@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean |
Series |
efi_loader: more tightly integrate UEFI disks to driver model
|
expand
|
diff --git a/cmd/virtio.c b/cmd/virtio.c index 3dace5344f7e..ea3ed2e631e4 100644 --- a/cmd/virtio.c +++ b/cmd/virtio.c @@ -17,8 +17,25 @@ static int do_virtio(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { if (argc == 2 && !strcmp(argv[1], "scan")) { - /* make sure all virtio devices are enumerated */ - virtio_init(); + /* + * make sure all virtio devices are enumerated. + * Do the same as virtio_init(), but also call + * device_probe() for children (i.e. virtio devices) + */ + struct udevice *bus, *child; + int ret; + + ret = uclass_first_device(UCLASS_VIRTIO, &bus); + if (ret) + return CMD_RET_FAILURE; + + while (bus) { + device_foreach_child_probe(child, bus) + ; + ret = uclass_next_device(&bus); + if (ret) + break; + } return CMD_RET_SUCCESS; }