From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 74E34C3DA78 for ; Sun, 15 Jan 2023 03:08:24 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BC21C85232; Sun, 15 Jan 2023 04:08:21 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=debian.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; secure) header.d=debian.org header.i=@debian.org header.b="bxklO9Rs"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E9B2B85232; Sun, 15 Jan 2023 04:08:20 +0100 (CET) Received: from cascadia.aikidev.net (cascadia.aikidev.net [173.255.214.101]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E850985203 for ; Sun, 15 Jan 2023 04:08:17 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=debian.org Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=vagrant@debian.org Received: from localhost (unknown [IPv6:2600:3c01:e000:21:7:77:0:20]) (Authenticated sender: vagrant@cascadia.debian.net) by cascadia.aikidev.net (Postfix) with ESMTPSA id 6C48F1AB90; Sat, 14 Jan 2023 19:08:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=debian.org; s=1.vagrant.user; t=1673752094; bh=FVuwOg3UPTQqbuO+DCCpZ5aHEQclJB53BmQafiWAltI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=bxklO9Rs6padcWu8oYcjqVvuC6oMnaTgyEJsY1NL25dAUZnVGUz4gksHxMv6voa8o 2UHFQ/s8Gd+b/VJoZWf3JzE2c45ieu3DW0QGueiDXpfPOiI/TZIYZnMY2y75RKVpxD +us9Ob/Et1YICD8TwYcbnluU3XSb8ZvgGiKsBn5UbyqZBA59+KI/M33HXd5cJPLGkn axzzdBa4EsVFF2DhOeFw2kzHHMjBaifqrzrOmOwQwndowLxHeEwVTkxSnqrjxhQYvr PP1gruhRAVKygruNMfbspygaUeKbjwJLYAwfZvtthn4NvdWeZz8MpB2/EpOB5APEwa slVvHFNy0RfEA== From: Vagrant Cascadian To: Simon Glass , U-Boot Mailing List Cc: Tom Rini , Simon Glass , Karsten Merker , Heinrich Schuchardt Subject: Re: [PATCH v2] vbe: Allow probing the VBE bootmeth to fail in OS fixup In-Reply-To: <20230112234854.936325-1-sjg@chromium.org> References: <20230112234854.936325-1-sjg@chromium.org> Date: Sat, 14 Jan 2023 19:08:09 -0800 Message-ID: <87v8l8v6jq.fsf@contorta> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" 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 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On 2023-01-12, Simon Glass wrote: > This device is created when there are no bootmeths defined in the device > tree. But it cannot be probed without a device tree node. > > For now, ignore a probe failure. > > Signed-off-by: Simon Glass > Reported-by: Karsten Merker > Suggested-by: Heinrich Schuchardt > Fixes: a56f663f0707 ("vbe: Add info about the VBE device to the fwupd nod= e") I was able to reproduce the issue using the qemu-riscv64 instructions Karsten provided, and applying the patch fixes it, thanks! Tested-by: Vagrant Cascadian live well, vagrant > --- > > Changes in v2: > - With 'with' typo > - Change to a debug message and add a comment > > boot/vbe_simple_os.c | 16 ++++++++++++---- > 1 file changed, 12 insertions(+), 4 deletions(-) > > diff --git a/boot/vbe_simple_os.c b/boot/vbe_simple_os.c > index b2041a95a30..8c641ec07e2 100644 > --- a/boot/vbe_simple_os.c > +++ b/boot/vbe_simple_os.c > @@ -72,6 +72,18 @@ static int bootmeth_vbe_simple_ft_fixup(void *ctx, str= uct event *event) > chosen =3D oftree_path(tree, "/chosen"); > if (!ofnode_valid(chosen)) > continue; > + > + ret =3D device_probe(dev); > + if (ret) { > + /* > + * This should become an error when VBE is updated to > + * only bind this device when a node exists > + */ > + log_debug("VBE device '%s' failed to probe (err=3D%d)", > + dev->name, ret); > + return 0; > + } > + > ret =3D ofnode_add_subnode(chosen, "fwupd", &node); > if (ret && ret !=3D -EEXIST) > return log_msg_ret("fwu", ret); > @@ -80,10 +92,6 @@ static int bootmeth_vbe_simple_ft_fixup(void *ctx, str= uct event *event) > if (ret && ret !=3D -EEXIST) > return log_msg_ret("dev", ret); >=20=20 > - ret =3D device_probe(dev); > - if (ret) > - return log_msg_ret("probe", ret); > - > /* Copy over the vbe properties for fwupd */ > log_debug("Fixing up: %s\n", dev->name); > ret =3D ofnode_copy_props(dev_ofnode(dev), subnode); --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCY8NuGgAKCRDcUY/If5cW qqAJAP9WeH/ztYYfIGY/CtrI1qmlNs+Huxet++/wjE/bp1cMgwD+J73ujFcI37Xl +mAdGfKYtjsLJwo47kJ3O6lonifVrA8= =3G0l -----END PGP SIGNATURE----- --=-=-=--