linux-yocto/drivers/net/ethernet/microchip/sparx5
Daniel Machon 8a6be4bd6f net: sparx5: fix source port register when mirroring
When port mirroring is added to a port, the bit position of the source
port, needs to be written to the register ANA_AC_PROBE_PORT_CFG.  This
register is replicated for n_ports > 32, and therefore we need to derive
the correct register from the port number.

Before this patch, we wrongly calculate the register from portno /
BITS_PER_BYTE, where the divisor ought to be 32, causing any port >=8 to
be written to the wrong register. We fix this, by using do_div(), where
the dividend is the register, the remainder is the bit position and the
divisor is now 32.

Fixes: 4e50d72b3b ("net: sparx5: add port mirroring implementation")
Signed-off-by: Daniel Machon <daniel.machon@microchip.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20241009-mirroring-fix-v1-1-9ec962301989@microchip.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-10-11 15:42:51 -07:00
..
Kconfig net: microchip: add FDMA library 2024-09-04 11:53:49 +01:00
Makefile net: sparx5: use FDMA library symbols 2024-09-04 11:53:49 +01:00
sparx5_calendar.c
sparx5_dcb.c
sparx5_ethtool.c net: sparx5: Remove setting of RX software timestamp 2024-09-06 09:34:17 +01:00
sparx5_fdma.c net: sparx5: ditch sparx5_fdma_rx/tx_reload() functions 2024-09-04 11:53:50 +01:00
sparx5_mactable.c net: sparx5: Fix use after free inside sparx5_del_mact_entry 2024-03-04 20:38:22 -08:00
sparx5_main_regs.h net: sparx5: add new register definitions 2024-04-24 13:08:06 +01:00
sparx5_main.c net: sparx5: add bookkeeping code for matchall rules 2024-04-24 13:08:06 +01:00
sparx5_main.h net: sparx5: use contiguous memory for tx buffers 2024-09-04 11:53:50 +01:00
sparx5_mirror.c net: sparx5: fix source port register when mirroring 2024-10-11 15:42:51 -07:00
sparx5_netdev.c net: remove phy_has_hwtstamp() -> phy_mii_ioctl() decision from converted drivers 2023-08-02 19:11:06 -07:00
sparx5_packet.c net: sparx5: Fix invalid timestamps 2024-09-22 19:53:19 +01:00
sparx5_pgid.c
sparx5_phylink.c
sparx5_police.c
sparx5_pool.c
sparx5_port.c net: sparx5: Correct spelling in comments 2024-04-25 19:13:26 -07:00
sparx5_port.h
sparx5_psfp.c
sparx5_ptp.c
sparx5_qos.c
sparx5_qos.h
sparx5_sdlb.c
sparx5_switchdev.c net: sparx5: Correct spelling in comments 2024-04-25 19:13:26 -07:00
sparx5_tc_flower.c net: sparx5: flower: check for unsupported control flags 2024-04-25 19:35:08 -07:00
sparx5_tc_matchall.c net: sparx5: add support for matchall mirror stats 2024-04-24 13:08:07 +01:00
sparx5_tc.c
sparx5_tc.h
sparx5_vcap_ag_api.c
sparx5_vcap_ag_api.h
sparx5_vcap_debugfs.c
sparx5_vcap_debugfs.h
sparx5_vcap_impl.c net: microchip: Constify struct vcap_operations 2024-06-18 15:26:39 +02:00
sparx5_vcap_impl.h
sparx5_vlan.c