linux/drivers/net/dsa
Lukasz Majewski dcec8d291d net: dsa: ksz_common: Allow only up to two HSR HW offloaded ports for KSZ9477
The KSZ9477 allows HSR in-HW offloading for any of two selected ports.
This patch adds check if one tries to use more than two ports with
HSR offloading enabled.

The problem is with RedBox configuration (HSR-SAN) - when configuring:
ip link add name hsr0 type hsr slave1 lan1 slave2 lan2 interlink lan3 \
	supervision 45 version 1

The lan1 (port0) and lan2 (port1) are correctly configured as ports, which
can use HSR offloading on ksz9477.

However, when we do already have two bits set in hsr_ports, we need to
return (-ENOTSUPP), so the interlink port (lan3) would be used with
SW based HSR RedBox support.

Otherwise, I do see some strange network behavior, as some HSR frames are
visible on non-HSR network and vice versa.

This causes the switch connected to interlink port (lan3) to drop frames
and no communication is possible.

Moreover, conceptually - the interlink (i.e. HSR-SAN port - lan3/port2)
shall be only supported in software as it is also possible to use ksz9477
with only SW based HSR (i.e. port0/1 -> hsr0 with offloading, port2 ->
HSR-SAN/interlink, port4/5 -> hsr1 with SW based HSR).

Fixes: 5055cccfc2 ("net: hsr: Provide RedBox support (HSR-SAN)")
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2024-06-21 10:15:46 +01:00
..
b53 net: dsa: b53: provide own phylink MAC operations 2024-04-25 11:46:38 -07:00
hirschmann net: dsa: hellcreek: Replace kernel.h with what is used 2024-06-10 13:13:02 +01:00
microchip net: dsa: ksz_common: Allow only up to two HSR HW offloaded ports for KSZ9477 2024-06-21 10:15:46 +01:00
mv88e6xxx tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00
ocelot net: dsa: ocelot: unexport felix_phylink_mac_ops and felix_switch_ops 2024-06-03 13:06:16 +01:00
qca net dsa: qca8k: fix usages of device_get_named_child_node() 2024-06-10 13:12:14 +01:00
realtek net: dsa: realtek: provide own phylink MAC operations 2024-04-30 13:50:01 +02:00
sja1105 net: dsa: sja1105: flower: validate control flags 2024-04-18 17:08:37 -07:00
xrs700x net: dsa: xrs700x: fix missing initialisation of ds->phylink_mac_ops 2024-04-19 12:11:17 +01:00
bcm_sf2_cfp.c net: dsa: Use conduit and user terms 2023-10-24 13:08:14 -07:00
bcm_sf2_regs.h net: dsa: bcm_sf2: refactor LED regs access 2021-12-30 17:28:32 -08:00
bcm_sf2.c net: dsa: bcm_sf2: provide own phylink MAC operations 2024-04-17 18:27:42 -07:00
bcm_sf2.h net: dsa: bcm_sf2: drop priv->master_mii_dn 2024-01-05 11:56:36 +00:00
dsa_loop_bdinfo.c net: fill in MODULE_DESCRIPTION()s for dsa_loop_bdinfo 2024-02-09 14:12:02 -08:00
dsa_loop.c net: dsa: dsa_loop: add phylink capabilities 2023-10-11 10:06:05 +01:00
dsa_loop.h
Kconfig net: dsa: lan9303: imply SMSC_PHY 2024-05-29 17:11:45 -07:00
lan9303_i2c.c net: dsa: Switch i2c drivers back to use .probe() 2023-05-31 09:52:55 +01:00
lan9303_mdio.c net: dsa: lan9303: consequently nested-lock physical MDIO 2023-11-02 10:48:09 +01:00
lan9303-core.c net: dsa: lan9303: use ethtool_puts() for lan9303_get_strings() 2024-04-26 12:37:02 -07:00
lan9303.h net: dsa: be compatible with masters which unregister on shutdown 2021-09-19 12:08:37 +01:00
lantiq_gswip.c net: dsa: lantiq_gswip: Improve error message in gswip_port_fdb() 2024-06-13 17:07:11 -07:00
lantiq_pce.h net: dsa: Use the correct style for SPDX License Identifier 2019-09-22 15:25:08 -07:00
Makefile net: dsa: mt7530: introduce driver for MT7988 built-in switch 2023-04-03 10:13:01 +01:00
mt7530-mdio.c net: dsa: mt7530-mdio: read PHY address of switch from device tree 2024-04-23 10:32:40 +02:00
mt7530-mmio.c net: dsa: mt7530: Convert to platform remove callback returning void 2023-09-20 10:25:57 +01:00
mt7530.c net: dsa: mt7530: add support for bridge port isolation 2024-06-19 13:10:01 +01:00
mt7530.h net: dsa: mt7530: add support for bridge port isolation 2024-06-19 13:10:01 +01:00
mv88e6060.c net: dsa: mv88e6060: add phylink_get_caps implementation 2023-08-14 18:57:17 -07:00
mv88e6060.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
rzn1_a5psw.c net: dsa: rzn1_a5psw: provide own phylink MAC operations 2024-04-17 18:29:30 -07:00
rzn1_a5psw.h net: dsa: rzn1-a5psw: add vlan support 2023-08-11 11:58:36 +01:00
vitesse-vsc73xx-core.c net: dsa: vsc73xx: Add define for max num of ports 2024-04-22 14:21:32 -07:00
vitesse-vsc73xx-platform.c net: dsa: vitesse-vsc73xx: Convert to platform remove callback returning void 2023-09-20 10:25:58 +01:00
vitesse-vsc73xx-spi.c net: dsa: vitesse-vsc73xx: remove unnecessary set_drvdata() 2022-09-22 19:30:39 -07:00
vitesse-vsc73xx.h net: dsa: vsc73xx: add structure descriptions 2024-04-22 14:21:32 -07:00