From: Andrew Lunn <andrew@lunn.ch>
To: "Marek Behún" <marek.behun@nic.cz>
Cc: netdev@vger.kernel.org, Florian Fainelli <f.fainelli@gmail.com>,
David Miller <davem@davemloft.net>
Subject: Re: [PATCH net-next v1 1/2] net: dsa: mv88e6xxx: Default CMODE to 1000BaseX only on 6390X
Date: Thu, 24 Jan 2019 17:11:47 +0100 [thread overview]
Message-ID: <20190124161147.GG482@lunn.ch> (raw)
In-Reply-To: <20190124154309.24987-1-marek.behun@nic.cz>
On Thu, Jan 24, 2019 at 04:43:08PM +0100, Marek Behún wrote:
> Commit 787799a9d555 sets the SERDES interfaces of 6390 and 6390X to
> 1000BaseX, but this is only needed on 6390X, since there are SERDES
> interfaces which can be used on lower ports on 6390.
>
> This commit fixes this by returning to previous behaviour on 6390.
> (Previous behaviour means that CMODE is not set at all if requested mode
> is NA).
>
> This is needed on Turris MOX, where the 88e6190 is connected to CPU in
> 2500BaseX mode.
>
> Fixes: 787799a9d555 ("net: dsa: mv88e6xxx: Default ports 9/10 6390X CMODE to 1000BaseX")
> Signed-off-by: Marek Behún <marek.behun@nic.cz>
> ---
> drivers/net/dsa/mv88e6xxx/port.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/net/dsa/mv88e6xxx/port.c b/drivers/net/dsa/mv88e6xxx/port.c
> index ebd26b6a93e6..ee7029f4ee22 100644
> --- a/drivers/net/dsa/mv88e6xxx/port.c
> +++ b/drivers/net/dsa/mv88e6xxx/port.c
> @@ -444,6 +444,8 @@ int mv88e6390_port_set_cmode(struct mv88e6xxx_chip *chip, int port,
> phy_interface_t mode)
> {
> switch (mode) {
> + case PHY_INTERFACE_MODE_NA:
> + return 0;
Hi Marek
Although the previous behaviour might of allowed the cmode to be NA,
i'm not sure that is a good idea. How do you know the port actually is
using 2500BaseX, and not SGMII for example?
You really should set the interface mode in the device tree file, so
you know it does have the value you want.
Andrew
next prev parent reply other threads:[~2019-01-24 16:11 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-24 15:43 [PATCH net-next v1 1/2] net: dsa: mv88e6xxx: Default CMODE to 1000BaseX only on 6390X Marek Behún
2019-01-24 15:43 ` [PATCH net-next v1 2/2] net: dsa: mv88e6xxx: Fix phylink_validate for Topaz family Marek Behún
2019-01-24 16:01 ` Andrew Lunn
2019-01-24 16:11 ` Andrew Lunn [this message]
2019-01-24 16:29 ` [PATCH net-next v1 1/2] net: dsa: mv88e6xxx: Default CMODE to 1000BaseX only on 6390X Marek Behun
2019-01-24 16:48 ` Andrew Lunn
2019-01-24 18:04 ` Marek Behun
2019-01-24 18:11 ` Andrew Lunn
2019-01-24 19:24 ` Marek Behun
2019-01-24 19:27 ` Florian Fainelli
2019-01-24 19:31 ` Andrew Lunn
2019-01-24 19:37 ` Marek Behun
2019-01-24 19:56 ` Florian Fainelli
2019-01-24 19:39 ` Marek Behun
2019-01-25 18:48 ` Florian Fainelli
2019-01-25 19:25 ` Marek Behun
2019-01-28 20:34 ` Florian Fainelli
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=20190124161147.GG482@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=marek.behun@nic.cz \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).