From: Xavier Drudis Ferran <xdrudis@tinet.cat>
To: Marek Vasut <marex@denx.de>
Cc: Xavier Drudis Ferran <xdrudis@tinet.cat>,
"u-boot@lists.denx.de" <u-boot@lists.denx.de>,
Simon Glass <sjg@chromium.org>, Lukasz Majewski <lukma@denx.de>,
Sean Anderson <seanga2@gmail.com>,
Suneel Garapati <suneelglinux@gmail.com>,
Bin Meng <bmeng.cn@gmail.com>
Subject: Re: [SPAM] Re: [PATCH] cmd: usb: Prevent reset in usb tree/info command
Date: Tue, 20 Jun 2023 12:43:46 +0200 [thread overview]
Message-ID: <ZJGC4lOvMLI4ZqD7@xdrudis.tinet.cat> (raw)
In-Reply-To: <80a1073c-34c0-c5f6-3f27-c8bfa0e3c20b@denx.de>
El Tue, Jun 20, 2023 at 11:49:36AM +0200, Marek Vasut deia:
>
> Default, see:
> $ git grep CONFIG_BOOTCOMMAND configs/
>
I'm lost.
I called default what Kconfig used as default.
You seem to call default what's in board specific config files.
Whatever. Fix the wording in the commit message if you like.
>
> So, what is the minimal test case ?
> I have been asking for that for a while.
>
I sent a minimal test case last week.
https://lists.denx.de/pipermail/u-boot/2023-June/520109.html
You build for a Rock Pi 4 board, boot with usb stick and no boot media
and run usb info and you get a reset.
I won't send it again because I can't guess what you consider minimal.
>
> I would really like a minimal test case. Empty your env and figure out the
> commands which need to be executed to trigger this. Without any interference
> from other commands/scripting/...
>
I'm sorry but if what I sent isn't enough I don't think I'll have time
to help you any further. Find your minimal test case yourself or
ignore my patch.
> > If it's just that you can't reproduce it, can you try to ?:
> >
> > - set up a board with no boot media (I tested like this but it might
> > not be needed),
> >
> > - put usb in boot_targets (if you put only usb there you may not need
> > the previous step):
> > setenv boot_targets usb
>
> Here you assume distro bootcommand or some such . Can we remove that
> assumption ? (I think yes, and we should)
>
I don't think I'm assuming anything about bootcommand. That's
precisely why I wrote these steps instead of the "just boot a Rock Pi
4" scenario last week.
The commit message talks about bootcmd because it justifies
that the bootflow scan will be called automatically in some cases,
so the bug has more impact that it would otherwise have.
But the bug should appear whether or not you have bootcmd.
The bug should be an interaction between what bootflow scan does
and what usb info or usb tree do.
I'm assuming bootflow reads the boot_targets environment variable to
know where it searches for boot devices, and therefore to which
devices it will attach a UCLASS_BOOTDEV child to some devices, in
particular to usb mass storage devices if any is present, that will
later break usb info/usb tree. Whether bootflow is called from bootcmd
or not should be irrelevant.
If you follow the code from the bootflow command you may find
yourself that the boot_targets variable is involved. I did it
last week or sometime and won't do it again now for you, sorry.
I know I may have misunderstood something, and I'm sorry for the
noise if so.
> > - plug a non-booting usb mass storage device to an usb port,
> >
> > - run usb reset in case you already had usb initialized at boot, or
> > skip this if usb is not initialized yet. If in doubt, run usb reset.
> >
> > - run bootflow scan
> >
> > - run usb info
> >
> > It should list some devices, but give you a reset just after listing the
> > usb mass storage device without my patch, and it should just list all
> > usb devices and go back to the prompt with my patch.
>
> Does it crash if you empty your env and run simply
>
> => usb reset ; bootflow scan ; usb info
>
> ?
I guess it won't crash if environment var boot_targets is absent or
empty. Or even if it's full but has no "usb" in it. But I'm not sure
anymore at what time the variable is read, so it might be that
emptying it when bootflow structures are already set up wouldn't
change things, I don't know, I don't remember.
But I won't try it, sorry.
I found a bug, I sent a 4 line patch. Since I didn't justify it
enough I sent followup mails on how to reproduce.
This week I sent a second version, with redundant measures to seek
consensus. It's a 6 line patch or 8 or whatever.
I didn't write bootflow, and I didn't write cmd/usb.c
And I don't have time to keep writing long emails. I'm sorry. Not
even to count how many lines of text I wrote compared to the 8 lines
of code or whatever. If someone has the bureaucratic skills and
patience to pursue this further, they can do what they want with my
patch (under GPL2 as implied by the sign off). If not, you all can
keep your bugs, I won't try anymore to steal them.
Bye and sorry for any disturbances.
next prev parent reply other threads:[~2023-06-20 10:44 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <ZJAqKxrO7qa8r6Kq@xdrudis.tinet.cat>
2023-06-19 21:49 ` [PATCH] cmd: usb: Prevent reset in usb tree/info command Marek Vasut
2023-06-20 9:17 ` Xavier Drudis Ferran
2023-06-20 9:49 ` Marek Vasut
2023-06-20 10:43 ` Xavier Drudis Ferran [this message]
2023-06-20 23:08 ` [SPAM] " Marek Vasut
2023-06-05 15:20 Xavier Drudis Ferran
2023-06-07 22:05 ` Marek Vasut
2023-06-08 7:39 ` Xavier Drudis Ferran
2023-06-09 1:20 ` Marek Vasut
[not found] ` <ZILsTOaXliizQjiH@xdrudis.tinet.cat>
2023-06-09 18:52 ` [SPAM] " Xavier Drudis Ferran
2023-06-11 12:29 ` Marek Vasut
2023-06-12 21:17 ` Simon Glass
2023-06-13 6:42 ` Xavier Drudis Ferran
2023-06-13 6:52 ` Xavier Drudis Ferran
2023-06-13 14:58 ` Simon Glass
2023-06-13 16:04 ` Xavier Drudis Ferran
2023-06-13 20:12 ` Simon Glass
2023-06-14 8:40 ` Xavier Drudis Ferran
2023-06-20 10:03 ` Simon Glass
2023-06-20 11:20 ` Xavier Drudis Ferran
2023-06-20 14:36 ` Simon Glass
2023-06-20 0:50 ` Marek Vasut
2023-06-20 7:03 ` Xavier Drudis Ferran
2023-06-20 9:13 ` Marek Vasut
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=ZJGC4lOvMLI4ZqD7@xdrudis.tinet.cat \
--to=xdrudis@tinet.cat \
--cc=bmeng.cn@gmail.com \
--cc=lukma@denx.de \
--cc=marex@denx.de \
--cc=seanga2@gmail.com \
--cc=sjg@chromium.org \
--cc=suneelglinux@gmail.com \
--cc=u-boot@lists.denx.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