Kernel 6.1 for realtek target: debugging & testing needed

@svanheule has a staging tree for the realtek target on 6.1. Mind you, it's very fresh and still rough around the edges, but as always it needs brave souls who want to help debug and test :slightly_smiling_face:.

You will need this patch if you'd like to rebase the staging tree on latest main - commit e430815f5a3f introduced a few changes that break the realtek 6.1 patch set for now.

I have only rtl838x and rtl930x to test, status at this point is not so rosey:

  • rtl838x: GS1900-8HP v1 boots, but no network. Boot log here. With e430815f5a3f reverted, network functionality is (partially?) restored, as I suspected.
  • rtl930x: XGS1250-12 throws a kernel panic at boot - log.

Any help is welcome, make sure you got serial handy (and prefer TFTP boot over flashing :sunglasses:).


In the meantime I can confirm reverting e430815f5a3f at least partially restores network functionality on rtl838x. I'm seeing the link going down and coming up again when unplugging/plugging in a network cable, but no ping e.g..


@Ansuel @daniel Was wondering if you could offer some insight here. One of the issues we're running into is the commit below backported PHY package MMD patches from 6.8, which breaks the 800-net-mdio-support-hardware-assisted-indirect-access.patch we've been carrying in the realtek tree, which Daniel wrote.

Git chokes on the first two hunks, which modify two functions in drivers/net/phy/phy-core.c - __phy_read_mmd and __phy_write_mmd - which, from what I can tell, were rewritten completely with the 6.8 backport, from what I can tell. (You can tell I'm out of my depth :rofl:.)

I suppose the other parts of the patch are still relevant, and need to be adapted to the 6.8 backport, but I'm not sure to what extent - I can read a bit of C, but fully understanding the code and writing it is something else altogether. I did make a modest start with rebasing the patch on top of the 6.8 backports, here:

Git behaviour with the patch as it is in the staging tree now:

Applying /var/media/data/code/lede/main/target/linux/realtek/patches-6.1/800-net-mdio-support-hardware-assisted-indirect-access.patch using plaintext:
patching file drivers/net/phy/mdio_bus.c
patching file drivers/net/phy/phy-core.c
Hunk #1 FAILED at 554.
Hunk #2 FAILED at 610.
Hunk #3 succeeded at 957 (offset 136 lines).
Hunk #4 succeeded at 972 (offset 136 lines).
Hunk #5 succeeded at 1080 (offset 136 lines).
Hunk #6 succeeded at 1113 (offset 136 lines).
2 out of 6 hunks FAILED -- saving rejects to file drivers/net/phy/phy-core.c.rej
patching file include/linux/mdio.h
patching file include/linux/phy.h
Hunk #2 succeeded at 439 (offset 1 line).
Hunk #3 succeeded at 1943 with fuzz 2 (offset 18 lines).
Hunk #4 succeeded at 2043 with fuzz 2 (offset 36 lines).
patching file include/uapi/linux/mii.h
Patch failed! Please fix /var/media/data/code/lede/main/target/linux/realtek/patches-6.1/800-net-mdio-support-hardware-assisted-indirect-access.patch!

Any pointers are appreciated.

the package ops can be greatly simplified as we switched to base + offset implementation just as it's done here... aka that part needs to be reworked.

for the read_mmd and write_mmd it's ok...

Alright, thanks.