From: "Marek Behún" <kabel@kernel.org>
To: Vladimir Oltean <olteanv@gmail.com>
Cc: netdev@vger.kernel.org, pavana.sharma@digi.com,
vivien.didelot@gmail.com, f.fainelli@gmail.com, kuba@kernel.org,
lkp@intel.com, davem@davemloft.net, ashkan.boldaji@digi.com,
andrew@lunn.ch, Chris Packham <chris.packham@alliedtelesis.co.nz>,
Russell King - ARM Linux admin <linux@armlinux.org.uk>
Subject: Re: [PATCH net-next v14 5/6] net: dsa: mv88e6xxx: Add support for mv88e6393x family of Marvell
Date: Tue, 12 Jan 2021 17:02:26 +0100 [thread overview]
Message-ID: <20210112170226.3f2009bd@kernel.org> (raw)
In-Reply-To: <20210112111139.hp56x5nzgadqlthw@skbuf>
Hi Vladimir,
On Tue, 12 Jan 2021 13:11:39 +0200
Vladimir Oltean <olteanv@gmail.com> wrote:
> On Mon, Jan 11, 2021 at 02:21:55AM +0100, Marek Behún wrote:
> > via which serveral more registers can be accessed indirectly
> ~~~~~~~~
> several
Thanks.
> > +static void mv88e6393x_phylink_validate(struct mv88e6xxx_chip *chip, int port,
> > + unsigned long *mask,
> > + struct phylink_link_state *state)
> > +{
> > + if (port == 0 || port == 9 || port == 10) {
> > + phylink_set(mask, 10000baseT_Full);
> > + phylink_set(mask, 10000baseKR_Full);
>
> I think I understand the reason for declaring 10GBase-KR support in
> phylink_validate, in case the PHY supports that link mode on the media
> side, but...
Hmm, yes, maybe KR shouldn't be here, but then why is it in
mv88e6390x_phylink_validate?
> > case PHY_INTERFACE_MODE_2500BASEX:
> > cmode = MV88E6XXX_PORT_STS_CMODE_2500BASEX;
> > break;
> > + case PHY_INTERFACE_MODE_5GBASER:
> > + cmode = MV88E6393X_PORT_STS_CMODE_5GBASER;
> > + break;
> > case PHY_INTERFACE_MODE_XGMII:
> > case PHY_INTERFACE_MODE_XAUI:
> > cmode = MV88E6XXX_PORT_STS_CMODE_XAUI;
> > @@ -457,6 +569,10 @@ static int mv88e6xxx_port_set_cmode(struct mv88e6xxx_chip *chip, int port,
> > case PHY_INTERFACE_MODE_RXAUI:
> > cmode = MV88E6XXX_PORT_STS_CMODE_RXAUI;
> > break;
> > + case PHY_INTERFACE_MODE_10GBASER:
> > + case PHY_INTERFACE_MODE_10GKR:
>
> Does the SERDES actually support 10GBase-KR (aka 10GBase-R for copper
> backplanes)? It is different than plain 10GBase-R (abusingly called XFI)
> by the need of a link training procedure to negotiate SERDES eye
> parameters. There have been discussion in the past where it turned out
> that drivers which didn't really support 10GBase-KR incorrectly reported
> that they did.
Yes, PHY_INTERFACE_MODE_10GKR should probably not be here. I think some
other drivers still support it because of old device trees, but this
driver does not need to.
> > +static int mv88e6393x_port_policy_write(struct mv88e6xxx_chip *chip, int port,
> > + u16 pointer, u8 data)
> > +{
> > + u16 reg;
> > +
> > + reg = MV88E6393X_PORT_POLICY_MGMT_CTL_UPDATE | pointer | data;
>
> I think the assignment fits on the same line as the declaration?
>
And I think it read better this way. But even if it was not, this
structure of code was copied from mv88e6390_g1_monitor_write in
global1.c, where it is written this way. I prefer this patch to do a
new thing in the same style. If you want, you can then send a patch
that changes it in all places at once.
> > +static int mv88e6393x_serdes_port_config(struct mv88e6xxx_chip *chip, int lane,
> > + bool on)
> > +{
> > + u8 cmode = chip->ports[lane].cmode;
> > + u16 reg, pcs;
> > + int err;
> > +
> > + if (on) {
>
> And if "on" is false? Nothing? Why even pass it as an argument then? Why
> even call mv88e6393x_serdes_port_config?
You are right, I will change it.
Thanks, Vladimir.
next prev parent reply other threads:[~2021-01-12 16:03 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-11 1:21 [PATCH net-next v14 0/6] Add support for mv88e6393x family of Marvell Marek Behún
2021-01-11 1:21 ` [PATCH net-next v14 1/6] dt-bindings: net: Add 5GBASER phy interface Marek Behún
2021-01-11 16:41 ` Andrew Lunn
2021-01-11 1:21 ` [PATCH net-next v14 2/6] net: phy: Add 5GBASER interface mode Marek Behún
2021-01-11 16:48 ` Russell King - ARM Linux admin
2021-01-11 17:49 ` Marek Behún
2021-01-11 1:21 ` [PATCH net-next v14 3/6] net: dsa: mv88e6xxx: Change serdes lane parameter type from u8 type to int Marek Behún
2021-01-12 10:53 ` Vladimir Oltean
2021-01-11 1:21 ` [PATCH net-next v14 4/6] net: dsa: mv88e6xxx: wrap .set_egress_port method Marek Behún
2021-01-11 5:57 ` Pavana Sharma
2021-01-12 10:53 ` Vladimir Oltean
2021-01-11 1:21 ` [PATCH net-next v14 5/6] net: dsa: mv88e6xxx: Add support for mv88e6393x family of Marvell Marek Behún
2021-01-12 11:11 ` Vladimir Oltean
2021-01-12 16:02 ` Marek Behún [this message]
2021-01-12 16:29 ` Russell King - ARM Linux admin
2021-01-12 16:37 ` Marek Behún
2021-01-12 18:06 ` Marek Behún
2021-01-12 21:58 ` Vladimir Oltean
2021-01-13 3:56 ` Marek Behún
2021-01-11 1:21 ` [PATCH net-next v14 6/6] net: dsa: mv88e6xxx: implement .port_set_policy for Amethyst Marek Behún
2021-01-11 6:00 ` Pavana Sharma
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=20210112170226.3f2009bd@kernel.org \
--to=kabel@kernel.org \
--cc=andrew@lunn.ch \
--cc=ashkan.boldaji@digi.com \
--cc=chris.packham@alliedtelesis.co.nz \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=linux@armlinux.org.uk \
--cc=lkp@intel.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pavana.sharma@digi.com \
--cc=vivien.didelot@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.