Importing pending patch "net: dsa: mt7530: move MT753X_MTRAP operations
for MT7530" broke WAN connectivity on most MT7621 which use PHY-muxing
to hook up either port 0 or port 4 to GMAC1.
Remove it for now until the author submits a fixed version.
Fixes: https://github.com/openwrt/openwrt/issues/15279
Fixes: https://github.com/openwrt/openwrt/issues/15273
Fixes: d40691a5fb ("generic: 6.1, 6.6: mt7530: import pending patches")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
The backports introduced in commit d40756563c ("kernel: backport
phylink changes from mainline Linux") broke the mv88e6xxx DSA driver.
A backport to fix this was added to the kirkwood target, but as it is
used in multiple targets, and there's a kmod package for it, the fix
should be in generic backports.
This fixes the switch on the WatchGuard Firebox M300 when running the
6.1 testing kernel.
There is no need to backport the fix for the 6.6 kernel, as it was
included in 6.6.5.
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
For packets not belonging to a local socket, use fraglist GRO instead of
regular GRO. This make segmenting packets very cheap and avoids the need for
selectively disabling GRO
Signed-off-by: Felix Fietkau <nbd@nbd.name>
net: dsa: mt7530: explain exposing MDIO bus of MT7531AE better
net: dsa: mt7530: do not pass port variable to mt7531_rgmii_setup()
net: dsa: mt7530: use priv->ds->num_ports instead of MT7530_NUM_PORTS
net: dsa: mt7530: get rid of mac_port_validate member of mt753x_info
net: dsa: mt7530: refactor MT7530_PMEEECR_P()
net: dsa: mt7530: get rid of function sanity check
net: dsa: mt7530: define MAC speed capabilities per switch model
net: dsa: mt7530: return mt7530_setup_mdio & mt7531_setup_common on error
net: dsa: mt7530: move MT753X_MTRAP operations for MT7530
net: dsa: mt7530: refactor MT7530_HWTRAP and MT7530_MHWTRAP
net: dsa: mt7530: refactor MT7530_MFC and MT7531_CFC, add MT7531_QRY_FFP
net: dsa: mt7530: rename mt753x_bpdu_port_fw enum to mt753x_to_cpu_fw
net: dsa: mt7530: rename p5_intf_sel and use only for MT7530 switch
net: dsa: mt7530: refactor MT7530_PMCR_P()
net: dsa: mt7530: disable EEE abilities on failure on MT7531 and MT7988
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Import patches for the MT7530 DSA driver from net-next tree:
cae425cb43fe net: dsa: allow DSA switch drivers to provide their own phylink mac ops
dd0c9855b413 net: dsa: introduce dsa_phylink_to_port()
7c5e37d7ee78 net: dsa: mt7530: simplify core operations
868ff5f4944a net: dsa: mt7530-mdio: read PHY address of switch from device tree
2c606d138518 net: dsa: mt7530: fix port mirroring for MT7988 SoC switch
d59cf049c837 net: dsa: mt7530: fix mirroring frames received on local port
62d6d91db98a net: dsa: mt7530: provide own phylink MAC operations
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Fix broken BoHong bh25q128as patch that used wrong define for kernel
5.15.
Fixes: 4cb814d403 ("generic: 5.15: Make support for BoHong bh25q128as generic")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Fixes no communication with tethered iOS devices in CDC NCM mode.
Freshly booted iOS devices start in legacy mode, but are put into
NCM mode by the official Apple driver.
[1] a2d274c62eFixes: #12566
Tested-by: Georgi Valkov <gvalkov@gmail.com>
Signed-off-by: Foster Snowhill <forst@pen.gy>
Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
[ better reference fixed issue ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Move the patch for BoHong bh25q128as out of ramips to make it
generic. Not including 6.1.y since the mtd subsystem has changed,
and does not need these changes.
Patch was dropped with ramips updating to 6.1, hence we reintroudce it
here for 5.15 generic.
5.15.y functionality was verified on a Wavlink WL-WN586X3 Rev.a.
Signed-off-by: R Maru <deviantmaru@gmail.com>
[ rebase and add extra info in commit description ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Backport patches for support of generic spi-nor from SFDP data for
kernel 6.1.
Kernel 5.15 have major rework of the info flags and it's not trustable
to backport this amount of changes and expect correct function of it.
All affected patches automatically refreshed using make
target/linux/refresh.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Kernel 6.1.83 allows to select CONFIG_GPIO_VF610, deactivate it by
default.
This fixes compilation of the armsr/armv8 target.
Fixes: 2ad898e091 ("kernel: bump 6.1 to 6.1.83")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Add pending patches to add LED_FUNCTION_MOBILE and LED_FUNCTION_SPEED_*
definitions for Fortinet FortiGate devices and IIJ SA-W2.
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
This reordering was done using these commands:
./scripts/kconfig.pl '+' target/linux/generic/config-6.1 /dev/null > target/linux/generic/config-6.1-new
mv target/linux/generic/config-6.1-new target/linux/generic/config-6.1
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
First patch allows to inquire and modify Energy-Efficient-Ethernet
(EEE) settings via ethtool and thereby override the default setting of
a board done via bootstrap pins.
The second patch fixes a long-standing issue with STP (and similar
protocols) when using boards (or SoCs) governed by the mt7530 DSA
driver.
Both patches could also be (dirty-)applied to Linux 5.15, but I'd
rather just wait for that to happen via linux-stable to avoid the
mess.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Backport lots upstream changes, many of them fixes, for the mt7530 DSA
driver, similar to how it was done for Linux 6.1 in the previous commit.
The remaining differences compared to the upstream driver are only
the 'slave' -> 'user', 'master' -> 'conduit' language change in DSA
and the rename of 'struct ethtool_eee' to 'struct ethtool_keee' as
well as tree-wide replacement of ethtool_sprintf with ethtool_puts,
all of them do not have any functional impact.
Apart from some minor bug fixes and style improvements the switch
should now behave more conformant when it comes to link-local frames,
and we will again be able to cleanly pick patches from upstream.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Backport lots upstream changes, many of them fixes, for the mt7530 DSA
driver. Some of them may or may not find they way into Linux 6.1
stable, some certainly won't because they are fixes for backported
commits which aren't even present in Linux 6.1 upstream.
Apart from adding new patches, also remove mutated patch
723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch
which should never have been added for Linux 6.1 -- it was applied
already upstream but coincidentally would fuzzy-apply in the wrong
place as well (for MT7530 instead of MT7531). While that didn't really
hurt anyone it is just unneeded.
The other deleted patch
795-mt7530-register-OF-node-for-internal-MDIO-bus.patch
has been replaced by an equivalent commit with a more complete patch
description by upstream maintainer Arınç Ünal.
The remaining differences compared to the upstream driver are:
* C22/C45 MDIO ops aren't split
Upstream did that, backporting it would require making changes to
*all* DSA drivers
* 'slave' -> 'user', 'master' -> 'conduit' language change in DSA
* support for selecting preferred CPU port on MT7531
Also this would require too many DSA framework changes potentially
affecting other devices. If we ever really use Linux 6.1 in a
release (I hope not) we can still reconsider to make the effort to
backport that.
In addition to some minor bug fixes and style improvements the switch
should now behave more conformant when it comes to link-local frames,
and we will again be able to cleanly pick patches from upstream.
MAINTAIERS NOTE:
Three patches are already part of Linux stable and should be removed with
the next minor kernel version bump:
789-STABLE-01-net-dsa-mt7530-prevent-possible-incorrect-XTAL-frequ.patch
789-STABLE-02-net-dsa-mt7530-fix-link-local-frames-that-ingress-vl.patch
789-STABLE-03-net-dsa-mt7530-fix-handling-of-all-link-local-frames.patch
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Make sure all patches can be applied to a git tree using 'git am'
by adding missing patch headers where needed.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Kernel 6.6 added dynamic SWIOTLB allocation, but with it also started
allocating 64MB of the SWIOTLB bounce buffer by default which is quite a
lot of memory on most OpenWrt devices.
Luckily in kernel 6.7 arm64 received an optimization that reduces that
default size to 1MB per 1GB of RAM if certain criteria was met.
So in order to reclaim back 63MB of RAM which brought some ipq807x devices
close to OOM under load lets backport the upstream commit.
Signed-off-by: Robert Marko <robimarko@gmail.com>
Refresh backport patches for kernel 6.1.82 with make target/linux/refresh.
Fixes: 06cdc07f8c ("ath79: add support for Huawei AP5030DN")
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Huawei AP5030DN is a dual-band, dual-radio 802.11ac Wave 1 3x3 MIMO
enterprise access point with two Gigabit Ethernet ports and PoE
support.
Hardware highlights:
- CPU: QCA9550 SoC at 720MHz
- RAM: 256MB DDR2
- Flash: 32MB SPI-NOR
- Wi-Fi 2.4GHz: QCA9550-internal radio
- Wi-Fi 5GHz: QCA9880 PCIe WLAN SoC
- Ethernet 1: 10/100/1000 Mbps Ethernet through Broadcom B50612E PHY
- Ethernet 2: 10/100/1000 Mbps Ethernet through Marvell 88E1510 PHY
- PoE: input through Ethernet 1 port
- Standalone 12V/2A power input
- Serial console externally available through RJ45 port
- External watchdog: SGM706 (1.6s timeout)
Serial console:
9600n8 (9600 baud, no stop bits, no parity, 8 data bits)
MAC addresses:
Each device has 32 consecutive MAC addresses allocated by
the vendor, which don't overlap between devices.
This was confirmed with multiple devices with consecutive
serial numbers.
The MAC address range starts with the address on the label.
To be able to distinguish between the interfaces,
the following MAC address scheme is used:
- eth0 = label MAC
- eth1 = label MAC + 1
- radio0 (Wi-Fi 5GHz) = label MAC + 2
- radio1 (Wi-Fi 2.4GHz) = label MAC + 3
Installation:
0. Connect some sort of RJ45-to-USB adapter to "Console" port of the AP
1. Power up the AP
2. At prompt "Press f or F to stop Auto-Boot in 3 seconds",
do what they say.
Log in with default admin password "admin@huawei.com".
3. Boot the OpenWrt initramfs from TFTP using the hidden script
"run ramboot". Replace IP address as needed:
> setenv serverip 192.168.1.10
> setenv ipaddr 192.168.1.1
> setenv rambootfile
openwrt-ath79-generic-huawei_ap5030dn-initramfs-kernel.bin
> saveenv
> run ramboot
4. Optional but recommended as the factory firmware cannot
be downloaded publicly:
Back up contents of "firmware" partition using the web interface or ssh:
$ ssh root@192.168.1.1 cat /dev/mtd11 > huawei_ap5030dn_fw_backup.bin
5. Run sysupgrade using sysupgrade image. OpenWrt
shall boot from flash afterwards.
Return to factory firmware (using firmware upgrade package downloaded from
non-public Huawei website):
1. Start a TFTP server in the directory where
the firmware upgrade package is located
2. Boot to u-boot as described above
3. Install firmware upgrade package and format the config partitions:
> update system FatAP5X30XN_SOMEVERSION.bin
> format_fs
Return to factory firmware (from previously created backup):
1. Copy over the firmware partition backup to /tmp,
for example using scp
2. Use sysupgrade with force to restore the backup:
sysupgrade -F huawei_ap5030dn_fw_backup.bin
3. Boot AP to U-Boot as described above
Quirks and known issues
-----------------------
- On initial power-up, the Huawei-modified bootloader suspends both
ethernet PHYs (it sets the "Power Down" bit in the MII control
register). Unfortunately, at the time of the initial port, the kernel
driver for the B50612E/BCM54612E PHY behind eth0 doesn't have a resume
callback defined which would clear this bit. This makes the PHY unusable
since it remains suspended forever. This is why the backported kernel
patches in this commit are required which add this callback and for
completeness also a suspend callback.
- The stock firmware has a semi dual boot concept where the primary
kernel uses a squashfs as root partition and the secondary kernel uses
an initramfs. This dual boot concept is circumvented on purpose to gain
more flash space and since the stock firmware's flash layout isn't
compatible with mtdsplit.
- The external watchdog's timeout of 1.6s is very hard to satisfy
during bootup. This is why the GPIO15 pin connected to the watchdog input
is configured directly in the LZMA loader to output the CPU_CLK/4 signal
which keeps the watchdog happy until the wdt-gpio kernel driver takes
over. Because it would also take too long to read the whole kernel image
from flash, the uImage header only includes the loader which then reads
the kernel image from flash after GPIO15 is configured.
Signed-off-by: Marco von Rosenberg <marcovr@selfnet.de>
[fixed 6.6 backport patch naming]
Signed-off-by: David Bauer <mail@david-bauer.net>
On x86, the build failed while trying to compile tools/lib/string.c because
of a clash with the system provided implementation for strlcpy
Add ifdefs to prevent the conflict.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
It's required to support NAND controllers with WP pin on boards that
don't have it connected to NAND chip.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Backport AXP15060, AXP313a and AXP192 support.
The AXP15060 PMIC is used for starfive boards,
and the AXP313a PMIC is used for sunxi boards.
Remove conflicting patches from starfive target.
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Fix issue of transmitting abnormal data which leads to link problems
in 1G and 2.5G SerDes modes (SGMII, 1000Base-X, 2500Base-X) on the
MediaTek MT7988 SoC.
Link: b72d6cba92
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
When rebasing patches on top of 6.1, a change that removed NF_TABLES
from NF_FLOW_TABLE's dependency was dropped accidentally, and iptables
flow offload module can only be built when nftables is selected.
Restore the change to fix it.
Fixes: 19a246bb65 ("generic: 6.1: manually refresh hack patches")
Signed-off-by: Qingfang Deng <dqfext@gmail.com>