aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathias Kresin <dev@kresin.me>2020-12-27 19:42:24 +0100
committerHauke Mehrtens <hauke@hauke-m.de>2023-03-27 18:42:28 +0200
commit3d93d2cea5ce1f6120da4233cfdb168d408ad923 (patch)
tree47199fc9e23f186427f5630ec1ca7389737ac3eb
parenta4f065a646c103d95a0b27ca827a7a93a5e47514 (diff)
downloadupstream-3d93d2cea5ce1f6120da4233cfdb168d408ad923.tar.gz
upstream-3d93d2cea5ce1f6120da4233cfdb168d408ad923.tar.bz2
upstream-3d93d2cea5ce1f6120da4233cfdb168d408ad923.zip
ltq-atm/ltq-ptm: add kernel 5.10 compatiblity
The callback handling of the tasklet API was redesigned and the macros using the old syntax renamed to _OLD. The stuck queue is now passed to ndo_tx_timeout callback but not used so far. Signed-off-by: Mathias Kresin <dev@kresin.me> (cherry picked from commit 804c541446ab8e3fab11dba5d8fe07807af7fac5) [Add DECLARE_TASKLET handling for kernel 5.4.235 too] Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r--package/kernel/lantiq/ltq-atm/src/ltq_atm.c6
-rw-r--r--package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c8
-rw-r--r--package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c13
3 files changed, 27 insertions, 0 deletions
diff --git a/package/kernel/lantiq/ltq-atm/src/ltq_atm.c b/package/kernel/lantiq/ltq-atm/src/ltq_atm.c
index 55362a5c7b..695e2329a9 100644
--- a/package/kernel/lantiq/ltq-atm/src/ltq_atm.c
+++ b/package/kernel/lantiq/ltq-atm/src/ltq_atm.c
@@ -41,6 +41,7 @@
#include <linux/atm.h>
#include <linux/clk.h>
#include <linux/interrupt.h>
+#include <linux/version.h>
#ifdef CONFIG_XFRM
#include <net/xfrm.h>
#endif
@@ -199,7 +200,12 @@ static inline void mailbox_aal_rx_handler(void);
static irqreturn_t mailbox_irq_handler(int, void *);
static inline void mailbox_signal(unsigned int, int);
static void do_ppe_tasklet(unsigned long);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0) && \
+ !(LINUX_VERSION_CODE < KERNEL_VERSION(5,5,0) && LINUX_VERSION_CODE > KERNEL_VERSION(5,4,235))
DECLARE_TASKLET(g_dma_tasklet, do_ppe_tasklet, 0);
+#else
+DECLARE_TASKLET_OLD(g_dma_tasklet, do_ppe_tasklet);
+#endif
/*
* QSB & HTU setting functions
diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c
index 18c715a290..5ee966c014 100644
--- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c
+++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c
@@ -127,7 +127,11 @@ static int ptm_stop(struct net_device *);
static int ptm_napi_poll(struct napi_struct *, int);
static int ptm_hard_start_xmit(struct sk_buff *, struct net_device *);
static int ptm_ioctl(struct net_device *, struct ifreq *, int);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
static void ptm_tx_timeout(struct net_device *);
+#else
+static void ptm_tx_timeout(struct net_device *, unsigned int txqueue);
+#endif
/*
* DSL Data LED
@@ -511,7 +515,11 @@ static int ptm_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
return 0;
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
static void ptm_tx_timeout(struct net_device *dev)
+#else
+static void ptm_tx_timeout(struct net_device *dev, unsigned int txqueue)
+#endif
{
int ndev;
diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c
index 44d805049b..f13908db62 100644
--- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c
+++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c
@@ -77,7 +77,11 @@ static int ptm_stop(struct net_device *);
static int ptm_napi_poll(struct napi_struct *, int);
static int ptm_hard_start_xmit(struct sk_buff *, struct net_device *);
static int ptm_ioctl(struct net_device *, struct ifreq *, int);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
static void ptm_tx_timeout(struct net_device *);
+#else
+static void ptm_tx_timeout(struct net_device *, unsigned int txqueue);
+#endif
static inline struct sk_buff* alloc_skb_rx(void);
static inline struct sk_buff* alloc_skb_tx(unsigned int);
@@ -125,7 +129,12 @@ static char *g_net_dev_name[1] = {"dsl0"};
static int g_ptm_prio_queue_map[8];
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0) && \
+ !(LINUX_VERSION_CODE < KERNEL_VERSION(5,5,0) && LINUX_VERSION_CODE > KERNEL_VERSION(5,4,235))
static DECLARE_TASKLET(g_swap_desc_tasklet, do_swap_desc_tasklet, 0);
+#else
+static DECLARE_TASKLET_OLD(g_swap_desc_tasklet, do_swap_desc_tasklet);
+#endif
unsigned int ifx_ptm_dbg_enable = DBG_ENABLE_MASK_ERR;
@@ -451,7 +460,11 @@ static int ptm_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
return 0;
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
static void ptm_tx_timeout(struct net_device *dev)
+#else
+static void ptm_tx_timeout(struct net_device *dev, unsigned int txqueue)
+#endif
{
ASSERT(dev == g_net_dev[0], "incorrect device");