]> git.ipfire.org Git - thirdparty/openwrt.git/commit
realtek: mdio: add reverse lookup bus/phy to port 23230/head
authorMarkus Stockhausen <markus.stockhausen@gmx.de>
Wed, 6 May 2026 20:19:41 +0000 (22:19 +0200)
committerRobert Marko <robimarko@gmail.com>
Mon, 11 May 2026 08:32:30 +0000 (10:32 +0200)
commit8482b9983bb4cb17d0f7c405b907b5f98ab20aec
treedd145fd49790d1e22358969cd3777a73531de2ff
parentdc08ffc707c9bfccd99dabfb8747a89edf184a8e
realtek: mdio: add reverse lookup bus/phy to port

Until now there is a O(n) loop that looks up a port for a
given bus/phy combination. This is slow for high port count
devices (RTL839x and RTL931x). Implement a efficient reverse
lookup table for that.

While we are here adapt tiny bits of the documentation to
better reflect the driver logic after the recent refactoring.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/23230
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/realtek/files-6.18/drivers/net/mdio/mdio-realtek-otto.c