2022-10-09 23:19:52

by Sasha Levin

[permalink] [raw]
Subject: [PATCH AUTOSEL 5.19 15/73] net: dsa: mv88e6xxx: Allow external SMI if serial

From: Marcus Carlberg <[email protected]>

[ Upstream commit 8532c60efcc5b7b382006129b77aee2c19c43f15 ]

p0_mode set to one of the supported serial mode should not prevent
configuring the external SMI interface in
mv88e6xxx_g2_scratch_gpio_set_smi. The current masking of the p0_mode
only checks the first 2 bits. This results in switches supporting
serial mode cannot setup external SMI on certain serial modes
(Ex: 1000BASE-X and SGMII).

Extend the mask of the p0_mode to include the reduced modes and
serial modes as allowed modes for the external SMI interface.

Signed-off-by: Marcus Carlberg <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
---
drivers/net/dsa/mv88e6xxx/global2.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/dsa/mv88e6xxx/global2.h b/drivers/net/dsa/mv88e6xxx/global2.h
index 807aeaad9830..7536b8b0ad01 100644
--- a/drivers/net/dsa/mv88e6xxx/global2.h
+++ b/drivers/net/dsa/mv88e6xxx/global2.h
@@ -298,7 +298,7 @@
#define MV88E6352_G2_SCRATCH_CONFIG_DATA1 0x71
#define MV88E6352_G2_SCRATCH_CONFIG_DATA1_NO_CPU BIT(2)
#define MV88E6352_G2_SCRATCH_CONFIG_DATA2 0x72
-#define MV88E6352_G2_SCRATCH_CONFIG_DATA2_P0_MODE_MASK 0x3
+#define MV88E6352_G2_SCRATCH_CONFIG_DATA2_P0_MODE_MASK 0xf
#define MV88E6352_G2_SCRATCH_CONFIG_DATA3 0x73
#define MV88E6352_G2_SCRATCH_CONFIG_DATA3_S_SEL BIT(1)

--
2.35.1


2022-10-10 12:14:52

by Vladimir Oltean

[permalink] [raw]
Subject: Re: [PATCH AUTOSEL 5.19 15/73] net: dsa: mv88e6xxx: Allow external SMI if serial

On Sun, Oct 09, 2022 at 06:13:53PM -0400, Sasha Levin wrote:
> From: Marcus Carlberg <[email protected]>
>
> [ Upstream commit 8532c60efcc5b7b382006129b77aee2c19c43f15 ]
>
> p0_mode set to one of the supported serial mode should not prevent
> configuring the external SMI interface in
> mv88e6xxx_g2_scratch_gpio_set_smi. The current masking of the p0_mode
> only checks the first 2 bits. This results in switches supporting
> serial mode cannot setup external SMI on certain serial modes
> (Ex: 1000BASE-X and SGMII).
>
> Extend the mask of the p0_mode to include the reduced modes and
> serial modes as allowed modes for the external SMI interface.
>
> Signed-off-by: Marcus Carlberg <[email protected]>
> Link: https://lore.kernel.org/r/[email protected]
> Signed-off-by: Jakub Kicinski <[email protected]>
> Signed-off-by: Sasha Levin <[email protected]>
> ---

Not needed for stable kernels, please drop, thanks.