* [PATCH net 1/2] net: mvpp2: Fix GoP port 3 Networking Complex Control configurations
@ 2020-12-15 13:32 stefanc
2020-12-15 13:32 ` [PATCH net 2/2] net: mvpp2: disable force link UP during port init procedure stefanc
2020-12-17 0:42 ` [PATCH net 1/2] net: mvpp2: Fix GoP port 3 Networking Complex Control configurations Jakub Kicinski
0 siblings, 2 replies; 4+ messages in thread
From: stefanc @ 2020-12-15 13:32 UTC (permalink / raw)
To: netdev
Cc: thomas.petazzoni, davem, nadavh, ymarkman, linux-kernel, stefanc,
kuba, linux, mw, andrew, rmk+kernel
From: Stefan Chulski <stefanc@marvell.com>
During GoP port 2 Networking Complex Control mode of operation configurations,
also GoP port 3 mode of operation was wrongly set mode.
Patch removes these configurations.
GENCONF_CTRL0_PORTX naming also fixed.
Signed-off-by: Stefan Chulski <stefanc@marvell.com>
---
drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 6 +++---
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 8 ++++----
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2.h b/drivers/net/ethernet/marvell/mvpp2/mvpp2.h
index 6bd7e40..39c4e5c 100644
--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2.h
+++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2.h
@@ -651,9 +651,9 @@
#define GENCONF_PORT_CTRL1_EN(p) BIT(p)
#define GENCONF_PORT_CTRL1_RESET(p) (BIT(p) << 28)
#define GENCONF_CTRL0 0x1120
-#define GENCONF_CTRL0_PORT0_RGMII BIT(0)
-#define GENCONF_CTRL0_PORT1_RGMII_MII BIT(1)
-#define GENCONF_CTRL0_PORT1_RGMII BIT(2)
+#define GENCONF_CTRL0_PORT2_RGMII BIT(0)
+#define GENCONF_CTRL0_PORT3_RGMII_MII BIT(1)
+#define GENCONF_CTRL0_PORT3_RGMII BIT(2)
/* Various constants */
diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
index d64dc12..d2b0506 100644
--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
+++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
@@ -1231,9 +1231,9 @@ static void mvpp22_gop_init_rgmii(struct mvpp2_port *port)
regmap_read(priv->sysctrl_base, GENCONF_CTRL0, &val);
if (port->gop_id == 2)
- val |= GENCONF_CTRL0_PORT0_RGMII | GENCONF_CTRL0_PORT1_RGMII;
+ val |= GENCONF_CTRL0_PORT2_RGMII;
else if (port->gop_id == 3)
- val |= GENCONF_CTRL0_PORT1_RGMII_MII;
+ val |= GENCONF_CTRL0_PORT3_RGMII_MII;
regmap_write(priv->sysctrl_base, GENCONF_CTRL0, val);
}
@@ -1250,9 +1250,9 @@ static void mvpp22_gop_init_sgmii(struct mvpp2_port *port)
if (port->gop_id > 1) {
regmap_read(priv->sysctrl_base, GENCONF_CTRL0, &val);
if (port->gop_id == 2)
- val &= ~GENCONF_CTRL0_PORT0_RGMII;
+ val &= ~GENCONF_CTRL0_PORT2_RGMII;
else if (port->gop_id == 3)
- val &= ~GENCONF_CTRL0_PORT1_RGMII_MII;
+ val &= ~GENCONF_CTRL0_PORT3_RGMII_MII;
regmap_write(priv->sysctrl_base, GENCONF_CTRL0, val);
}
}
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH net 2/2] net: mvpp2: disable force link UP during port init procedure
2020-12-15 13:32 [PATCH net 1/2] net: mvpp2: Fix GoP port 3 Networking Complex Control configurations stefanc
@ 2020-12-15 13:32 ` stefanc
2020-12-17 0:42 ` [PATCH net 1/2] net: mvpp2: Fix GoP port 3 Networking Complex Control configurations Jakub Kicinski
1 sibling, 0 replies; 4+ messages in thread
From: stefanc @ 2020-12-15 13:32 UTC (permalink / raw)
To: netdev
Cc: thomas.petazzoni, davem, nadavh, ymarkman, linux-kernel, stefanc,
kuba, linux, mw, andrew, rmk+kernel
From: Stefan Chulski <stefanc@marvell.com>
Force link UP can be enabled by bootloader during tftpboot
and breaks NFS support.
Force link UP disabled during port init procedure.
Signed-off-by: Stefan Chulski <stefanc@marvell.com>
---
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
index d2b0506..0ad3177 100644
--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
+++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
@@ -5479,7 +5479,7 @@ static int mvpp2_port_init(struct mvpp2_port *port)
struct mvpp2 *priv = port->priv;
struct mvpp2_txq_pcpu *txq_pcpu;
unsigned int thread;
- int queue, err;
+ int queue, err, val;
/* Checks for hardware constraints */
if (port->first_rxq + port->nrxqs >
@@ -5493,6 +5493,18 @@ static int mvpp2_port_init(struct mvpp2_port *port)
mvpp2_egress_disable(port);
mvpp2_port_disable(port);
+ if (mvpp2_is_xlg(port->phy_interface)) {
+ val = readl(port->base + MVPP22_XLG_CTRL0_REG);
+ val &= ~MVPP22_XLG_CTRL0_FORCE_LINK_PASS;
+ val |= MVPP22_XLG_CTRL0_FORCE_LINK_DOWN;
+ writel(val, port->base + MVPP22_XLG_CTRL0_REG);
+ } else {
+ val = readl(port->base + MVPP2_GMAC_AUTONEG_CONFIG);
+ val &= ~MVPP2_GMAC_FORCE_LINK_PASS;
+ val |= MVPP2_GMAC_FORCE_LINK_DOWN;
+ writel(val, port->base + MVPP2_GMAC_AUTONEG_CONFIG);
+ }
+
port->tx_time_coal = MVPP2_TXDONE_COAL_USEC;
port->txqs = devm_kcalloc(dev, port->ntxqs, sizeof(*port->txqs),
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net 1/2] net: mvpp2: Fix GoP port 3 Networking Complex Control configurations
2020-12-15 13:32 [PATCH net 1/2] net: mvpp2: Fix GoP port 3 Networking Complex Control configurations stefanc
2020-12-15 13:32 ` [PATCH net 2/2] net: mvpp2: disable force link UP during port init procedure stefanc
@ 2020-12-17 0:42 ` Jakub Kicinski
2020-12-17 9:38 ` [EXT] " Stefan Chulski
1 sibling, 1 reply; 4+ messages in thread
From: Jakub Kicinski @ 2020-12-17 0:42 UTC (permalink / raw)
To: stefanc
Cc: netdev, thomas.petazzoni, davem, nadavh, ymarkman, linux-kernel,
linux, mw, andrew, rmk+kernel
On Tue, 15 Dec 2020 15:32:12 +0200 stefanc@marvell.com wrote:
> From: Stefan Chulski <stefanc@marvell.com>
>
> During GoP port 2 Networking Complex Control mode of operation configurations,
> also GoP port 3 mode of operation was wrongly set mode.
> Patch removes these configurations.
> GENCONF_CTRL0_PORTX naming also fixed.
Can we get a Fixes tag?
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [EXT] Re: [PATCH net 1/2] net: mvpp2: Fix GoP port 3 Networking Complex Control configurations
2020-12-17 0:42 ` [PATCH net 1/2] net: mvpp2: Fix GoP port 3 Networking Complex Control configurations Jakub Kicinski
@ 2020-12-17 9:38 ` Stefan Chulski
0 siblings, 0 replies; 4+ messages in thread
From: Stefan Chulski @ 2020-12-17 9:38 UTC (permalink / raw)
To: Jakub Kicinski
Cc: netdev, thomas.petazzoni, davem, Nadav Haklai, Yan Markman,
linux-kernel, linux, mw, andrew, rmk+kernel
> -----Original Message-----
> From: Jakub Kicinski <kuba@kernel.org>
> Sent: Thursday, December 17, 2020 2:42 AM
> To: Stefan Chulski <stefanc@marvell.com>
> Cc: netdev@vger.kernel.org; thomas.petazzoni@bootlin.com;
> davem@davemloft.net; Nadav Haklai <nadavh@marvell.com>; Yan Markman
> <ymarkman@marvell.com>; linux-kernel@vger.kernel.org;
> linux@armlinux.org.uk; mw@semihalf.com; andrew@lunn.ch;
> rmk+kernel@armlinux.org.uk
> Subject: [EXT] Re: [PATCH net 1/2] net: mvpp2: Fix GoP port 3 Networking
> Complex Control configurations
>
> External Email
>
> ----------------------------------------------------------------------
> On Tue, 15 Dec 2020 15:32:12 +0200 stefanc@marvell.com wrote:
> > From: Stefan Chulski <stefanc@marvell.com>
> >
> > During GoP port 2 Networking Complex Control mode of operation
> > configurations, also GoP port 3 mode of operation was wrongly set mode.
> > Patch removes these configurations.
> > GENCONF_CTRL0_PORTX naming also fixed.
>
> Can we get a Fixes tag?
Reposting with Fixes tag.
Stefan.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-12-17 9:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-15 13:32 [PATCH net 1/2] net: mvpp2: Fix GoP port 3 Networking Complex Control configurations stefanc
2020-12-15 13:32 ` [PATCH net 2/2] net: mvpp2: disable force link UP during port init procedure stefanc
2020-12-17 0:42 ` [PATCH net 1/2] net: mvpp2: Fix GoP port 3 Networking Complex Control configurations Jakub Kicinski
2020-12-17 9:38 ` [EXT] " Stefan Chulski
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.