-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'openwrt:main' into mvebu-6.6
- Loading branch information
Showing
102 changed files
with
5,892 additions
and
2,394 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
98 changes: 98 additions & 0 deletions
98
package/kernel/qca-ssdk/patches/103-mdio-adapt-to-C22-and-C45-read-write-split.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
From bdae481e89cbe551068a99028bb57119b59f5ff4 Mon Sep 17 00:00:00 2001 | ||
From: Robert Marko <robimarko@gmail.com> | ||
Date: Tue, 26 Mar 2024 12:19:49 +0100 | ||
Subject: [PATCH] mdio: adapt to C22 and C45 read/write split | ||
|
||
Kernel 6.3 has introduced separate C45 read/write operations, and thus | ||
split them out of the C22 operations completely so the old way of marking | ||
C45 reads and writes via the register value does not work anymore. | ||
|
||
This is causing SSDK to fail and find C45 only PHY-s such as Aquantia ones: | ||
[ 22.187877] ssdk_phy_driver_init[371]:INFO:dev_id = 0, phy_adress = 8, phy_id = 0x0 phytype doesn't match | ||
[ 22.209924] ssdk_phy_driver_init[371]:INFO:dev_id = 0, phy_adress = 0, phy_id = 0x0 phytype doesn't match | ||
|
||
This in turn causes USXGMII MAC autoneg bit to not get set and then UNIPHY | ||
autoneg will time out, causing the 10G ports not to work: | ||
[ 37.292784] uniphy autoneg time out! | ||
|
||
So, lets detect C45 reads and writes by the magic BIT(30) in the register | ||
argument and if so call separate C45 mdiobus read/write functions. | ||
|
||
Signed-off-by: Robert Marko <robimarko@gmail.com> | ||
--- | ||
include/init/ssdk_plat.h | 7 +++++++ | ||
src/init/ssdk_plat.c | 30 ++++++++++++++++++++++++++++++ | ||
2 files changed, 37 insertions(+) | ||
|
||
--- a/include/init/ssdk_plat.h | ||
+++ b/include/init/ssdk_plat.h | ||
@@ -505,3 +505,10 @@ void ssdk_plat_exit(a_uint32_t dev_id); | ||
|
||
#endif | ||
/*qca808x_end*/ | ||
+ | ||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,3,0)) | ||
+#define MII_ADDR_C45 (1<<30) | ||
+#define MII_DEVADDR_C45_SHIFT 16 | ||
+#define MII_DEVADDR_C45_MASK GENMASK(20, 16) | ||
+#define MII_REGADDR_C45_MASK GENMASK(15, 0) | ||
+#endif | ||
--- a/src/init/ssdk_plat.c | ||
+++ b/src/init/ssdk_plat.c | ||
@@ -356,6 +356,18 @@ phy_addr_validation_check(a_uint32_t phy | ||
return A_TRUE; | ||
} | ||
|
||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,3,0)) | ||
+static inline u16 mdiobus_c45_regad(u32 regnum) | ||
+{ | ||
+ return FIELD_GET(MII_REGADDR_C45_MASK, regnum); | ||
+} | ||
+ | ||
+static inline u16 mdiobus_c45_devad(u32 regnum) | ||
+{ | ||
+ return FIELD_GET(MII_DEVADDR_C45_MASK, regnum); | ||
+} | ||
+#endif | ||
+ | ||
sw_error_t | ||
qca_ar8327_phy_read(a_uint32_t dev_id, a_uint32_t phy_addr, | ||
a_uint32_t reg, a_uint16_t* data) | ||
@@ -371,9 +383,18 @@ qca_ar8327_phy_read(a_uint32_t dev_id, a | ||
if (!bus) | ||
return SW_NOT_SUPPORTED; | ||
phy_addr = TO_PHY_ADDR(phy_addr); | ||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,3,0)) | ||
+ mutex_lock(&bus->mdio_lock); | ||
+ if (reg & MII_ADDR_C45) | ||
+ *data = __mdiobus_c45_read(bus, phy_addr, mdiobus_c45_devad(reg), mdiobus_c45_regad(reg)); | ||
+ else | ||
+ *data = __mdiobus_read(bus, phy_addr, reg); | ||
+ mutex_unlock(&bus->mdio_lock); | ||
+#else | ||
mutex_lock(&bus->mdio_lock); | ||
*data = __mdiobus_read(bus, phy_addr, reg); | ||
mutex_unlock(&bus->mdio_lock); | ||
+#endif | ||
|
||
return 0; | ||
} | ||
@@ -393,9 +414,18 @@ qca_ar8327_phy_write(a_uint32_t dev_id, | ||
if (!bus) | ||
return SW_NOT_SUPPORTED; | ||
phy_addr = TO_PHY_ADDR(phy_addr); | ||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,3,0)) | ||
+ mutex_lock(&bus->mdio_lock); | ||
+ if (reg & MII_ADDR_C45) | ||
+ __mdiobus_c45_write(bus, phy_addr, mdiobus_c45_devad(reg), mdiobus_c45_regad(reg), data); | ||
+ else | ||
+ __mdiobus_write(bus, phy_addr, reg, data); | ||
+ mutex_unlock(&bus->mdio_lock); | ||
+#else | ||
mutex_lock(&bus->mdio_lock); | ||
__mdiobus_write(bus, phy_addr, reg, data); | ||
mutex_unlock(&bus->mdio_lock); | ||
+#endif | ||
|
||
return 0; | ||
} |
27 changes: 27 additions & 0 deletions
27
...k/services/hostapd/patches/999-build-make-_make_dirs-robust-against-too-long-argume.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
From beeef79701082a82b2581a674e702ea60a358ce7 Mon Sep 17 00:00:00 2001 | ||
From: Robert Marko <robimarko@gmail.com> | ||
Date: Sun, 24 Mar 2024 20:47:06 +0100 | ||
Subject: [PATCH] build: make _make_dirs robust against too long argument error | ||
|
||
_make_dirs currently can fail as _DIRS can be really long and thus go over | ||
the MAX_ARG_STRLEN limit so it will fail with: | ||
/bin/sh: Argument list too long | ||
|
||
Lets avoid this by stripping the $(BUILDDIR) prefix and then restoring it. | ||
|
||
Signed-off-by: Robert Marko <robimarko@gmail.com> | ||
--- | ||
src/build.rules | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
--- a/src/build.rules | ||
+++ b/src/build.rules | ||
@@ -80,7 +80,7 @@ endif | ||
_DIRS := $(BUILDDIR)/$(PROJ) | ||
.PHONY: _make_dirs | ||
_make_dirs: | ||
- @mkdir -p $(_DIRS) | ||
+ @printf '$(BUILDDIR)/%s ' $(patsubst $(BUILDDIR)/%,%,$(_DIRS)) | xargs mkdir -p | ||
|
||
$(BUILDDIR)/$(PROJ)/src/%.o: $(ROOTDIR)src/%.c $(CONFIG_FILE) | _make_dirs | ||
$(Q)$(CC) -c -o $@ $(CFLAGS) $< |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
target/linux/airoha/files-5.15/arch/arm/mach-airoha/airoha.c
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.