From: Vagrant Cascadian <vagrant@debian.org>
To: Simon Glass <sjg@chromium.org>,
U-Boot Mailing List <u-boot@lists.denx.de>
Cc: Tom Rini <trini@konsulko.com>, Simon Glass <sjg@chromium.org>,
Karsten Merker <merker@debian.org>,
Heinrich Schuchardt <xypron.glpk@gmx.de>
Subject: Re: [PATCH v2] vbe: Allow probing the VBE bootmeth to fail in OS fixup
Date: Sat, 14 Jan 2023 19:08:09 -0800 [thread overview]
Message-ID: <87v8l8v6jq.fsf@contorta> (raw)
In-Reply-To: <20230112234854.936325-1-sjg@chromium.org>
[-- Attachment #1: Type: text/plain, Size: 2070 bytes --]
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 <sjg@chromium.org>
> Reported-by: Karsten Merker <merker@debian.org>
> Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Fixes: a56f663f0707 ("vbe: Add info about the VBE device to the fwupd node")
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 <vagrant@debian.org>
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, struct event *event)
> chosen = oftree_path(tree, "/chosen");
> if (!ofnode_valid(chosen))
> continue;
> +
> + ret = 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=%d)",
> + dev->name, ret);
> + return 0;
> + }
> +
> ret = ofnode_add_subnode(chosen, "fwupd", &node);
> if (ret && ret != -EEXIST)
> return log_msg_ret("fwu", ret);
> @@ -80,10 +92,6 @@ static int bootmeth_vbe_simple_ft_fixup(void *ctx, struct event *event)
> if (ret && ret != -EEXIST)
> return log_msg_ret("dev", ret);
>
> - ret = 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 = ofnode_copy_props(dev_ofnode(dev), subnode);
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
next prev parent reply other threads:[~2023-01-15 3:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-12 23:48 [PATCH v2] vbe: Allow probing the VBE bootmeth to fail in OS fixup Simon Glass
2023-01-15 3:08 ` Vagrant Cascadian [this message]
2023-01-15 20:46 ` Karsten Merker
2023-01-19 14:45 ` Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v8l8v6jq.fsf@contorta \
--to=vagrant@debian.org \
--cc=merker@debian.org \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=xypron.glpk@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox