A rather trivial addition. Patches automatically rebased. Also add the new
CONFIG_USB_DWC3_OCTEON (disabled) to the generic 6.6 config and sort it, while
at it.
Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15838
Signed-off-by: Robert Marko <robimarko@gmail.com>
Set and get vlan 4k for rtl8367d family chips
Co-authored-by: Serge Vasilugin <vasilugin@yandex.ru>
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/14804
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Set and get mc index for rtl8367d family chips
Co-authored-by: Serge Vasilugin <vasilugin@yandex.ru>
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/14804
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Set and get ports speed for rtl8367d family chips
Co-authored-by: Serge Vasilugin <vasilugin@yandex.ru>
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/14804
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Detect the RTL8367D chip family and set the appropriate extif
Co-authored-by: Serge Vasilugin <vasilugin@yandex.ru>
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/14804
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Disables Data Center Bridging support for some network drivers by
default to avoid compilation errors when CONFIG_DCB is enabled.
Signed-off-by: Til Kaiser <mail@tk154.de>
Link: https://github.com/openwrt/openwrt/pull/15362
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
That patch title of 911-kobject_add_broadcast_uevent.patch has been
wrongly copied from 910-kobject_uevent.patch.
Change the description from "lib: add uevent_next_seqnum()" to
"lib: add broadcast_uevent()", so that the git history doesn't look
all weird when importing both patches to a git tree.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Ever since CONFIG_ARM64_PAN was enabled Common Not Private (CNP) is now
visible and kernel builds will stop as they are not set in kernel config
for 5.15 and 6.1.
So, lets enable Common Not Private (CNP) which is ARMv8.2 feature and will
be NOP of CPU-s that dont support it.
Fixes: a2662309aa ("kernel: Enable CONFIG_ARM64_PAN to restrict kernel access to user space memory")
Link: https://github.com/openwrt/openwrt/pull/16211
Signed-off-by: Robert Marko <robimarko@gmail.com>
Enhanced Privileged Access Never (EPAN) is an ARMv8.7 feature, and since
we dont have any SoC-s implementing it lets disable it.
Link: https://github.com/openwrt/openwrt/pull/16211
Signed-off-by: Robert Marko <robimarko@gmail.com>
Kconfig symbols CONFIG_ARM64_CNP and CONFIG_ARM64_EPAN got exposed
by enabling CONFIG_ARM64_PAN. Enable them as well, as just like for
PAN, also EPAN and CNP will be detected at runtime at no cost.
Fixes: a2662309aa ("kernel: Enable CONFIG_ARM64_PAN to restrict kernel access to user space memory")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Enable the CONFIG_ARM64_PAN kernel security option, which leverages the
ARMv8.1 Privileged Access Never (PAN) extension to prevent the kernel
from directly accessing user space memory.
Instead, copy_to_user and similar functions must be used for data
transfer between kernel and user space. This feature is automatically
disabled at runtime on CPUs without PAN support, making it a no-op in
those cases.
Link: https://github.com/openwrt/openwrt/pull/16189
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Activate the kernel option CONFIG_LIST_HARDENED for all targets.
This adds some inline checks to list_add() and list_del() operations
in the kernel. Before kernel 6.6 these checks were only available with
CONFIG_DEBUG_LIST option, but now a light version is available which
should only add very few extra instructions to such operations.
The performance penalty is very low from my point of view. It should
make it much harder to use bugs in Linux kernel list handling when
exploiting the Linux kernel.
Link: https://github.com/openwrt/openwrt/pull/16189
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This reverts commit f98f95359b.
It seems that this commit is causing issues with the PWM fan on the RPi 5 as
reported here: https://github.com/openwrt/openwrt/issues/16191
So let's revert this for now.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Add the KERNEL_BTRFS_FS config option so that targets can select
whether BTRFS support must be built-in.
Select this option (alongside KERNEL_BTRFS_FS_POSIX_ACL) from the
layerscape/armv8_64b subtarget instead of enabling it in
target/linux/layerscape/armv8_64b/config-* files.
Move disabling of CONFIG_BTRFS_FS_CHECK_INTEGRITY into generic configs.
This makes it possible for OpenWRT to be built with built-in BTRFS
support on specific boards, instead of whole targets.
Signed-off-by: Marek Behún <kabel@kernel.org>
Link: https://github.com/openwrt/openwrt/pull/15990
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Reporting an unclean read from SPI-NAND only when the maximum number
of correctable bitflip errors has been hit seems a bit late.
UBI LEB scrubbing, which depends on the lower MTD device reporting
correctable bitflips, then only kicks in when it's almost too late.
Set bitflip_threshold to 75% of the ECC strength, which is also the
default for raw NAND.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
It seems that some Xiaomi AX3000T boards changed to using Winbond W25N01KV
SPI-NAND which is not supported in OpenWrt nor upstream kernel.
So, add a pending patch to support it as upstream supports rest of the KV
revision models.
Fixes: #16002
Link: https://github.com/openwrt/openwrt/pull/16088
Signed-off-by: Robert Marko <robimarko@gmail.com>
- Enable CONFIG_HWMON and CONFIG_THERMAL_HWMON on all subtargets.
- Drop kmod-thermal from bcm2712.
- Add CONFIG_SENSORS_RASPBERRYPI_HWMON generic symbol.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Commit ec885796c0 switched the crc32 implementation from default to
byte-at-a-time algorithm, which runs slower but consumes less memory.
A decade has passed, and we have already abandoned targets that had
small memory, so switch it back to default for faster speed.
Signed-off-by: Qingfang Deng <qingfang.deng@siflower.com.cn>
Use realtek,extif property instead of realtek,extif0 to extif2
by extending it with the cpu_port parameter.
The extif number is automatically calculated based on cpu_port.
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/15749
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Store the chip type in smi->rtl8367b_chip
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/15749
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Remove the rlvid analysis because for the rtl8367b family chips supported
by the driver (rtl8367rb and rtl8367r-vb), rlvid is always equal to 1.
So the code for rlvid equal to 0 is completely unnecessary.
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/15749
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Use realtek,extif property instead of realtek,extif0 and realtek,extif1
by extending it with the cpu_port parameter.
The extif number is automatically calculated based on cpu_port.
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/15749
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This backports patches
dt-bindings: firmware: add cznic,turris-omnia-mcu binding
platform: cznic: Add preliminary support for Turris Omnia MCU
platform: cznic: turris-omnia-mcu: Add support for MCU connected GPIOs
platform: cznic: turris-omnia-mcu: Add support for poweroff and wakeup
platform: cznic: turris-omnia-mcu: Add support for MCU watchdog
platform: cznic: turris-omnia-mcu: Add support for MCU provided TRNG
ARM: dts: turris-omnia: Add MCU system-controller node
ARM: dts: turris-omnia: Add GPIO key node for front button
platform: cznic: turris-omnia-mcu: Depend on OF
platform: cznic: turris-omnia-mcu: Depend on WATCHDOG
platform: cznic: turris-omnia-mcu: fix Kconfig dependencies
that will be released in 6.11 into mvebu/patches-6.6.
Signed-off-by: Marek Behún <kabel@kernel.org>
Link: https://github.com/openwrt/openwrt/pull/13799
Signed-off-by: Robert Marko <robimarko@gmail.com>
This is a backport of netdev/net [1]/[2], expected to be in kernel 6.11
(if not backported to a stable branch).
Since 4fdc7bb8f1 (2024-06-14, switching ath79 from kernel 6.1 to 6.6),
the rtl8366s driver was made to write to bogus PHY MII registers on
ath79/netgear,wndr3800 and family, and likely on other systems using
this switch in a similar manner. The writes were directed to PHY 4 MII
registers 0x0d (13) and 0x0e (14). The rtl8366s data sheet claims these
registers are reserved. These register writes were causing the device to
not maintain link, track link status, or pass traffic on eth1 (labeled
WAN), as eth1 is connected to PHY 4.
0x0d is MII_MMD_CTRL, and 0x0e is MII_MMD_DATA. rtl8366s doesn't appear
to support MMD in any way, and certainly not via the IEEE 802.3 annex
22D "clause 45 over clause 22" protocol implemented by mmd_phy_indirect.
This patch intercepts those attempted register accesses and returns
-EOPNOTSUPP without touching the switch chip. This is implemented by
defining phy_driver::{read,write}_mmd as
genphy_{read,write}_mmd_unsupported for this PHY. A new PHY driver for
this PHY is introduced to achieve that, because this PHY was previously
using genphy_driver, and there is otherwise no clean way to declare lack
of support for these operations.
This was caused by kernel 9b01c885be36 (2023-02-13, in 6.3). The new
genphy_c45_read_eee_abilities call in genphy_read_abilities (called
during phy_probe) was causing an attempted MMD read of (MMIO_MMD_PCS,
MDIO_PCS_EEE_ABLE), which was transformed into an annex 22D
mmd_phy_indirect operation that performed MII register writes to
MII_MMD_CTRL, MII_MMD_DATA, and MII_MMD_CTRL again, followed by another
read from MII_MMD_DATA. This was enough to "scramble" the state of those
two MII registers, which are in fact not used for annex 22D MMD register
access on this device but are reserved and have some other function,
rendering the PHY unusable while so configured. The result of the
bungled MMD read attempt caused the genphy driver to incorrectly believe
that the PHY supported standard EEE, which led to several more attempted
MMD writes and reads, in turn being transformed into writes to these two
MII registers.
rtl8366s does support some pre-IEEE 802.3az EEE standard form of "Green
Ethernet" which the switch driver (local to OpenWrt) already has some
support for. No attempt is made to map the standard operations for this
device.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/commit/?id=225990c487c1
[2] https://lore.kernel.org/netdev/20240725204147.69730-1-mark@mentovai.com/
Fixes: https://github.com/openwrt/openwrt/issues/15981
Link: https://github.com/openwrt/openwrt/issues/15739
Reported-by: Russell Senior <russell@personaltelco.net>
Signed-off-by: Mark Mentovai <mark@mentovai.com>
Link: https://github.com/openwrt/openwrt/pull/16012
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Fix uninitialized variable warnings in function regcache_maple_drop
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/16004
Signed-off-by: Robert Marko <robimarko@gmail.com>
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.38
Removed target/linux/generic/hack-6.6/900-fix-build-to-handle-return-value.patch
which was introduced as a hacky attempt to fix an upstream issue related to 6.6.37.
Build system: x86/64
Build-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3
Run-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3
Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/15879
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
PMD Global Transmit Disable bit should be cleared for normal operation.
This should be HW default, however I found that on Asus RT-AX89X that uses
AQR113C PHY and firmware 5.4 this bit is set by default.
With this bit set the AQR cannot achieve a link with its link-partner and
it took me multiple hours of digging through the vendor GPL source to find
this out, so lets always clear this bit during .config_init() to avoid a
situation like this in the future.
aqr107_wait_processor_intensive_op() is moved up because datasheet notes
that any changes to this bit are processor intensive.
This is a modified version of patch that got merged upstream as AQR113C
has a separate config_init() upstream.
Link: https://github.com/openwrt/openwrt/pull/15840
Signed-off-by: Robert Marko <robimarko@gmail.com>
Trying to compile x86 or x86_64 on macOS will fail with:
openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.36/tools/include/linux/rbtree.h:21:10: fatal error: 'linux/stddef.h' file not found
After some digging, it seems that we dropped the old 212-tools_portability
patch when 6.6 x86 support was added, then Felix added back some parts of
it in ("kernel: fix tools build breakage on macos with x86") but trying to
build x86 kernels will still fail.
So, lets add more of the required changes from the 212-tools_portability
patch so that x86 kernels build on macOS.
Fixes: 69b145188f ("generic: 6.6: Removal of tools_portability.patch already included in kernel 6.6")
Link: https://github.com/openwrt/openwrt/pull/15904
Signed-off-by: Robert Marko <robimarko@gmail.com>
fit size should be rounded up instead of rounding down first and adding
a block. Otherwise the calculated size is one block more than needed
when fit size is exactly multiples of one block size.
Fixes: 9a863f803e ("kernel: mtdsplit: add support for FIT image")
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
Signed-off-by: Qingfang Deng <qingfang.deng@siflower.com.cn>
This backports the fix for the broken "nosmp" and "maxcpus=0" cmdline
params.
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
Link: https://github.com/openwrt/openwrt/pull/15811
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Add patch implementing operations to get and set flow-control link
parameters of mtk_eth_soc via ethtool.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Some devices with MediaTek SoCs don't use the first but only the second
MAC in the chip. Especially with MT7981 which got a built-in 1GE PHY
connected to the second MAC this is quite common.
Make sure to reset and enable PSE also in those cases by skipping gaps
using 'continue' instead of aborting the loop using 'break'.
Fixes: 75081235b8 ("generic: 6.6: (re-)add support multiple PPE to mtk_eth_soc")
Reported-by: Daniel Suchy <danny@danysek.cz>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Now that the issue with WED has been sorted out, re-add support for
multiple PPE to the mtk_eth_soc driver.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
"linux,ubi" compatible MTD device can be automatically attached early
since commit fc153aa8d9. Therefore, there is no need to attach MTD
devices named "ubi" or "data" again.
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Replace Aquantia pending LEDs patch with upstream version.
Sadly net maintainers didn't like integrated solution hence we still
need to handle LED restore on reset with custom solution.
Link: https://github.com/openwrt/openwrt/pull/15797
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Backport patch for G761 PWM Fan controller support. This is used by
an ipq807x RAX120v2 and have an internal clock that was currently
unconfigured making the device not working.
Link: https://github.com/openwrt/openwrt/pull/15796
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Backport upstream fix for incorrect ifdeffery and dependency of CONFIG_KEXEC,
which causes compilation errors with the following symbols:
CONFIG_CRASH_CORE=y
CONFIG_KEXEC_CORE=y
CONFIG_CRASH_DUMP=y
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
QCA808x does not currently fill in the possible_interfaces.
This leads to Phylink not being aware that it supports 2500Base-X as well
so in cases where it is connected to a DSA switch like MV88E6393 it will
limit that port to phy-mode set in the DTS.
That means that if SGMII is used you are limited to 1G only while if
2500Base-X was set you are limited to 2.5G only.
Populating the possible_interfaces fixes this, so lets backport the patches
from kernel 6.9.
This also includes a backport of the Phylink PHY validation series from
kernel 6.8 that allows the use of possible_interfaces.
Link: https://github.com/openwrt/openwrt/pull/15765
Signed-off-by: Robert Marko <robimarko@gmail.com>
Marvell Amethyst switches use a different SMI GPIO pin setup than other
switches, and since RB5009 uses Amethyst switch and its SMI bus to talk
to QCA8081 lets backport the required fix from kernel 6.9.
Link: https://github.com/openwrt/openwrt/pull/15765
Signed-off-by: Robert Marko <robimarko@gmail.com>
There are some new commits, so refresh and update patches.
Some build warnings have been fixed upstream too.
Add backport target/linux/generic/backport-6.6/722-v6.10-dt-bindings-arm-qcom-ids-Add-SoC-ID-for-IPQ5321.patch.
Removed upstream:
[-] qca-ssdk/patches/101-hsl_phy-add-support-for-detection-PSGMII-PHY-mode.patch
[-] qca-ssdk/patches/201-fix-compile-warnings.patch
List of changes:
2024-04-16 -c451136b- qca-ssdk: strip MRPPE code
2024-06-05 -f455a820- [qca-ssdk]: fix enum-int-mismatch warnings
2024-05-31 -bbfc0fa9- Merge "[qca-ssdk]: update eee status of phydev"
2024-05-31 -adbe9dc5- Merge "[qca-ssdk]: support psgmii and uqsxgmii mode of kernel"
2024-05-31 -d06ca777- Merge "[qca-ssdk]: fix 5G issue with the AQR FW that use 5gbaser for 5G speed"
2024-05-31 -c6f539a5- Merge "qca-ssdk: support mrppe pktedit padding functions"
2024-04-29 -c321e2a9- qca-ssdk: support mrppe pktedit padding functions
2024-05-24 -ee6e201e- qca-ssdk: Fix the big endian compile error
2024-05-15 -8c116bb9- [qca-ssdk]: update eee status of phydev
2024-05-20 -f0341a2c- Merge "qca-ssdk: Enable igmp for PPE MINI profile"
2024-05-16 -44a0ce93- qca-ssdk: Enable igmp for PPE MINI profile
2024-05-15 -8b91bbf6- [qca-ssdk]: support psgmii and uqsxgmii mode of kernel
2024-05-14 -7eec1658- [qca-ssdk]: fix 5G issue with the AQR FW that use 5gbaser for 5G speed
2024-05-12 -b9f5ea0e- [qca-ssdk]: ethtool support, do not change wake-up timer when the requested timer is 0
2024-05-09 -5e2c15ed- Merge "[qca-ssdk]: remove check when mht clock enable"
2024-05-09 -a1563b90- Merge "[qca-ssdk] support new sku IPQ5321"
2024-04-23 -f04b7680- [qca-ssdk]: show unknown status when link down
2024-03-22 -33b91b30- [qca-ssdk]: remove check when mht clock enable
2024-04-29 -b6362f2b- Merge "qca-ssdk:fix bug in marina nptv6 iid cal"
2024-04-29 -097033ae- Merge "[qca-ssdk] support cypress uniphy0 connecting MHT switch port0"
2024-04-24 -d45560fd- qca-ssdk:fix bug in marina nptv6 iid cal
2024-04-24 -7d7a42af- qca-ssdk: enable policer counter on low memory profile
2024-04-18 -e36cf6ea- Merge "[qca-ssdk]: change portvlan egress mode initial value as untouched"
2024-04-18 -27817881- Merge "[qca-ssdk]: update the aqr phy supported ability"
2024-04-18 -5a3a693c- Merge "qca-ssdk:support marina nptv6"
2024-04-16 -129fe9b3- Merge "qca-ssdk: support tunnel fields and innner fields inverse"
2024-01-09 -fc8f6abd- qca-ssdk:support marina nptv6
Signed-off-by: Kristian Skramstad <kristian+github@83.no>
Link: https://github.com/openwrt/openwrt/pull/15771
Signed-off-by: Robert Marko <robimarko@gmail.com>
Currently, information from MikroTik hard_config is only available via
sysfs, meaning that we have to rely on userspace to for example setup MACs.
So, lets provide a basic NVMEM layout based driver to expose the same cells
as sysfs driver exposes.
Do note that the we dont extract the WLAN caldata and BDF-s at this point.
Reviewed-by: Thibaut VARÈNE <hacks@slashdirt.org>
Link: https://github.com/openwrt/openwrt/pull/15665
Signed-off-by: Robert Marko <robimarko@gmail.com>
Move the hard config tag ID-s to a separate header so they can be reused
by the NVMEM driver as well.
Link: https://github.com/openwrt/openwrt/pull/15665
Signed-off-by: Robert Marko <robimarko@gmail.com>
Replace Silicon Labs patch with upstream version as they got merged in
kernel 6.3.
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
[ rework commit title and description, use better patch ]
Link: https://github.com/openwrt/openwrt/pull/15300
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Refresh patches as line numbers changed with newer upstream version
since original backport PR was opened.
Fixes: a5c095c453 ("generic: 6.6: replace (broken) downstream patch with upstream solution")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Our downstream patch "net/core: add optional threading for backlog processing"
has been broken with the switch to Linux 6.6.
Replace it by backporting the now available upstream solution.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Link: https://github.com/openwrt/openwrt/pull/15592
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Partially revert commit 98ddfbc56a ("generic: 6.6: backport upstream
commits for mtk_eth_soc") as the commit breaks WED. A better solution to
assign PPE units in case of WED has still to be found.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>