New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ath79: convert all users of ar832/37 to qca8k #4622
base: main
Are you sure you want to change the base?
Conversation
|
So the Archer C60 v1 with AR8229 wouldn't benefit from this? |
|
nope. that uses the builtin switch. |
sad. |
|
I'm putting "blocked" here, since as I understand it, this is only for testing and would break the devices still needing swconfig in its current state? |
|
@adschm I just tested. swconfig is not the issue. AR8216 is. Removed the swconfig removal. Other devices should work again. |
|
@eisaev do you have any idea why this xiaomi switch setup is so strange? for all other devices, port 6 is used for the second CPU eth, not port 5. Also, how come this is ar8327 on a device with qca9563? |
b51014e
to
427f58b
Compare
|
Patches went in the other PR. Removed from here. |
|
Testing on my C7 shows lan1 and lan3 not working properly. I have cameras connected to these ports and sometimes they connect after a while and sometimes they simply don't (log shows all ports are up though). This C7 is a dumb router connected to main router via lan2. If I switch the cable from lan2 to lan1, I also lose connection to the router. Also, is Others having similar issues? |
|
I've seen that issue with the multi CPU DSA patch. Its current incarnation is broken for some reason. Should not be an issue otherwise. |
|
@Ansuel so it turns out CONFIG_AR8216 is needed for users of the builtin switch. However when I remove the removal, the router's switch takes extra long to come up. I see this in dmesg: Any idea why this driver is being loaded? I see no compatible strings that should cause this. |
Bad driver... It does check for phy and delay boot. You can notice there is a while and a massive timeout.... We can consider adding a special binding to skip specific phy... If you want I can prepare a patch... Consider it won't be ever upstreamed, we can consider adding this hack... Or reduce the timeout/while times |
|
reducing timeout sounds better. |
I'm a little confused by that identifier, do you mean ar8327 and ar8337, i.e. ar83{2,3}7? |
|
Testing this PR on my C7 with its original version, I have problems with some devices on certain ports as reported before. I'm now testing this PR + patch "096-34-drivers-net-dsa-qca8k-add-support-for-multi-cpu" from Ansuel's PR #4036 and everything now works perfectly. Also, "ip link set lan1 link eth1" works too. |
Yes |
|
Updated PR. This now requires the qca8k backport commit to be updated. Some DTS changes were made. |
|
@mans0n that delay is because this PR no longer removes CONFIG_AR8216. Remove it and it'll work fine. This PR in its current state cannot be merged. ath79 as a target is huge and has devices for which no DSA drivers exist(realtek switches). |
This gonna make the wikis a minefield. Maybe we should just ask in the forums. Is it possible to run just an anonymous vote? ath79 backs (one of) the largest amount of downloads for existing platforms: |
|
For anyone that wants to still test this.... Can you guys test this patch? https://gist.github.com/Ansuel/70eb89a00443180fd2ab04c7ea0f2b3c Should fix the increased port setup time. |
|
@Ansuel I'll pick it up later today. Just did a big rebase of all my patches yesterday, before ipq40xx DSA was merged, but haven't flashed anything yet. I'll do one more rebase to get that one as well. |
|
@Leo-PL as said it was reported increased time for the first port setup. This should fix the problem |
|
@Leo-PL This should be the final patch https://gist.github.com/Ansuel/d1c45184fd00b5e07fa1e1757d0fa996 The main 2 test are check the time and the correctness of the 2 command
If all works correctly i would love some Tested-by tag as I need to push the fix upstream. |
|
@Leo-PL did you find time to test the patch? the powerpc target confirmed that all works good so i'm waiting for ath79 so i can push the fix upstream |
|
@Ansuel I wrote on IRC that I had no traffic after applying it, I need to rebase. Where can I find the latest backports for qca8k to base this on? |
|
Well aside from the patch for endianess everything is upstream
Il Sab 8 Ott 2022, 15:57 Lech Perczak ***@***.***> ha scritto:
… @Ansuel <https://github.com/Ansuel> I wrote on IRC that I had no traffic
after applying it, I need to rebase. Where can I find the latest backports
for qca8k to base this on?
—
Reply to this email directly, view it on GitHub
<#4622 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AE2ZMQR4DO2VUJEO2QAYVRTWCF4T5ANCNFSM5FDJAQNA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
Maybe then I shall drop multi-CPU patch and LED patch temporarily, and just use 5.15? |
|
Yes there could be a problem with multicpu or leds
Il Sab 8 Ott 2022, 16:06 Lech Perczak ***@***.***> ha scritto:
… Maybe then I shall drop multi-CPU patch and LED patch temporarily, and
just use 5.15?
—
Reply to this email directly, view it on GitHub
<#4622 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AE2ZMQXEXU6XGQCBBUJVEHLWCF5VJANCNFSM5FDJAQNA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
Okay, I'll build just master with only this patch applied. |
|
@Ansuel when flashed without clearing config, I had the same connection problems, but factory reset sorted them out. Then I found out, that your patch wasn't applied, because I put it only in hack-5.10, LOL. After: The results speak for themselves. So, Regarding the patch itself, I would optimize the loop condition in both loops replacing memcpy: with single comparison like this, with data_len precalculated outside of the loop: With that in mind, Edit: forgot to mention. This was done on Archer C7v2. |
|
@Leo-PL thanks a lot for testing this! (the 9 minutes is really funny ahahhaha) |
Great minds think alike ;-> |
|
@Leo-PL patch got accepted upstream and i backported it on master. Now everything should work correctly. |
|
@Ansuel I've been sort of daily driving this configuration and noticed today that eee is disabled by default, is there an easy patch that can be applied to change this? And shouldn't this be enabled upstream? From my linux knowledge eee is always enabled by default |
Hi, EEE is disabled per QCOM qsdk configuration. I applied the same values of the original driver. AFAIK it was problematic with some devices. Feel free to enable it with ethtool |
|
Hi, I see, this is a great power-saving feature, it's sad that it has issues in this chip, especially since it's used with many routers... |
|
Nope. ath79 is too big of a target. There's also no support for some of the builtin switches. Conversion has to start out small. |
|
Ok, I would be able to migrate for example the archer c7 v4 which is my code, but this requires one to turn off the swconfig driver as it interferes with the DSA one. |
|
subtarget is the best way forward I think. |
|
Is there anything I can do/help with? |
@Ansuel do I recall correctly, that swconfig driver for ar8237 series was refactored into a package? If so, we could leverage DEVICE_PACKAGES to migrate individual devices. We could achieve the same by enforcing matching DT compatible strings in it, to avoid collisions with DSA driver, and then proceed with individual devices, but at cost of rootfs size. We'd need to include both in DEFAULT_PACKAGES. |
|
@Leo-PL yes... also with no compatible the qca8k driver is not loaded at all... So we can just add the swconfig kmod for legacy device and add the related compatible (and NOT install the swconfig kmod) |
|
Wanted to check in if this is becoming any more realistic now that 23.05 branch/5.15 kernel is here? From my earlier understanding the 5.10 kernel was part of the reason why this couldn't move forward (another being the potential need for subtargets, which I guess a new branch is also a good opportunity for). Once I see some indications that 23.05 won't immediately brick my Archer A7, I'm also happy to help test things out. |
|
Yes and no. The swconfig driver issue needs to be fixed first. It's complicated as some ath79 devices use swconfig for realtel switches with no DSA driver available. |
qca8k is a DSA driver with potential speedups. On an Archer C7v2, I
observed a ~70mbps iperf speedup from device to router.
Signed-off-by: Rosen Penev rosenp@gmail.com
While this has successfully been tested on some devices, more testing is needed.
Devices that rely on builtin-switch will not work currently and are beyond the scope of this PR.
Review is definitely needed. All these changes were done manually. I'm sure bugs/mistakes crept in.
The best way to test would be to setup wifi access, delete /etc/config/network, and sysupgrade to avoid locking yourself out of the router.
depends on #4619
LED definitions were skipped as that can go in a separate PR. It's not clear if #4562 will get merged. If it does, they will be handled in a separate PR.