From eea264feadcf01682fbe57bec8e251e841d309b3 Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Tue, 7 Nov 2023 14:47:15 +0100 Subject: [PATCH] kernel: qca-ssdk: update to 12.4 Update SSDK version to 12.4, this fixes weird SFP port link up/downs while there is no SFP module plugged in. Signed-off-by: Robert Marko --- package/kernel/qca-ssdk/Makefile | 6 ++-- ...7x-add-a-LED-quirk-for-Xiaomi-AX9000.patch | 34 +++++++++---------- ...7x-add-a-LED-quirk-for-Xiaomi-AX3600.patch | 22 ++++++------ ...enable-invoking-fdb-del-function-for.patch | 30 ++++++++++++++++ 4 files changed, 60 insertions(+), 32 deletions(-) create mode 100644 package/kernel/qca-ssdk/patches/0003-Revert-qca-ssdk-enable-invoking-fdb-del-function-for.patch diff --git a/package/kernel/qca-ssdk/Makefile b/package/kernel/qca-ssdk/Makefile index f8359a98c5..f5d8260503 100644 --- a/package/kernel/qca-ssdk/Makefile +++ b/package/kernel/qca-ssdk/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE:=1 PKG_SOURCE_URL:=https://git.codelinaro.org/clo/qsdk/oss/lklm/qca-ssdk.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2023-06-06 -PKG_SOURCE_VERSION:=74caf88aa3b6793c300f676e4fb1c62da7507be9 -PKG_MIRROR_HASH:=6bdb90919b773f5fb432c8b374c9419feac32ba6583ad82dfec5e41628a32dd9 +PKG_SOURCE_DATE:=2023-10-04 +PKG_SOURCE_VERSION:=23a5aa4a4d5834da7a07efb58baebfbee91786b0 +PKG_MIRROR_HASH:=9d169ce924a46a4e530031061d3183b92f23c7f46b3106f0b9ba3587846a73ee PKG_FLAGS:=nonshared PKG_BUILD_FLAGS:=no-lto diff --git a/package/kernel/qca-ssdk/patches/0001-qca807x-add-a-LED-quirk-for-Xiaomi-AX9000.patch b/package/kernel/qca-ssdk/patches/0001-qca807x-add-a-LED-quirk-for-Xiaomi-AX9000.patch index da5387dafc..c627c82898 100644 --- a/package/kernel/qca-ssdk/patches/0001-qca807x-add-a-LED-quirk-for-Xiaomi-AX9000.patch +++ b/package/kernel/qca-ssdk/patches/0001-qca807x-add-a-LED-quirk-for-Xiaomi-AX9000.patch @@ -1,7 +1,7 @@ -From cdcafa28c857e4d04c9210feb54dc84e427061fe Mon Sep 17 00:00:00 2001 +From 1d37f4ee9b9588a62bfc87419c8a6d9ef989aa9c Mon Sep 17 00:00:00 2001 From: Robert Marko -Date: Tue, 11 Jan 2022 00:28:42 +0100 -Subject: [PATCH 1/2] qca807x: add a LED quirk for Xiaomi AX9000 +Date: Tue, 7 Nov 2023 12:23:09 +0100 +Subject: [PATCH 1/3] qca807x: add a LED quirk for Xiaomi AX9000 Xiaomi AX9000 has a single LED for each of 4 gigabit ethernet ports that are connected to QCA8075, and that LED is connected to the 100M LED pin. @@ -16,9 +16,9 @@ as well. Signed-off-by: Robert Marko --- - include/hsl/phy/malibu_phy.h | 2 ++ - src/hsl/phy/malibu_phy.c | 11 +++++++++++ - 2 files changed, 13 insertions(+) + include/hsl/phy/malibu_phy.h | 2 ++ + src/hsl/phy/malibu_phy.c | 9 +++++++++ + 2 files changed, 11 insertions(+) --- a/include/hsl/phy/malibu_phy.h +++ b/include/hsl/phy/malibu_phy.h @@ -49,19 +49,17 @@ Signed-off-by: Robert Marko #include "sw.h" #include "fal_port_ctrl.h" #include "hsl_api.h" -@@ -2716,6 +2718,15 @@ malibu_phy_hw_init(a_uint32_t dev_id, a_ - led_status |= MALIBU_LED_1000_CTRL1_100_10_MASK; - malibu_phy_mmd_write(dev_id, phy_addr, MALIBU_PHY_MMD7_NUM, - MALIBU_PHY_MMD7_LED_1000_CTRL1, led_status); +@@ -1809,6 +1811,13 @@ malibu_phy_hw_init(a_uint32_t dev_id, a_ + hsl_phy_modify_mmd(dev_id, phy_addr, A_FALSE, MALIBU_PHY_MMD7_NUM, + MALIBU_PHY_MMD7_LED_1000_CTRL1, MALIBU_LED_1000_CTRL1_100_10_MASK, + MALIBU_LED_1000_CTRL1_100_10_MASK); + if (of_machine_is_compatible("xiaomi,ax9000")) { + /* add 1000M link LED behavior for Xiaomi AX9000 */ -+ led_status = malibu_phy_mmd_read(dev_id, phy_addr, MALIBU_PHY_MMD7_NUM, -+ MALIBU_PHY_MMD7_LED_100_CTRL1); -+ led_status &= ~MALIBU_LED_100_CTRL1_1000_MASK; -+ led_status |= MALIBU_LED_100_CTRL1_1000_MASK; -+ malibu_phy_mmd_write(dev_id, phy_addr, MALIBU_PHY_MMD7_NUM, -+ MALIBU_PHY_MMD7_LED_100_CTRL1, led_status); ++ hsl_phy_modify_mmd(dev_id, phy_addr, A_FALSE, MALIBU_PHY_MMD7_NUM, ++ MALIBU_PHY_MMD7_LED_100_CTRL1, ++ MALIBU_LED_100_CTRL1_1000_MASK, ++ MALIBU_LED_100_CTRL1_1000_MASK); + } /*disable Extended next page*/ - phy_data = malibu_phy_reg_read(dev_id, phy_addr, MALIBU_AUTONEG_ADVERT); - phy_data &= ~MALIBU_EXTENDED_NEXT_PAGE_EN; + hsl_phy_modify_mii(dev_id, phy_addr, MALIBU_AUTONEG_ADVERT, + MALIBU_EXTENDED_NEXT_PAGE_EN, 0); diff --git a/package/kernel/qca-ssdk/patches/0002-qca807x-add-a-LED-quirk-for-Xiaomi-AX3600.patch b/package/kernel/qca-ssdk/patches/0002-qca807x-add-a-LED-quirk-for-Xiaomi-AX3600.patch index 9d456b2399..cfbb6cc771 100644 --- a/package/kernel/qca-ssdk/patches/0002-qca807x-add-a-LED-quirk-for-Xiaomi-AX3600.patch +++ b/package/kernel/qca-ssdk/patches/0002-qca807x-add-a-LED-quirk-for-Xiaomi-AX3600.patch @@ -1,7 +1,7 @@ -From a750e569aeb4f7b454dbde18cd6d0f2bb1875dfa Mon Sep 17 00:00:00 2001 +From 957ee476ddec289973e0af07917da7bfee660af0 Mon Sep 17 00:00:00 2001 From: Robert Marko -Date: Wed, 26 Jan 2022 14:47:33 +0100 -Subject: [PATCH 2/2] qca807x: add a LED quirk for Xiaomi AX3600 +Date: Tue, 7 Nov 2023 12:24:17 +0100 +Subject: [PATCH 2/3] qca807x: add a LED quirk for Xiaomi AX3600 AX3600 requires the same LED quirk so that PHY LED-s will blink even once Linux resets the PHY. @@ -15,15 +15,15 @@ Signed-off-by: Robert Marko --- a/src/hsl/phy/malibu_phy.c +++ b/src/hsl/phy/malibu_phy.c -@@ -2718,8 +2718,9 @@ malibu_phy_hw_init(a_uint32_t dev_id, a_ - led_status |= MALIBU_LED_1000_CTRL1_100_10_MASK; - malibu_phy_mmd_write(dev_id, phy_addr, MALIBU_PHY_MMD7_NUM, - MALIBU_PHY_MMD7_LED_1000_CTRL1, led_status); +@@ -1811,8 +1811,9 @@ malibu_phy_hw_init(a_uint32_t dev_id, a_ + hsl_phy_modify_mmd(dev_id, phy_addr, A_FALSE, MALIBU_PHY_MMD7_NUM, + MALIBU_PHY_MMD7_LED_1000_CTRL1, MALIBU_LED_1000_CTRL1_100_10_MASK, + MALIBU_LED_1000_CTRL1_100_10_MASK); - if (of_machine_is_compatible("xiaomi,ax9000")) { - /* add 1000M link LED behavior for Xiaomi AX9000 */ -+ /* add 1000M link LED behavior for Xiaomi boards */ + if (of_machine_is_compatible("xiaomi,ax9000") || + of_machine_is_compatible("xiaomi,ax3600")) { - led_status = malibu_phy_mmd_read(dev_id, phy_addr, MALIBU_PHY_MMD7_NUM, - MALIBU_PHY_MMD7_LED_100_CTRL1); - led_status &= ~MALIBU_LED_100_CTRL1_1000_MASK; ++ /* add 1000M link LED behavior for Xiaomi boards */ + hsl_phy_modify_mmd(dev_id, phy_addr, A_FALSE, MALIBU_PHY_MMD7_NUM, + MALIBU_PHY_MMD7_LED_100_CTRL1, + MALIBU_LED_100_CTRL1_1000_MASK, diff --git a/package/kernel/qca-ssdk/patches/0003-Revert-qca-ssdk-enable-invoking-fdb-del-function-for.patch b/package/kernel/qca-ssdk/patches/0003-Revert-qca-ssdk-enable-invoking-fdb-del-function-for.patch new file mode 100644 index 0000000000..e69edbd3a3 --- /dev/null +++ b/package/kernel/qca-ssdk/patches/0003-Revert-qca-ssdk-enable-invoking-fdb-del-function-for.patch @@ -0,0 +1,30 @@ +From 73c0992a36bc13e9bb373f98ba246dfc1e29a393 Mon Sep 17 00:00:00 2001 +From: Robert Marko +Date: Tue, 7 Nov 2023 14:21:43 +0100 +Subject: [PATCH 3/3] Revert "[qca-ssdk]: enable invoking fdb del function for + kernel6.1" + +This reverts commit a86765ee6a87145f64344f4872cfe8c5e629dd62. + +Upstream kernel does not have this call present at all, we currently +also dont use it, so revert the commit enabling it. + +Signed-off-by: Robert Marko +--- + src/ref/ref_acl.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/src/ref/ref_acl.c ++++ b/src/ref/ref_acl.c +@@ -229,7 +229,11 @@ _ref_acl_mac_entry_create_rule(a_uint32_ + eth_dev = dev_get_by_name(&init_net, entry->ifname); + if (eth_dev) + { ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)) ++ // TODO: replace with corresponding ver ++#else + br_fdb_delete_by_netdev(eth_dev, entry->src_mac.uc, 0); ++#endif + dev_put(eth_dev); + } + } -- 2.30.2