]> git.ipfire.org Git - thirdparty/openwrt.git/commit
realtek: dsa: consolidate switch_irq() 22273/head
authorMarkus Stockhausen <markus.stockhausen@gmx.de>
Wed, 4 Mar 2026 18:16:23 +0000 (19:16 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 14 Mar 2026 21:48:37 +0000 (22:48 +0100)
commit056176cde1cabb7b38dd57bedfcdd480769bf7d7
treec1e04f574595ab12501f95049c92a66b576f9858
parent42fcfe535c82b3b5edd735c1c5632418c66fb199
realtek: dsa: consolidate switch_irq()

The dsa irq handler works always in the same way for all SoCs.

- Read register ISR_PORT_LINK_STS_CHG to determine the ports that
  triggered the irq.
- Write the read value back to the register to confirm the irq
- Read link status via MAC_LINK_STS
- Trigger dsa_port_phylink_mac_change() for each changed port

Currently each SoC has its own implementation. Drop that in
favour of a generic implementation that makes use of the existing
bit register read/write helpers.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22273
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.c
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl839x.c
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl83xx.h
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl930x.c
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c