From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
To: Antoine Tenart <antoine.tenart@bootlin.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com,
maxime.chevallier@bootlin.com, gregory.clement@bootlin.com,
miquel.raynal@bootlin.com, nadavh@marvell.com,
stefanc@marvell.com, ymarkman@marvell.com, mw@semihalf.com
Subject: Re: [PATCH net-next 10/13] net: mvpp2: reset the XPCS while reconfiguring the serdes lanes
Date: Fri, 15 Feb 2019 17:12:24 +0000 [thread overview]
Message-ID: <20190215171224.sjfrid5csseywuks@shell.armlinux.org.uk> (raw)
In-Reply-To: <20190215153241.6857-11-antoine.tenart@bootlin.com>
On Fri, Feb 15, 2019 at 04:32:38PM +0100, Antoine Tenart wrote:
> The documentation advises to set the XPCS in reset while reconfiguring
> the serdes lanes. This seems to be a good thing to do, but the PPv2
> driver wasn't doing it. This patch fixes it.
Hmm. That statment seems to have some ambiguity in it - we do two
"reconfigurations" - one may be upon initialisation, where the lane
is already configured for 10Gbase-KR, and we're re-initialising it
for the same mode. The other case is when we're switching between
10Gbase-KR and SGMII, or as will be the case with 2.5G support for
the Alaska PHYs, 2500base-X.
Does this apply to reconfiguration of the serdes lane between
10Gbase-KR and slower modes?
>
> Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
> ---
> drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 1 +
> drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 8 +++++++-
> 2 files changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2.h b/drivers/net/ethernet/marvell/mvpp2/mvpp2.h
> index 21ddcac1ceea..7380bddc53b8 100644
> --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2.h
> +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2.h
> @@ -481,6 +481,7 @@
> /* XPCS registers. PPv2.2 only */
> #define MVPP22_XPCS_BASE(port) (0x7400 + (port) * 0x1000)
> #define MVPP22_XPCS_CFG0 0x0
> +#define MVPP22_XPCS_CFG0_RESET_DIS BIT(0)
> #define MVPP22_XPCS_CFG0_PCS_MODE(n) ((n) << 3)
> #define MVPP22_XPCS_CFG0_ACTIVE_LANE(n) ((n) << 5)
>
> diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
> index 4a18f8e54c90..5d05306e79a8 100644
> --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
> +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
> @@ -1016,13 +1016,19 @@ static void mvpp22_gop_init_10gkr(struct mvpp2_port *port)
> void __iomem *xpcs = priv->iface_base + MVPP22_XPCS_BASE(port->gop_id);
> u32 val;
>
> - /* XPCS */
> + /* XPCS : Reset the XPCS when reconfiguring the lanes */
> + val = readl(xpcs + MVPP22_XPCS_CFG0);
> + writel(val & ~MVPP22_XPCS_CFG0_RESET_DIS, xpcs + MVPP22_XPCS_CFG0);
> +
> val = readl(xpcs + MVPP22_XPCS_CFG0);
> val &= ~(MVPP22_XPCS_CFG0_PCS_MODE(0x3) |
> MVPP22_XPCS_CFG0_ACTIVE_LANE(0x3));
> val |= MVPP22_XPCS_CFG0_ACTIVE_LANE(2);
> writel(val, xpcs + MVPP22_XPCS_CFG0);
>
> + val = readl(xpcs + MVPP22_XPCS_CFG0);
> + writel(val | MVPP22_XPCS_CFG0_RESET_DIS, xpcs + MVPP22_XPCS_CFG0);
> +
> /* MPCS */
> val = readl(mpcs + MVPP22_MPCS_CTRL);
> val &= ~MVPP22_MPCS_CTRL_FWD_ERR_CONN;
> --
> 2.20.1
>
>
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up
next prev parent reply other threads:[~2019-02-15 17:12 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-15 15:32 [PATCH net-next 00/13] net: mvpp2: various fixes Antoine Tenart
2019-02-15 15:32 ` [PATCH net-next 01/13] net: mvpp2: do not call phylink_mac_change if there is no event Antoine Tenart
2019-02-15 17:05 ` Russell King - ARM Linux admin
2019-02-18 10:40 ` Antoine Tenart
2019-02-15 15:32 ` [PATCH net-next 02/13] net: mvpp2: a port can be disabled even if we use the link IRQ Antoine Tenart
2019-02-15 15:32 ` [PATCH net-next 03/13] net: mvpp2: do not disable the port if the mode hasn't changed Antoine Tenart
2019-02-15 15:32 ` [PATCH net-next 04/13] net: mvpp2: reconfiguring the port interface is PPv2.2 specific Antoine Tenart
2019-02-15 15:32 ` [PATCH net-next 05/13] net: mvpp2: do not set the XLG MAC in reset when disabling a port Antoine Tenart
2019-02-15 15:32 ` [PATCH net-next 06/13] net: mvpp2: fix a typo in the header Antoine Tenart
2019-02-15 15:32 ` [PATCH net-next 07/13] net: mvpp2: fix validate for PPv2.1 Antoine Tenart
2019-02-15 15:32 ` [PATCH net-next 08/13] net: mvpp2: fix the computation of the RXQs Antoine Tenart
2019-02-15 15:32 ` [PATCH net-next 09/13] net: mvpp2: update the port documentation regarding the GoP Antoine Tenart
2019-02-15 15:32 ` [PATCH net-next 10/13] net: mvpp2: reset the XPCS while reconfiguring the serdes lanes Antoine Tenart
2019-02-15 17:12 ` Russell King - ARM Linux admin [this message]
2019-02-15 17:23 ` Stefan Chulski
2019-02-18 10:26 ` Antoine Tenart
2019-02-18 10:43 ` Russell King - ARM Linux admin
2019-02-18 10:47 ` Russell King - ARM Linux admin
2019-02-18 10:52 ` Antoine Tenart
2019-02-18 11:08 ` [EXT] " Stefan Chulski
2019-02-18 11:28 ` Russell King - ARM Linux admin
2019-02-18 11:33 ` Stefan Chulski
2019-02-18 10:50 ` Antoine Tenart
2019-02-15 15:32 ` [PATCH net-next 11/13] net: mvpp2: reset the XLG MAC in port_reset Antoine Tenart
2019-02-15 15:32 ` [PATCH net-next 12/13] net: mvpp2: fix alignment of MVPP2_GMAC_CONFIG_MII_SPEED definition Antoine Tenart
2019-02-15 15:32 ` [PATCH net-next 13/13] net: mvpp2: some AN fields require the link to be down when updated Antoine Tenart
2019-02-17 21:23 ` [PATCH net-next 00/13] net: mvpp2: various fixes David Miller
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=20190215171224.sjfrid5csseywuks@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=antoine.tenart@bootlin.com \
--cc=davem@davemloft.net \
--cc=gregory.clement@bootlin.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maxime.chevallier@bootlin.com \
--cc=miquel.raynal@bootlin.com \
--cc=mw@semihalf.com \
--cc=nadavh@marvell.com \
--cc=netdev@vger.kernel.org \
--cc=stefanc@marvell.com \
--cc=thomas.petazzoni@bootlin.com \
--cc=ymarkman@marvell.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 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).