net: mvpp2: Fix GoP port 3 Networking Complex Control configurations
Subsystems (3)
PATCH v2 1/2 net: mvpp2: Fix GoP port 3 Networking Complex Control configurations
From: Stefan Chulski <[email protected]>
During GoP port 2 Networking Complex Control mode of operation configurations, also GoP port 3 mode of operation was wrongly set.
Patch removes these configurations.GENCONF_CTRL0_PORTX naming also fixed.
--- drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 6 +++--- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-)
drivers/net/ethernet/marvell/mvpp2/mvpp2.h +3 -3
@@ -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 */
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +4 -4
@@ -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); } }
Signature · 1 line
1.9.1
PATCH v2 2/2 net: mvpp2: disable force link UP during port init procedure
From: Stefan Chulski <[email protected]>
Force link UP can be enabled by bootloader during tftpboot and breaks NFS support.
Force link UP disabled during port init procedure.
--- drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +13 -1
@@ -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),
Signature · 1 line
1.9.1
Re: [PATCH net v2 2/2] net: mvpp2: disable force link UP during port init procedure
Hi Stefan,
czw., 17 gru 2020 o 10:42 <[email protected]> napisał(a):
Quoted 9 lines
From: Stefan Chulski <[email protected]>
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 <[email protected]>---
What are the updates against v1? Please note them in this place for individual patches and list all in the cover letter (in case sending a group of patches).
Do you think it's a fix that should be backported to stable branches? If yes, please add 'Fixes: <commit ID> ("commit title")' and it may be good to add 'Cc: [email protected]' adjacent to the Signed-off-by tag.
Thanks,
Marcin
Quoted 38 lines
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +13
-2@@ -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
Russell King - ARM Linux admin
maintainerRe: [PATCH net v2 2/2] net: mvpp2: disable force link UP during port init procedure
Quoted 10 lines · Marcin Wojtas
Hi Stefan,
czw., 17 gru 2020 o 10:42 <[email protected]> napisał(a):
Quoted 7 lines
From: Stefan Chulski <[email protected]>
Force link UP can be enabled by bootloader during tftpboot and breaks NFS support.
Force link UP disabled during port init procedure.
Quoted 6 lines
Quoted 2 lines
Signed-off-by Stefan Chulski <[email protected]>---
What are the updates against v1? Please note them in this place for individual patches and list all in the cover letter (in case sending a group of patches).
It seems the only reason this has been resent is because it's (incorrectly) part of a series that involved a change to patch 1 (adding the Fixes: tag).
As this is a stand-alone fix, it shouldn't be part of a series unless there really is some kind of dependency with the other patch(es) of that series.
Signature · 2 lines
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
RE: [EXT] Re: [PATCH net v2 2/2] net: mvpp2: disable force link UP during port init procedure
Quoted 18 lines · Marcin Wojtas
Quoted 10 lines
Hi Stefan,
czw., 17 gru 2020 o 10:42 <[email protected]> napisał(a):
Quoted 7 lines
From: Stefan Chulski <[email protected]>
Force link UP can be enabled by bootloader during tftpboot and breaks NFS support.
Force link UP disabled during port init procedure.Quoted 6 lines
Quoted 2 lines
Signed-off-by Stefan Chulski <[email protected]>---
What are the updates against v1? Please note them in this place for individual patches and list all in the cover letter (in case sending a group of patches).
Quoted 6 lines
It seems the only reason this has been resent is because it's (incorrectly) part of a series that involved a change to patch 1 (adding the
Fixes: tag).As this is a stand-alone fix, it shouldn't be part of a series unless there really is some kind of dependency with the other patch(es) of that series.
I would repost this two patches separately.
Regards,
Stefan.
Re: [PATCH net v2 2/2] net: mvpp2: disable force link UP during port init procedure
In reply to Marcin WojtasQuoted 4 lines
Do you think it's a fix that should be backported to stable branches? If yes, please add 'Fixes: <commit ID> ("commit title")' and it may be good to add 'Cc: [email protected]' adjacent to the Signed-off-by tag.
netdev patches should not be Cc: [email protected]. David and Jakub handle stable patches directly.
Andrew
Re: [PATCH net v2 2/2] net: mvpp2: disable force link UP during port init procedure
czw., 17 gru 2020 o 15:09 Andrew Lunn <[email protected]> napisał(a):
Quoted 9 lines
Quoted 5 lines
Do you think it's a fix that should be backported to stable branches? If yes, please add 'Fixes: <commit ID> ("commit title")' and it may be good to add 'Cc: [email protected]' adjacent to the Signed-off-by tag.
netdev patches should not be Cc: [email protected]. David and Jakub handle stable patches directly.
Thanks for clarification.
Marcin