From: "Marek Behún" <kabel@kernel.org>
To: Roman Bacik <roman.bacik@broadcom.com>
Cc: U-Boot Mailing List <u-boot@lists.denx.de>,
Bharat Gooty <bharat.gooty@broadcom.com>,
Joe Hershberger <joe.hershberger@ni.com>,
Ramon Fried <rfried.dev@gmail.com>
Subject: Re: [PATCH v2 1/2] net: brcm: netXtreme driver
Date: Mon, 25 Oct 2021 15:58:38 +0200 [thread overview]
Message-ID: <20211025155838.7b243f1f@thinkpad> (raw)
In-Reply-To: <20211022162222.v2.1.I1edaad77041c1300213c307eef6741499504047@changeid>
NAK for this driver.
- display_banner() spams the output unnecessarily, the information
should be printed with debug()
- you are introducing custom mechanism for setting / getting PHY
parameters, via custom specific env variables, for example in the
set_phy_speed() and set_phy_link() functions, i.e.:
sprintf(name1, "bnxt_eth%u_phy_speed", bp->cardnum);
env_set(name1, name);
The whole point of several people in the past few years was to create
generic mechanisms for such things. We have ethernet PHY DM class,
you should use this. That way you won't need to introduce custom
mechanisms to get the infromation, since there are mii/mdio commands.
- print_mac() - the driver shouldn't even have this function, it should
just set appropriate ethNaddr variable
- in bnxt_eth_probe() you are looking at the variable "ethaddr":
if (env_get("ethaddr"))
secondary = 1;
a driver should never look itself at this variable.
Since your driver should be of UCLASS_ETH, the generic mechanism
should use appropriate env variable by calling you .write_hwaddr
method
Basically you are going against all the points of the whole idea to
have a generic API to set network driver parameters, and instead you
are adding driver-specific custom mechanisms.
Please change that in next version.
Marek
next prev parent reply other threads:[~2021-10-25 13:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-22 23:23 [PATCH v2 1/2] net: brcm: netXtreme driver Roman Bacik
2021-10-22 23:23 ` [PATCH v2 2/2] cmd: brcm: netXtreme commands Roman Bacik
2021-10-23 8:02 ` Heinrich Schuchardt
2021-10-25 16:54 ` Roman Bacik
2021-10-25 14:01 ` Marek Behún
2021-10-25 16:34 ` Roman Bacik
2021-10-25 13:58 ` Marek Behún [this message]
2021-10-25 21:35 ` [PATCH v2 1/2] net: brcm: netXtreme driver Roman Bacik
2021-10-25 22:22 ` Marek Behún
2021-10-25 22:31 ` Roman Bacik
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=20211025155838.7b243f1f@thinkpad \
--to=kabel@kernel.org \
--cc=bharat.gooty@broadcom.com \
--cc=joe.hershberger@ni.com \
--cc=rfried.dev@gmail.com \
--cc=roman.bacik@broadcom.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