From: "Marek Behún" <kabel@kernel.org>
To: Roman Bacik <roman.bacik@broadcom.com>
Cc: Simon Glass <sjg@chromium.org>,
U-Boot Mailing List <u-boot@lists.denx.de>,
Bharat Gooty <bharat.gooty@broadcom.com>,
Aswath Govindraju <a-govindraju@ti.com>,
Bin Meng <bmeng.cn@gmail.com>,
Franck LENORMAND <franck.lenormand@nxp.com>,
Heinrich Schuchardt <xypron.glpk@gmx.de>,
Kory Maincent <kory.maincent@bootlin.com>,
Michal Simek <michal.simek@xilinx.com>,
Patrick Delaunay <patrick.delaunay@foss.st.com>,
Peng Fan <peng.fan@nxp.com>,
Priyanka Jain <priyanka.jain@nxp.com>,
Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>,
Sean Anderson <sean.anderson@seco.com>
Subject: Re: [PATCH v3 2/2] cmd: brcm: netXtreme commands
Date: Tue, 26 Oct 2021 18:49:50 +0200 [thread overview]
Message-ID: <20211026184950.47bcd1af@thinkpad> (raw)
In-Reply-To: <CAGQAs7zd0-PU9k6-5X_qf154OH5=NMsv3j_PPovesvxWX2yT_w@mail.gmail.com>
On Tue, 26 Oct 2021 09:02:54 -0700
Roman Bacik <roman.bacik@broadcom.com> wrote:
> On Tue, Oct 26, 2021 at 8:55 AM Marek Behún <kabel@kernel.org> wrote:
> >
> > On Tue, 26 Oct 2021 08:14:28 -0700
> > Roman Bacik <roman.bacik@broadcom.com> wrote:
> >
> > > Hi Marek,
> > >
> > > We do not want this driver to be automatically probed. It is not needed
> > > all the time and also slows down the boot time. We have stripped down
> > > everything else to bare minimum.
> > > Thanks,
> > >
> > > Roman
> >
> > Hi Roman,
> >
> > OK, that is reasonable, but not reasonable enough to introduce a new
> > vendor specific command.
> >
> > Still NAK.
> >
> > So you have the bnxt_drv_probe method defined in the driver, but you
> > don't set a pointer to it into the U_BOOT_DRIVER structure, and instead
> > you call this method when "brcm probe" command is called.
> >
> > I think this introduction of another vendor specific command is wrong.
> >
> > If probing takes too much time and should be done only when the device
> > is needed, there are 2 things you could do:
> >
> > - you can create new driver flag saying that the device should be
> > probeb only when needed, wire necessary code and add this flag to your
> > driver (this could get very complicated, though)
> > - you can do minimum stuff in probe method, and move the stuff that
> > takes long time into bnxt_start(), which is called only when network
> > via this ethernet controller is requested for by U-Boot commands.
>
> So renaming bnxt probe/remove to bnxt start/stop will do, right?
No. The whole idea of adding the new "bnxt" command is wrong, because
the command is *vendor specific*. The ethernet controller should work
out of the box with standard U-Boot commands, i.e. it if I use the
dhcp
command, it should work, without needing to call the "bnxt" command.
> >
> > Also, you're still doing
> >
> > + if (env_get("ethaddr"))
> > + secondary = 1;
>
> Why can't we access the env variable from our "bnxt start" method? Is
> there a blacklist of env variables one must not access from a driver?
Because the "ethaddr" variable is the MAC address of the 0-th ethernet
controller on the board, which does not have anything to do with yout
broadcom netXtreme controller, unless your broadcom netXtreme
controller is the zero-th ethernet controller on the board.
For example if I connect you controller to the PCIe slot on Turris
Omnia, where there are 3 ethernet controllers already, and their MAC
addresses are stored in
ethaddr
eth1addr
eth2addr
the MAC address of the netXtreme controller would be stored in variable
eth3addr
So in your UCLASS_ETH driver, you should only look at
dev_seq(dev)
ethaddr, by using
eth_env_get/set_enetaddr_by_index("eth", dev_seq(dev), ...);
Marek
next prev parent reply other threads:[~2021-10-26 16:50 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-25 23:44 [PATCH v3 1/2] net: brcm: netXtreme driver Roman Bacik
2021-10-25 23:44 ` [PATCH v3 2/2] cmd: brcm: netXtreme commands Roman Bacik
2021-10-26 13:17 ` Marek Behún
2021-10-26 15:14 ` Roman Bacik
2021-10-26 15:55 ` Marek Behún
2021-10-26 16:02 ` Roman Bacik
2021-10-26 16:40 ` Roman Bacik
2021-10-26 16:52 ` Marek Behún
2021-10-26 16:59 ` Roman Bacik
2021-10-26 16:49 ` Marek Behún [this message]
2021-10-27 15:05 ` Roman Bacik
2021-10-27 15:41 ` Simon Glass
2021-10-27 16:05 ` Roman Bacik
2021-10-27 16:35 ` Marek Behún
2021-10-27 16:47 ` Roman Bacik
2021-10-27 17:02 ` Roman Bacik
2021-10-27 17:39 ` Marek Behún
2021-10-27 17:58 ` Roman Bacik
2021-10-27 18:02 ` Marek Behún
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=20211026184950.47bcd1af@thinkpad \
--to=kabel@kernel.org \
--cc=a-govindraju@ti.com \
--cc=bharat.gooty@broadcom.com \
--cc=bmeng.cn@gmail.com \
--cc=franck.lenormand@nxp.com \
--cc=kory.maincent@bootlin.com \
--cc=michal.simek@xilinx.com \
--cc=patrick.delaunay@foss.st.com \
--cc=peng.fan@nxp.com \
--cc=priyanka.jain@nxp.com \
--cc=rayagonda.kokatanur@broadcom.com \
--cc=roman.bacik@broadcom.com \
--cc=sean.anderson@seco.com \
--cc=sjg@chromium.org \
--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