[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <485a30d3-0677-dce4-c35d-4ccfdc523efe@gmail.com>
Date: Sat, 11 Apr 2020 18:15:54 -0700
From: Florian Fainelli <f.fainelli@...il.com>
To: Sasha Levin <sashal@...nel.org>, linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Cc: "David S . Miller" <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH AUTOSEL 4.14 19/37] net: dsa: bcm_sf2: Also configure Port
5 for 2Gb/sec on 7278
On 4/11/2020 4:13 PM, Sasha Levin wrote:
> From: Florian Fainelli <f.fainelli@...il.com>
>
> [ Upstream commit 7458bd540fa0a90220b9e8c349d910d9dde9caf8 ]
>
> Either port 5 or port 8 can be used on a 7278 device, make sure that
> port 5 also gets configured properly for 2Gb/sec in that case.
This was later reverted with:
3f02735e5da5367e4cd563ce6e5c21ce27922248 ("Revert "net: dsa: bcm_sf2:
Also configure Port 5 for 2Gb/sec on 7278") please drop it from this
selection.
>
> Signed-off-by: Florian Fainelli <f.fainelli@...il.com>
> Signed-off-by: David S. Miller <davem@...emloft.net>
> Signed-off-by: Sasha Levin <sashal@...nel.org>
> ---
> drivers/net/dsa/bcm_sf2.c | 3 +++
> drivers/net/dsa/bcm_sf2_regs.h | 1 +
> 2 files changed, 4 insertions(+)
>
> diff --git a/drivers/net/dsa/bcm_sf2.c b/drivers/net/dsa/bcm_sf2.c
> index 6bca42e34a53d..4b0c48a40ba6e 100644
> --- a/drivers/net/dsa/bcm_sf2.c
> +++ b/drivers/net/dsa/bcm_sf2.c
> @@ -691,6 +691,9 @@ static void bcm_sf2_sw_adjust_link(struct dsa_switch *ds, int port,
> if (phydev->duplex == DUPLEX_FULL)
> reg |= DUPLX_MODE;
>
> + if (priv->type == BCM7278_DEVICE_ID && dsa_is_cpu_port(ds, port))
> + reg |= GMIIP_SPEED_UP_2G;
> +
> core_writel(priv, reg, offset);
>
> if (!phydev->is_pseudo_fixed_link)
> diff --git a/drivers/net/dsa/bcm_sf2_regs.h b/drivers/net/dsa/bcm_sf2_regs.h
> index 49695fcc2ea8f..3c4fd7cda701a 100644
> --- a/drivers/net/dsa/bcm_sf2_regs.h
> +++ b/drivers/net/dsa/bcm_sf2_regs.h
> @@ -162,6 +162,7 @@ enum bcm_sf2_reg_offs {
> #define RXFLOW_CNTL (1 << 4)
> #define TXFLOW_CNTL (1 << 5)
> #define SW_OVERRIDE (1 << 6)
> +#define GMIIP_SPEED_UP_2G (1 << 7)
>
> #define CORE_WATCHDOG_CTRL 0x001e4
> #define SOFTWARE_RESET (1 << 7)
>
--
Florian
Powered by blists - more mailing lists