linux/drivers/net/dsa
Vladimir Oltean 5f09b79e99 net: dsa: sja1105: complete tc-cbs offload support on SJA1110
[ Upstream commit 180a7419fe ]

The blamed commit left this delta behind:

  struct sja1105_cbs_entry {
 -	u64 port;
 -	u64 prio;
 +	u64 port; /* Not used for SJA1110 */
 +	u64 prio; /* Not used for SJA1110 */
  	u64 credit_hi;
  	u64 credit_lo;
  	u64 send_slope;
  	u64 idle_slope;
  };

but did not actually implement tc-cbs offload fully for the new switch.
The offload is accepted, but it doesn't work.

The difference compared to earlier switch generations is that now, the
table of CBS shapers is sparse, because there are many more shapers, so
the mapping between a {port, prio} and a table index is static, rather
than requiring us to store the port and prio into the sja1105_cbs_entry.

So, the problem is that the code programs the CBS shaper parameters at a
dynamic table index which is incorrect.

All that needs to be done for SJA1110 CBS shapers to work is to bypass
the logic which allocates shapers in a dense manner, as for SJA1105, and
use the fixed mapping instead.

Fixes: 3e77e59bf8 ("net: dsa: sja1105: add support for the SJA1110 switch family")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-09-19 12:28:03 +02:00
..
b53
hirschmann
microchip net: dsa: microchip: KSZ9477 register regmap alignment to 32 bit boundaries 2023-09-13 09:42:23 +02:00
mv88e6xxx net: dsa: mv88e6xxx: Wait for EEPROM done before HW reset 2023-08-23 17:52:35 +02:00
ocelot net: dsa: felix: fix oversize frame dropping for always closed tc-taprio gates 2023-08-30 16:11:00 +02:00
qca net: dsa: qca8k: fix mdb add/del case with 0 VID 2023-08-03 10:24:15 +02:00
realtek
sja1105 net: dsa: sja1105: complete tc-cbs offload support on SJA1110 2023-09-19 12:28:03 +02:00
xrs700x
bcm_sf2_cfp.c
bcm_sf2_regs.h
bcm_sf2.c net: dsa: fix value check in bcm_sf2_sw_probe() 2023-08-11 12:08:13 +02:00
bcm_sf2.h
dsa_loop_bdinfo.c
dsa_loop.c
dsa_loop.h
Kconfig
lan9303_i2c.c
lan9303_mdio.c
lan9303-core.c net: dsa: lan9303: allow vid != 0 in port_fdb_{add|del} methods 2023-06-14 11:15:16 +02:00
lan9303.h
lantiq_gswip.c
lantiq_pce.h
Makefile
mt7530.c net: dsa: mt7530: fix handling of 802.1X PAE frames 2023-08-30 16:11:01 +02:00
mt7530.h net: dsa: mt7530: fix handling of 802.1X PAE frames 2023-08-30 16:11:01 +02:00
mv88e6060.c
mv88e6060.h
rzn1_a5psw.c net: dsa: rzn1-a5psw: disable learning for standalone ports 2023-05-24 17:32:44 +01:00
rzn1_a5psw.h net: dsa: rzn1-a5psw: fix STP states handling 2023-05-24 17:32:44 +01:00
vitesse-vsc73xx-core.c net: dsa: vsc73xx: fix MTU configuration 2023-07-19 16:22:03 +02:00
vitesse-vsc73xx-platform.c
vitesse-vsc73xx-spi.c
vitesse-vsc73xx.h