linux/drivers/net/dsa/b53
Jonas Gorski 674b34c4c7 net: dsa: b53: fix ageing time for BCM53101
For some reason Broadcom decided that BCM53101 uses 0.5s increments for
the ageing time register, but kept the field width the same [1]. Due to
this, the actual ageing time was always half of what was configured.

Fix this by adapting the limits and value calculation for BCM53101.

So far it looks like this is the only chip with the increased tick
speed:

$ grep -l -r "Specifies the aging time in 0.5 seconds" cdk/PKG/chip | sort
cdk/PKG/chip/bcm53101/bcm53101_a0_defs.h

$ grep -l -r "Specifies the aging time in seconds" cdk/PKG/chip | sort
cdk/PKG/chip/bcm53010/bcm53010_a0_defs.h
cdk/PKG/chip/bcm53020/bcm53020_a0_defs.h
cdk/PKG/chip/bcm53084/bcm53084_a0_defs.h
cdk/PKG/chip/bcm53115/bcm53115_a0_defs.h
cdk/PKG/chip/bcm53118/bcm53118_a0_defs.h
cdk/PKG/chip/bcm53125/bcm53125_a0_defs.h
cdk/PKG/chip/bcm53128/bcm53128_a0_defs.h
cdk/PKG/chip/bcm53134/bcm53134_a0_defs.h
cdk/PKG/chip/bcm53242/bcm53242_a0_defs.h
cdk/PKG/chip/bcm53262/bcm53262_a0_defs.h
cdk/PKG/chip/bcm53280/bcm53280_a0_defs.h
cdk/PKG/chip/bcm53280/bcm53280_b0_defs.h
cdk/PKG/chip/bcm53600/bcm53600_a0_defs.h
cdk/PKG/chip/bcm89500/bcm89500_a0_defs.h

[1] a5d3fc9b12/cdk/PKG/chip/bcm53101/bcm53101_a0_defs.h (L28966)

Fixes: e39d14a760 ("net: dsa: b53: implement setting ageing time")
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://patch.msgid.link/20250905124507.59186-1-jonas.gorski@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-09-08 17:53:02 -07:00
..
Kconfig net: dsa: b53: support legacy FCS tags 2025-06-17 17:52:04 -07:00
Makefile
b53_common.c net: dsa: b53: fix ageing time for BCM53101 2025-09-08 17:53:02 -07:00
b53_mdio.c net: dsa: b53: mdio: add support for BCM53101 2025-02-19 18:41:43 -08:00
b53_mmap.c net: dsa: b53: mmap: Implement bcm63xx ephy power control 2025-07-25 14:07:34 -07:00
b53_priv.h net: dsa: b53: Define chip IDs for more bcm63xx SoCs 2025-07-25 14:07:33 -07:00
b53_regs.h net: dsa: b53: ensure BCM5325 PHYs are enabled 2025-06-17 17:52:30 -07:00
b53_serdes.c net: remove phylink_pcs .neg_mode boolean 2025-02-14 17:09:50 -08:00
b53_serdes.h net: dsa: use capital "OR" for multiple licenses in SPDX 2023-08-24 12:02:53 -07:00
b53_spi.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
b53_srab.c net: dsa: Switch back to struct platform_driver::remove() 2024-10-04 16:39:57 -07:00