Skip to content

airoha: add support for kernel 6.18 - #21019

Merged
openwrt-bot merged 12 commits into
openwrt:mainfrom
hurrian:airoha-6.18-work
Jun 3, 2026
Merged

openwrt-bot merged 12 commits into
openwrt:mainfrom
hurrian:airoha-6.18-work

Conversation

@hurrian

@hurrian hurrian commented Dec 2, 2025 •

Copy link
Copy Markdown
Contributor

Enable kernel 6.18 as the testing kernel for airoha.

This kernel bump removes a large amount of pending backported patches, decreasing maintenance load for the target.

All patches refreshed automatically. Patchset is functionally identical to 6.12 at this time.

Run tested on Bell XG-140G-TF (#20486), Gemtek W1700K and XR1710G(#22397).

Compile tested for the an7581 and an7583 RFB.

Signed-off-by: Kenneth Kasilag [email protected]

@github-actions github-actions Bot added kernel pull request/issue with Linux kernel related changes target/airoha pull request/issue for airoha target labels Dec 2, 2025
@hurrian

hurrian commented Dec 3, 2025

Copy link
Copy Markdown
Contributor Author

Bootlog for 6.18 on the XG-140G: (link)

@namiltd namiltd mentioned this pull request Dec 3, 2025
46 of 53 tasks
@map-b

map-b commented Dec 4, 2025 •

Copy link
Copy Markdown
Contributor

I would remove the link to the generic 6.18 PR from the commit message to avoid GitHub polluting that thread with those ugly "hurrian referenced ..." With each force-push.
Edit: I said link but it is the # 20... in the commit what causes that, I think. The PR description was fine.

@hurrian

hurrian commented Dec 4, 2025

Copy link
Copy Markdown
Contributor Author

I would remove the link to the generic 6.18 PR from the commit message to avoid GitHub polluting that thread with those ugly "hurrian referenced ..." With each force-push.

Done, thanks!

@mrkiko

mrkiko commented Jan 15, 2026

Copy link
Copy Markdown
Contributor

Mark.

@namiltd

namiltd commented Jan 25, 2026

Copy link
Copy Markdown
Contributor

What about the crypto-hw-eip93 module? It's not even configured for kernel 6.12, even though there's a patch for it.

@abajk

abajk commented Jan 25, 2026 •

Copy link
Copy Markdown
Contributor

What about the crypto-hw-eip93 module? It's not even configured for kernel 6.12, even though there's a patch for it.

As far as I remember, the downstream driver panics on startup on AN7581. This could have been caused by some edge cases. When I tested it, I had self-tests compiled in.

@namiltd

namiltd commented Jan 25, 2026 •

Copy link
Copy Markdown
Contributor

Add patches from crypto: eip93: add pending and hack patches

@abajk

abajk commented Jan 25, 2026 •

Copy link
Copy Markdown
Contributor

It would be nice to rebase this PR. As far as I can see, some patches have changed the names.

@hurrian

hurrian commented Jan 25, 2026

Copy link
Copy Markdown
Contributor Author

I am currently waiting on a newer version of the airoha_eth driver to land; our current downstream driver has issues due to phylink changes that happened between 6.12 and 6.18. There's a newer driver that does use these features sitting in Patchwork; but it does not yet include AN7583 support.

@namiltd

namiltd commented Jan 25, 2026 •

Copy link
Copy Markdown
Contributor

However, I think that adding eip93 to airoha should be in a separate PR because it applies to kernel 6.12 (at first).
The changes should also include crypto.mk, as in ea38599

@Cairongzeng

Copy link
Copy Markdown
Contributor

I am currently waiting on a newer version of the driver to land; our current downstream driver has issues due to phylink changes that happened between 6.12 and 6.18. There's a newer driver that does use these features sitting in Patchwork; but it does not yet include AN7583 support.airoha_eth

Is this issue resolved now? Can it be applied to the AN7581 first?

@hurrian
hurrian force-pushed the airoha-6.18-work branch from 7214a29 to 78351cb Compare April 2, 2026 10:14
@hurrian
hurrian marked this pull request as ready for review April 2, 2026 10:15
@hurrian

hurrian commented Apr 2, 2026

Copy link
Copy Markdown
Contributor Author

Now that the dust has settled on 6.18, I've updated the patch sets for the main branch.

Thanks to the upstreaming efforts, most patches for Airoha have landed in mainline. As time goes on we will have very few out-of-tree patches to maintain.

Looking for feedback on this patch set:

  1. As with @namiltd's suggestion, I have switched on kmod-crypto-hw-eip93 (since it was also backported to 6.12 anyway).
  2. Should we remove the out of tree BMT/BBT patches since moving forward, all devices that haven't been ubinized are advised to use the chainloader?

@hurrian
hurrian force-pushed the airoha-6.18-work branch from 78351cb to a54a446 Compare April 2, 2026 10:23
@namiltd

namiltd commented Apr 2, 2026 •

Copy link
Copy Markdown
Contributor

kmod-crypto-hw-eip93 for kernel 6.12 is backported from the Linux kernel for Airoha, and from the MTK version for Mediatek mt7621. Only for kernel 6.18 there is only one "inside-secure" driver from the Linux kernel.

@hurrian
hurrian force-pushed the airoha-6.18-work branch 6 times, most recently from 5201a7e to 0dbb41b Compare April 3, 2026 06:58
@OpenWRT-fanboy

Copy link
Copy Markdown

@hurrian rebasing indefinitely is like the github version of Sisyphus

Now need #23536 (PR won't apply) and #23585 (important vlan bug fix)

@OpenWRT-fanboy

Copy link
Copy Markdown

Out of curiosity, is it too soon to replace 6.12 with 6.18? I find 6.18 stable and don't really have any issues.

Agree. This has been in PR purgatory for so long that there has been more than adequate testing.

I think we should skip testing and move directly to 6.18. Upvote if you agree.

@jonasjelonek

Copy link
Copy Markdown
Member

Github shows conflicts ... please rebase. Apparently there was quite some work here already so we can get this in rather quick. No need to delay all PRs where airoha is involved (getting flashbacks of #22563)

@OpenWRT-fanboy

Copy link
Copy Markdown

Thanks, @jonasjelonek!

Next rebase should be pretty easy. Need to deal with 6b57948 58ce7f3 d0520b8

My hacky solution: main...OpenWRT-fanboy:OpenW1700k:test

@hurrian
hurrian force-pushed the airoha-6.18-work branch from 68ee6ec to 8b415ac Compare June 3, 2026 03:12
@hurrian

hurrian commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

Refreshed to main branch, this should fix the VLAN issue (58ce7f3)

@skramstad

Copy link
Copy Markdown
Contributor

@OpenWRT-fanboy How is the HW offload patches working for you? Do you have that issue that after a few days it stops working? (like we had in the early days).

@OpenWRT-fanboy

Copy link
Copy Markdown

@skramstad I use the @danpawlik mod of #22533 in both 6.12 and 6.18. No apparent problems.

OpenWRT-fanboy

This comment was marked as resolved.

@skramstad

skramstad commented Jun 3, 2026 •

Copy link
Copy Markdown
Contributor

@skramstad I use the @danpawlik mod of #22533 in both 6.12 and 6.18. No apparent problems.

How did you make it compile with the 6.12 fl.u.ip4.flowi4_tos that does not exist in 6.18?

Edit: Ah, you are using 3b5b6bf#diff-789e9d44998bd199549b308551ed3e0c8b9ef488d0fdbccf2c29ac5b1b23583c

@hurrian
hurrian force-pushed the airoha-6.18-work branch from 8b415ac to 557bf28 Compare June 3, 2026 05:06
@hurrian

hurrian commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

adding back the crypto configs removed in 6b57948 ?

Good catch, removed the crypto modules that were removed from 6.12 in 6b57948.

@glassd00r

Copy link
Copy Markdown

Refreshed to main branch, this should fix the VLAN issue (58ce7f3)

Builds and works well.

hurrian added 12 commits June 3, 2026 09:06
During configuration of airoha for 6.18 it was noted that there
were additional missing symbols from the generic config.

Update the missing symbols accordingly.

Signed-off-by: Kenneth Kasilag <[email protected]>
Link: openwrt#21019
Signed-off-by: Jonas Jelonek <[email protected]>
This is an automatically generated commit.

When doing `git bisect`, consider `git bisect --skip`.

Signed-off-by: Kenneth Kasilag <[email protected]>
Link: openwrt#21019
Signed-off-by: Jonas Jelonek <[email protected]>
This is an automatically generated commit which aids following Kernel patch
history, as git will see the move and copy as a rename thus defeating the
purpose.

For the original discussion see:
https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html

Signed-off-by: Kenneth Kasilag <[email protected]>
Link: openwrt#21019
Signed-off-by: Jonas Jelonek <[email protected]>
Update the kernel configuration in for kernel 6.18.

Signed-off-by: Kenneth Kasilag <[email protected]>
Link: openwrt#21019
Signed-off-by: Jonas Jelonek <[email protected]>
Remove all patches that have already been upstreamed for kernel 6.18.

Signed-off-by: Kenneth Kasilag <[email protected]>
Link: openwrt#21019
Signed-off-by: Jonas Jelonek <[email protected]>
Fix patch compatibility for kernel 6.18 on airoha.

Signed-off-by: Kenneth Kasilag <[email protected]>
Link: openwrt#21019
Signed-off-by: Jonas Jelonek <[email protected]>
Due to hardware bugs, the PCIE Gen3 IP in Airoha AN7581 requires a
special reset procedure:
> MAC reset asserted thru the SCU block
> PERST asserted thru the SCU for the desired PCIE lane
> PHY initialization runs, clocks enabled
> MAC reset deasserted
> EQ config (if needed) written
> PERST deasserted

The existing code currently toggles PERST for all three PCIE
ports every time mtk_pcie_en7581_power_up is called, resulting
in PCIE link down issues.

This issue was discovered during porting of the 6.18 kernel to
AN7581. It is not entirely clear how the hardware seemed to
function under kernel 6.12 with similar driver code, it is
presumed that differences in assert/deassert times for PERST in
6.18 changed which exposed the bug.

Signed-off-by: Kenneth Kasilag <[email protected]>
Link: openwrt#21019
Signed-off-by: Jonas Jelonek <[email protected]>
Between the upgrade from 6.12 to 6.18, the airoha-cpufreq driver
now has a `-Wincompatible-pointer-types` error while building due
to the `802-OPP-Provide-old-opp-to-config_clks-on-_set_opp` patch.

This patch revises the driver with the proper signature.

Signed-off-by: Kenneth Kasilag <[email protected]>
Link: openwrt#21019
Signed-off-by: Jonas Jelonek <[email protected]>
Patch `600-12-clk-en7523-Add-reset-controller-support-for-EN7523-S.patch`
was accepted in 6.19-rc1 (1c0608d860db973ad09b5a9ccb19b76ae07622a3).

Properly tag the patch for future reference.

Signed-off-by: Kenneth Kasilag <[email protected]>
Link: openwrt#21019
Signed-off-by: Jonas Jelonek <[email protected]>
Use the new kmod-phy-realtek driver for kernel 6.18 on
Gemtek W1700K.

The driver selection is gated using `KERNEL_PATCHVER` to
avoid build failures on 6.12.

The device tree selection is also gated by `KERNEL_PATCHVER`
to select the appropriate device tree per kernel version.

Once kernel 6.18 is tested stable for airoha these changes
can be simplified and the obsolete properties removed.

Signed-off-by: Kenneth Kasilag <[email protected]>
Link: openwrt#21019
Signed-off-by: Jonas Jelonek <[email protected]>
Refreshed automatically with `make target/linux/refresh V=s`.

Signed-off-by: Kenneth Kasilag <[email protected]>
Link: openwrt#21019
Signed-off-by: Jonas Jelonek <[email protected]>
Add building the 6.18 kernel for airoha as testing.

Signed-off-by: Kenneth Kasilag <[email protected]>
Link: openwrt#21019
Signed-off-by: Jonas Jelonek <[email protected]>
@openwrt-bot
openwrt-bot merged commit 603c95f into openwrt:main Jun 3, 2026
4 checks passed
@jonasjelonek

Copy link
Copy Markdown
Member

Thanks! Rebased on top of main and merged!

@hurrian
hurrian deleted the airoha-6.18-work branch June 3, 2026 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kernel pull request/issue with Linux kernel related changes target/airoha pull request/issue for airoha target

Projects

None yet

Development

Successfully merging this pull request may close these issues.