Files
openwrt/target/linux
Markus Stockhausen 2d2f0fbc70 realtek: mdio: use regmap_bulk_write() in RTL838x path
The regmap conversion only replaced the old sw() macros with their
regmap counterparts. Neither access optimization nor error handling
took place. Redesign the mdio access as follows:

- The c22/c45/read/write functions only prepare a data structure
  that describes the to-be-executed command.
- rtmdio_xxxx_run_cmd() is enhanced to bulk write the data into the
  SoC, issue all the I/O and do proper error handling. Additionally
  the signature is changed to allow read & write operations.

The bulk commands introduce some subtle changes.

- Before this patch only the needed registers were written. After
  the conversion all phy control registers are set up.
- The register write order changes

This is no issue as the hardware starts operation when issuing the
run_cmd() and only accesses the needed registers per operation.

For now adapt only the RTL838x path. Where needed rename "err" to
"ret" for consistency with kernel conventions.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/23092
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-05-01 12:14:50 +02:00
..
2026-04-30 01:31:44 +02:00
2026-04-30 01:31:44 +02:00
2026-04-30 01:31:44 +02:00
2026-04-29 09:56:37 +02:00
2026-04-21 16:13:37 +02:00
2026-05-01 00:56:52 +02:00
2026-04-30 01:31:44 +02:00
2026-04-27 09:39:21 +02:00
2026-04-23 15:54:47 +02:00
2026-04-23 20:36:17 +02:00
2026-04-26 10:03:37 +02:00
2026-04-19 13:21:21 +02:00
2026-04-28 11:27:46 +02:00
2026-04-26 10:27:47 +02:00