net: dsa: mv88e6xxx: Allow external SMI if serial
authorMarcus Carlberg <marcus.carlberg@axis.com>
Wed, 24 Aug 2022 09:37:06 +0000 (11:37 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sat, 27 Aug 2022 02:25:37 +0000 (19:25 -0700)
commit8532c60efcc5b7b382006129b77aee2c19c43f15
tree3b578713a6dda55fea58a887121d4fa13494b52a
parent8f1948bdcf2fb50e9092c0950c3c9ac591382101
net: dsa: mv88e6xxx: Allow external SMI if serial

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 <marcus.carlberg@axis.com>
Link: https://lore.kernel.org/r/20220824093706.19049-1-marcus.carlberg@axis.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/mv88e6xxx/global2.h