]> git.ipfire.org Git - thirdparty/openwrt.git/commit
realtek: eth: rename ring steering bits main master 23676/head
authorMarkus Stockhausen <markus.stockhausen@gmx.de>
Sat, 30 May 2026 15:23:34 +0000 (17:23 +0200)
committerMarkus Stockhausen <markus.stockhausen@gmx.de>
Sat, 6 Jun 2026 13:04:42 +0000 (15:04 +0200)
commita317079b571459d675828766bf6d3148855b3fcd
tree3d13b16798a241946da739c76da31ab0380cd47f
parentecdf250d6b96ed90ae672e4b4d108e9b8648d3be
realtek: eth: rename ring steering bits

A network interface card (NIC) hardware ring of the Realtek Otto switch
SoCs is nothing more than a list of pointers to the ring headers. I.E.

address | content   | comment
--------+-----------+------------------------
x + 0   | pointer 0 | points to ring header 0
x + 4   | pointer 1 | points to ring header 1
...
x + 4*n | pointer n | points to ring header n

Headers must be 4 byte aligend. So the lower two bits of the pointers
are unused. Hardware designers desided to give them special meanings.

- Bit 0: Owner of this ring entry, 1 = hardware, 0 = software
- Bit 1: Wrap, 1 = last ring pointer, 0 = normal ring pointer

The driver uses constant defines with slightly confusing naming. Replace
OWN_CPU with OWN_HW to make clear what it is about. Align prefix and
make the defines bitmasks for better readability.

Link: https://github.com/openwrt/openwrt/pull/23676
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
target/linux/realtek/files-6.18/drivers/net/ethernet/rtl838x_eth.c