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: add basic kernel 6.1 support #12764
Conversation
Thanks for this, I'll try building for WZR-HP-G300NH (ath79/generic) when I have a chance. One thing I noticed after a quick look: why are you modifying the 5.15 kernel config given this is a 6.1 PR? Also, best to fix the typo "ath79: copy taregt patches" before merging. |
ath79 target has some common config files such as |
OK, I see. Probably good to note that for the commit history and to avoid confusion. I see build is missing a generic kernel setting with my config (looks like this was added in kernel 6.1):
Fix:
With that the build succeeds, but I've yet to flash and run. Will follow up later... |
Very nice you're using the R6100 :) |
v2:
@guidosarducci I refreshed them again but still not see this new symbol. Have you enabled some additional features? |
That looks more like a PCI issue rather than ath10k-ct itself, especially since getting the PCI IRQ fails with bad address |
sorry but the 200 patch looks totally wrong and the real reason should be found.... there is probably and error in how sizeof is calculated |
ran into this as well. Yes, this looks suspicious. I think this is a compiler bug. Because it doesn't complain about the | memset(&common->cc_survey, 0, sizeof(common->cc_survey)); of note here is that cc_survey is of the same struct ath_cycle_counters! Now the change to struct_group in ath_cycle_counters by itself isn't "wrong". If I was @DragonBluep then I would just post it to linux-wireless mailing list. They could be somewhat inclined to accept it (maybe just hint that this struct_group conversion is going on at the moment). What do both of you think? a less intrusive way to do it: The error/warning will go away too, though it really shows how wonky fortify_source heuristic sometimes is.
|
@chunkeey we are totally missing something or it's a bug in the fortify scan... for sure it doesn't make sense to do struct_group on the entire struct since you should be able to just reference the struct directly since the size should be the same... I'm very confused by the error |
yes precisely, this doesn't make sense. I don't know if you have looked it up. The thing in ath9k_ps_wakeup is that the code is:
these two lines are right next to one another. But the error happens only with the second memset. However both cc_ani and cc_survey are of the same ath_cycle_counters struct! That's what I'm trying to spotlight. The error happens with cc_ani memset, but it should also happen with cc_survey memset too! This wonky behavior is why I'm recommending posting this patch upstream too. I'm sure this could trigger some watchful eyes there and we get a resolution this way. |
Thanks for those changes. Note that the existing OpenWrt config option |
v3:
|
I even tried moving I will try to send this patch upstream. Although I am pretty sure that it will not be accepted since it is not a real fix. 😂 |
@guidosarducci Thanks for your report. It should be a build system issue. Maybe we need to add a new symbol to https://github.com/openwrt/openwrt/blob/main/config/Config-kernel.in. However I think it goes beyond the topic of this PR. And this problem should affect all target so we'd better to create a new issue to discuss it and open a new PR to fix it. |
I agree that this workaround is terrible, and that is why I don't call it fix. |
No, not a build system issue or something requiring Config-kernel.in changes. It's normal that if upstream Kconfig rules change we may need to preset additional generic config options.
No problem, if you prefer we'll fix it elsewhere. |
FritzBox 7490 (WASP) compiles & boots. WiFi (ath10k-ct (QCA9880) and ath9k (QCA9550)) works. Using GCC 13. I'll daily it and give it some extended uptime, but so far so good. Devices associate fine and internet seems to be working. So far even my Ring doorbell seems to work again, which had issues on 5.15? Might be unrelated though. |
This ath9k warning, it occurs with GCC12 or 13? Cause, on ipq807x with GCC12 I am not hitting it at all |
@robimarko I am using the default GCC 12. Let's see if CI will complain about it. Update: |
Hm, then its either MIPS or target related as on ipq807x which is ARM64/A53 I get no warnings with GCC12 |
Resolve conflict, refresh patches && kernel configs, nothing new. |
6060f56
to
283ea56
Compare
@chunkeey @Ansuel @PolynomialDivision GCC 13 seems to have fixed the noisy Edit: |
I'd like to say this PR is ready. |
Update: Resolve conflicts. |
Some symbols are outdated or missing due to daily kernel bumps. It's better to re-add them. All configs are automatically refreshed by 'make kernel_oldconfig CONFIG_TARGET=taget' and 'make kernel_oldconfig CONFIG_TARGET=subtarget' Signed-off-by: Shiji Yang <yangshiji66@qq.com>
The patches in the ath79 target have not been sorted for a long time and they are very chaotic now. This patch sorts them again according to the OpenWrt naming rules[1], so that we can better manage them. [1] https://openwrt.org/docs/guide-developer/toolchain/use-patches-with-buildsystem#naming_patches Signed-off-by: Shiji Yang <yangshiji66@qq.com>
This is preparation for kernel 6.1 support. Signed-off-by: Shiji Yang <yangshiji66@qq.com>
All kernel configs are refreshed by 'make kernel_oldconfig CONFIG_TARGET=target' and 'make kernel_oldconfig CONFIG_TARGET=subtarget'. upstreamed patches: 010-v5.17-spi-ar934x-fix-transfer-and-word-delays.patch 011-v5.17-spi-ar934x-fix-transfer-size.patch 020-v5.18-spi-ath79-Implement-the-spi_mem-interface.patch 030-v5.18-ath79-add-support-for-booting-QCN550x.patch build and run tested on: ath79/generic/ar7241 ath79/generic/qca9563 ath79/nand/ar9344 Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Some net APIs have changed on the new kernel. Update them to fix compile errors. Signed-off-by: Shiji Yang <yangshiji66@qq.com>
ath79 PCIe interrupt controller has stopped working correctly. This is because the DT exposing a non-sensical interrupt-map property, and their drivers relying on the kernel ignoring this property[1]. This patch fixes the PCIe init error: ath9k 0000:00:00.0: of_irq_parse_pci: failed with rc=-14 Notice: This is just a workaround, not a fix. PCIe driver and related dts node need to be rewritten. [1] https://lore.kernel.org/all/20211201114102.13446-1-maz@kernel.org/ Signed-off-by: Shiji Yang <yangshiji66@qq.com>
This patch converts the driver to immutable irq-chip, which can silence some gpio warnings. Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Make use of minor sector size (4k) erasure on supported flash chips to improve spi read/write performance. Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Been running this MR since I commented on it on May 31 and I currently have over 35 days of uptime with no issues |
Merged to my staging tree, thanks a lot! |
Signed-off-by: David Bauer <mail@david-bauer.net>
“Old, but not obsolete.”
Known issues:
It's a pcie init issue, fixed. Thanks to @robimarko
VFS: Busy inodes after unmount of jffs2
This issue exists on all targets. Unrelated to ath79.
Ref: treewide: sysupgrade warning
VFS: Busy inodes after unmount of jffs2
on spi flash devices #12891Re-plug power supply can recover the system.
Can not reproduce it now. 2023/08/03
NETGEAR R6100 syslog: