]> git.ipfire.org Git - thirdparty/openwrt.git/commit
realtek: rtl930x: Fetch link status for all ports in switch IRQ
authorHarshal Gohel <hg@simonwunderlich.de>
Thu, 6 Mar 2025 07:47:18 +0000 (07:47 +0000)
committerHauke Mehrtens <hauke@hauke-m.de>
Thu, 7 Aug 2025 14:01:51 +0000 (16:01 +0200)
commit445af8c038f46855a919e2feebcf473d8e2d32ec
tree0e057a391221d5f0bf567b8ad53a0325d7c95c75
parent9ccfca33038ac27cedca6f6bb18f18c47a7e38d0
realtek: rtl930x: Fetch link status for all ports in switch IRQ

Link status needs to be read twice, and a single register value is
enough for determining link status for all the ports

It is not necessary to go through each potential port separately and later
actually identify for which ports the interrupt actually was. The helper
for_each_set_bit() directly iterate through all set bits.

While at it, rename the function to a proper naming scheme.

Signed-off-by: Harshal Gohel <hg@simonwunderlich.de>
Co-developed-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Signed-off-by: Sharadanand Karanjkar <sk@simonwunderlich.de>
Link: https://github.com/openwrt/openwrt/pull/19578
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/rtl83xx.h
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl930x.c