diff --git a/qca/qca-nss-dp/Makefile b/qca/qca-nss-dp/Makefile index 00b61bc..1762767 100644 --- a/qca/qca-nss-dp/Makefile +++ b/qca/qca-nss-dp/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE_URL:=https://git.codelinaro.org/clo/qsdk/oss/lklm/nss-dp.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2021-03-26 -PKG_SOURCE_VERSION:=e0c89348d5ad99559ce2fbe15d37b3b5bc66aa03 -PKG_MIRROR_HASH:=f369f0c3b33b5f4ad6d0a6ad6ac5495f63c9ecaf94e4e7fa345169f3e44fcf45 +PKG_SOURCE_DATE:=2022-04-30 +PKG_SOURCE_VERSION:=72e9ec4187414461cbcf6ccff100e8b5ebe5f40b +PKG_MIRROR_HASH:=805f16e59c75511132922f97740ebf6bf953845b0bbfd2089c4615456893bb37 PKG_BUILD_PARALLEL:=1 @@ -38,22 +38,16 @@ EXTRA_CFLAGS+= \ NSS_DP_HAL_DIR:=$(PKG_BUILD_DIR)/hal define Build/Configure - $(LN) $(NSS_DP_HAL_DIR)/arch/$(CONFIG_TARGET_BOARD)/nss_$(CONFIG_TARGET_BOARD).h \ + $(LN) $(NSS_DP_HAL_DIR)/soc_ops/$(CONFIG_TARGET_BOARD)/nss_$(CONFIG_TARGET_BOARD).h \ $(PKG_BUILD_DIR)/exports/nss_dp_arch.h endef -ifeq ($(CONFIG_TARGET_BOARD), "ipq807x") - SOC="ipq807x_64" -else ifeq ($(CONFIG_TARGET_BOARD), "ipq60xx") - SOC="ipq60xx_64" -endif - define Build/Compile +$(MAKE) -C "$(LINUX_DIR)" \ CROSS_COMPILE="$(TARGET_CROSS)" \ ARCH="$(LINUX_KARCH)" \ M="$(PKG_BUILD_DIR)" \ - EXTRA_CFLAGS="$(EXTRA_CFLAGS)" SoC="$(SOC)" \ + EXTRA_CFLAGS="$(EXTRA_CFLAGS)" SoC="$(CONFIG_TARGET_BOARD)" \ $(KERNEL_MAKE_FLAGS) \ $(PKG_JOBS) \ modules diff --git a/qca/qca-nss-dp/patches/0001-edma_tx_rx-support-newer-kernels-time-stamping-API.patch b/qca/qca-nss-dp/patches/0001-edma_tx_rx-support-newer-kernels-time-stamping-API.patch index c16a714..81f3a46 100644 --- a/qca/qca-nss-dp/patches/0001-edma_tx_rx-support-newer-kernels-time-stamping-API.patch +++ b/qca/qca-nss-dp/patches/0001-edma_tx_rx-support-newer-kernels-time-stamping-API.patch @@ -1,15 +1,15 @@ -From 40979666b4371012405715ffa61ab5760fcdc6b3 Mon Sep 17 00:00:00 2001 -Message-Id: <40979666b4371012405715ffa61ab5760fcdc6b3.1620066716.git.baruch@tkos.co.il> -From: Baruch Siach -Date: Mon, 3 May 2021 20:07:36 +0300 -Subject: [PATCH 1/3] edma_tx_rx: support newer kernels time stamping API - ---- - hal/edma/edma_tx_rx.c | 11 +++++++++++ - 1 file changed, 11 insertions(+) - ---- a/hal/edma/edma_tx_rx.c -+++ b/hal/edma/edma_tx_rx.c +From 40979666b4371012405715ffa61ab5760fcdc6b3 Mon Sep 17 00:00:00 2001 +Message-Id: <40979666b4371012405715ffa61ab5760fcdc6b3.1620066716.git.baruch@tkos.co.il> +From: Baruch Siach +Date: Mon, 3 May 2021 20:07:36 +0300 +Subject: [PATCH 1/3] edma_tx_rx: support newer kernels time stamping API + +--- + hal/dp_ops/edma_dp/edma_v1/edma_tx_rx.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +--- a/hal/dp_ops/edma_dp/edma_v1/edma_tx_rx.c ++++ b/hal/dp_ops/edma_dp/edma_v1/edma_tx_rx.c @@ -226,10 +226,16 @@ void nss_phy_tstamp_rx_buf(__attribute__ * set to the correct PTP class value by calling ptp_classify_raw * in drv->rxtstamp function. diff --git a/qca/qca-nss-dp/patches/0002-nss_dp_main-make-phy-mode-code-compatible-with-newer.patch b/qca/qca-nss-dp/patches/0002-nss_dp_main-make-phy-mode-code-compatible-with-newer.patch index 443a57b..7a18fcf 100644 --- a/qca/qca-nss-dp/patches/0002-nss_dp_main-make-phy-mode-code-compatible-with-newer.patch +++ b/qca/qca-nss-dp/patches/0002-nss_dp_main-make-phy-mode-code-compatible-with-newer.patch @@ -1,28 +1,28 @@ -From cef7873a2d77df13ee702d902ed4e06b2248904b Mon Sep 17 00:00:00 2001 -Message-Id: -In-Reply-To: <40979666b4371012405715ffa61ab5760fcdc6b3.1620066716.git.baruch@tkos.co.il> -References: <40979666b4371012405715ffa61ab5760fcdc6b3.1620066716.git.baruch@tkos.co.il> -From: Baruch Siach -Date: Mon, 3 May 2021 20:17:22 +0300 -Subject: [PATCH 2/3] nss_dp_main: make phy mode code compatible with newer - kernels - ---- - include/nss_dp_dev.h | 4 ++-- - nss_dp_main.c | 4 ++++ - 2 files changed, 6 insertions(+), 2 deletions(-) - +From cef7873a2d77df13ee702d902ed4e06b2248904b Mon Sep 17 00:00:00 2001 +Message-Id: +In-Reply-To: <40979666b4371012405715ffa61ab5760fcdc6b3.1620066716.git.baruch@tkos.co.il> +References: <40979666b4371012405715ffa61ab5760fcdc6b3.1620066716.git.baruch@tkos.co.il> +From: Baruch Siach +Date: Mon, 3 May 2021 20:17:22 +0300 +Subject: [PATCH 2/3] nss_dp_main: make phy mode code compatible with newer + kernels + +--- + include/nss_dp_dev.h | 4 ++-- + nss_dp_main.c | 4 ++++ + 2 files changed, 6 insertions(+), 2 deletions(-) + --- a/include/nss_dp_dev.h +++ b/include/nss_dp_dev.h @@ -25,7 +25,7 @@ + #include #include #include - #include -#include +#include + #include #include "nss_dp_api_if.h" - #include "nss_dp_hal_if.h" @@ -46,7 +46,7 @@ struct nss_dp_dev { /* Phy related stuff */ struct phy_device *phydev; /* Phy device */ diff --git a/qca/qca-nss-dp/patches/0003-Drop-_nocache-variants-of-ioremap.patch b/qca/qca-nss-dp/patches/0003-Drop-_nocache-variants-of-ioremap.patch index 9c7c53a..0f0ad90 100644 --- a/qca/qca-nss-dp/patches/0003-Drop-_nocache-variants-of-ioremap.patch +++ b/qca/qca-nss-dp/patches/0003-Drop-_nocache-variants-of-ioremap.patch @@ -1,20 +1,20 @@ -From c8c52512ff48bee578901c381a42f027e79eadf9 Mon Sep 17 00:00:00 2001 -Message-Id: -In-Reply-To: <40979666b4371012405715ffa61ab5760fcdc6b3.1620066716.git.baruch@tkos.co.il> -References: <40979666b4371012405715ffa61ab5760fcdc6b3.1620066716.git.baruch@tkos.co.il> -From: Baruch Siach -Date: Mon, 3 May 2021 20:20:29 +0300 -Subject: [PATCH 3/3] Drop _nocache variants of ioremap() - -Recent kernels removed them. ---- - hal/edma/edma_data_plane.c | 2 +- - hal/gmac_hal_ops/qcom/qcom_if.c | 2 +- - hal/gmac_hal_ops/syn/xgmac/syn_if.c | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - ---- a/hal/edma/edma_data_plane.c -+++ b/hal/edma/edma_data_plane.c +From c8c52512ff48bee578901c381a42f027e79eadf9 Mon Sep 17 00:00:00 2001 +Message-Id: +In-Reply-To: <40979666b4371012405715ffa61ab5760fcdc6b3.1620066716.git.baruch@tkos.co.il> +References: <40979666b4371012405715ffa61ab5760fcdc6b3.1620066716.git.baruch@tkos.co.il> +From: Baruch Siach +Date: Mon, 3 May 2021 20:20:29 +0300 +Subject: [PATCH 3/3] Drop _nocache variants of ioremap() + +Recent kernels removed them. +--- + hal/dp_ops/edma_dp/edma_v1/edma_data_plane.c | 2 +- + hal/gmac_ops/qcom/qcom_if.c | 2 +- + hal/gmac_ops/syn/xgmac/syn_if.c | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +--- a/hal/dp_ops/edma_dp/edma_v1/edma_data_plane.c ++++ b/hal/dp_ops/edma_dp/edma_v1/edma_data_plane.c @@ -797,7 +797,7 @@ int edma_init(void) /* * Remap register resource @@ -24,8 +24,8 @@ Recent kernels removed them. resource_size(edma_hw.reg_resource)); if (!edma_hw.reg_base) { pr_warn("Unable to remap EDMA register memory.\n"); ---- a/hal/gmac_hal_ops/qcom/qcom_if.c -+++ b/hal/gmac_hal_ops/qcom/qcom_if.c +--- a/hal/gmac_ops/qcom/qcom_if.c ++++ b/hal/gmac_ops/qcom/qcom_if.c @@ -400,7 +400,7 @@ static void *qcom_init(struct gmac_hal_p qhd->nghd.mac_id = gmacpdata->macid; @@ -35,8 +35,8 @@ Recent kernels removed them. res->start, resource_size(res)); if (!qhd->nghd.mac_base) { netdev_dbg(ndev, "ioremap fail.\n"); ---- a/hal/gmac_hal_ops/syn/xgmac/syn_if.c -+++ b/hal/gmac_hal_ops/syn/xgmac/syn_if.c +--- a/hal/gmac_ops/syn/xgmac/syn_if.c ++++ b/hal/gmac_ops/syn/xgmac/syn_if.c @@ -422,7 +422,7 @@ static void *syn_init(struct gmac_hal_pl /* Populate the mac base addresses */ diff --git a/qca/qca-nss-dp/patches/0004-EDMA-Fix-NAPI-packet-counting.patch b/qca/qca-nss-dp/patches/0004-EDMA-Fix-NAPI-packet-counting.patch index eb57fe9..5a3764e 100644 --- a/qca/qca-nss-dp/patches/0004-EDMA-Fix-NAPI-packet-counting.patch +++ b/qca/qca-nss-dp/patches/0004-EDMA-Fix-NAPI-packet-counting.patch @@ -9,11 +9,11 @@ cause NAPI over budget warnings. Signed-off-by: Baruch Siach Signed-off-by: Robert Marko --- - hal/edma/edma_tx_rx.c | 4 ++-- + hal/dp_ops/edma_dp/edma_v1/edma_tx_rx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---- a/hal/edma/edma_tx_rx.c -+++ b/hal/edma/edma_tx_rx.c +--- a/hal/dp_ops/edma_dp/edma_v1/edma_tx_rx.c ++++ b/hal/dp_ops/edma_dp/edma_v1/edma_tx_rx.c @@ -458,12 +458,12 @@ int edma_napi(struct napi_struct *napi, for (i = 0; i < ehw->txcmpl_rings; i++) { diff --git a/qca/qca-nss-dp/patches/0005-EDMA-Use-NAPI_POLL_WEIGHT-as-NAPI-weight.patch b/qca/qca-nss-dp/patches/0005-EDMA-Use-NAPI_POLL_WEIGHT-as-NAPI-weight.patch index f231c51..b271d72 100644 --- a/qca/qca-nss-dp/patches/0005-EDMA-Use-NAPI_POLL_WEIGHT-as-NAPI-weight.patch +++ b/qca/qca-nss-dp/patches/0005-EDMA-Use-NAPI_POLL_WEIGHT-as-NAPI-weight.patch @@ -14,12 +14,12 @@ So use NAPI_POLL_WEIGHT as the weight. Signed-off-by: Robert Marko --- - hal/edma/edma_data_plane.c | 2 +- - hal/edma/edma_data_plane.h | 1 - + hal/dp_ops/edma_dp/edma_v1/edma_data_plane.c | 2 +- + hal/dp_ops/edma_dp/edma_v1/edma_data_plane.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) ---- a/hal/edma/edma_data_plane.c -+++ b/hal/edma/edma_data_plane.c +--- a/hal/dp_ops/edma_dp/edma_v1/edma_data_plane.c ++++ b/hal/dp_ops/edma_dp/edma_v1/edma_data_plane.c @@ -582,7 +582,7 @@ static int edma_register_netdevice(struc */ if (!edma_hw.napi_added) { @@ -29,13 +29,13 @@ Signed-off-by: Robert Marko /* * Register the interrupt handlers and enable interrupts */ ---- a/hal/edma/edma_data_plane.h -+++ b/hal/edma/edma_data_plane.h +--- a/hal/dp_ops/edma_dp/edma_v1/edma_data_plane.h ++++ b/hal/dp_ops/edma_dp/edma_v1/edma_data_plane.h @@ -27,7 +27,6 @@ #define EDMA_RX_PREHDR_SIZE (sizeof(struct edma_rx_preheader)) #define EDMA_TX_PREHDR_SIZE (sizeof(struct edma_tx_preheader)) #define EDMA_RING_SIZE 128 -#define EDMA_NAPI_WORK 100 - #define EDMA_START_GMACS NSS_DP_START_IFNUM + #define EDMA_START_GMACS NSS_DP_HAL_START_IFNUM #define EDMA_MAX_GMACS NSS_DP_HAL_MAX_PORTS #define EDMA_TX_PKT_MIN_SIZE 33 /* IPQ807x EDMA needs a minimum packet size of 33 bytes */ diff --git a/qca/qca-nss-dp/patches/0009-switchdev-use-new-switchdev-flags.patch b/qca/qca-nss-dp/patches/0009-switchdev-use-new-switchdev-flags.patch index 7a38f9f..b6fff3b 100644 --- a/qca/qca-nss-dp/patches/0009-switchdev-use-new-switchdev-flags.patch +++ b/qca/qca-nss-dp/patches/0009-switchdev-use-new-switchdev-flags.patch @@ -18,8 +18,8 @@ Signed-off-by: Robert Marko +++ b/include/nss_dp_dev.h @@ -26,6 +26,9 @@ #include - #include - #include + #include + #include +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 12, 0)) +#include +#endif