diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2017-11-13 22:18:00 +0100 |
---|---|---|
committer | Mathias Kresin <dev@kresin.me> | 2018-02-20 19:25:17 +0100 |
commit | 73ba5e11f7582967f5151f5a3cb27932b47f44fa (patch) | |
tree | 0241af7a006b080d82645c31d23115c1ad3b98b4 /package/kernel/lantiq/ltq-tapi | |
parent | f8a6987cd1aae8698062c8ac3907193a5c66004a (diff) | |
download | upstream-73ba5e11f7582967f5151f5a3cb27932b47f44fa.tar.gz upstream-73ba5e11f7582967f5151f5a3cb27932b47f44fa.tar.bz2 upstream-73ba5e11f7582967f5151f5a3cb27932b47f44fa.zip |
lantiq: fix lantiq applications kernel 4.14 compatiblity
This is fixing multiple compile problems with kernel 4.14 and updates the
code to take care of changes introduced between kernel 4.9 and 4.14.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Mathias Kresin <dev@kresin.me>
Diffstat (limited to 'package/kernel/lantiq/ltq-tapi')
4 files changed, 33 insertions, 13 deletions
diff --git a/package/kernel/lantiq/ltq-tapi/patches/010-fix-compile.patch b/package/kernel/lantiq/ltq-tapi/patches/010-fix-compile.patch new file mode 100644 index 0000000000..051e25d3ad --- /dev/null +++ b/package/kernel/lantiq/ltq-tapi/patches/010-fix-compile.patch @@ -0,0 +1,22 @@ +--- a/src/drv_tapi_linux.c ++++ b/src/drv_tapi_linux.c +@@ -54,6 +54,10 @@ + #include <linux/workqueue.h> /* LINUX 2.6 We need work_struct */ + #include <linux/device.h> + #include <linux/sched.h> ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) ++ #include <linux/sched/signal.h> ++ #include <linux/sched/types.h> ++#endif + #undef CONFIG_DEVFS_FS + #ifndef UTS_RELEASE + #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)) +@@ -184,7 +188,7 @@ MODULE_PARM_DESC(block_egress_tasklet, " + MODULE_PARM_DESC(block_ingress_tasklet, "block the execution of the ingress tasklet, i.e. force to use the RT kernel thread"); + + /** The driver callbacks which will be registered with the kernel*/ +-static struct file_operations tapi_fops = {0}; ++static struct file_operations tapi_fops; + + /* ============================= */ + /* Global function definition */ diff --git a/package/kernel/lantiq/ltq-tapi/patches/100-ifxmips.patch b/package/kernel/lantiq/ltq-tapi/patches/100-ifxmips.patch index a9c0d8116b..f56587d067 100644 --- a/package/kernel/lantiq/ltq-tapi/patches/100-ifxmips.patch +++ b/package/kernel/lantiq/ltq-tapi/patches/100-ifxmips.patch @@ -1,6 +1,6 @@ --- a/src/drv_tapi_linux.c +++ b/src/drv_tapi_linux.c -@@ -552,7 +552,7 @@ static ssize_t ifx_tapi_write (struct fi +@@ -556,7 +556,7 @@ static ssize_t ifx_tapi_write (struct fi IFX_uint8_t *pData; IFX_size_t buf_size; #endif /* TAPI_PACKET */ diff --git a/package/kernel/lantiq/ltq-tapi/patches/200-linux-37.patch b/package/kernel/lantiq/ltq-tapi/patches/200-linux-37.patch index 9d7428df03..fd6133eec1 100644 --- a/package/kernel/lantiq/ltq-tapi/patches/200-linux-37.patch +++ b/package/kernel/lantiq/ltq-tapi/patches/200-linux-37.patch @@ -10,7 +10,7 @@ #include <asm/io.h> #ifdef LINUX_2_6 -@@ -65,7 +67,9 @@ +@@ -69,7 +71,9 @@ #else #include <linux/tqueue.h> #include <linux/sched.h> @@ -20,7 +20,7 @@ #endif /* LINUX_2_6 */ #include "drv_tapi.h" -@@ -133,8 +137,13 @@ +@@ -137,8 +141,13 @@ static ssize_t ifx_tapi_write(struct fil size_t count, loff_t * ppos); static ssize_t ifx_tapi_read(struct file * filp, char *buf, size_t length, loff_t * ppos); @@ -34,7 +34,7 @@ static unsigned int ifx_tapi_poll (struct file *filp, poll_table *table); #ifdef CONFIG_PROC_FS -@@ -218,7 +227,11 @@ +@@ -222,7 +231,11 @@ IFX_return_t TAPI_OS_RegisterLLDrv (IFX_ IFX_char_t *pRegDrvName = IFX_NULL; IFX_int32_t ret = 0; @@ -46,7 +46,7 @@ { #ifdef MODULE tapi_fops.owner = THIS_MODULE; -@@ -226,7 +239,11 @@ +@@ -230,7 +243,11 @@ IFX_return_t TAPI_OS_RegisterLLDrv (IFX_ tapi_fops.read = ifx_tapi_read; tapi_fops.write = ifx_tapi_write; tapi_fops.poll = ifx_tapi_poll; @@ -58,7 +58,7 @@ tapi_fops.open = ifx_tapi_open; tapi_fops.release = ifx_tapi_release; } -@@ -881,8 +898,13 @@ +@@ -885,8 +902,13 @@ static IFX_uint32_t ifx_tapi_poll (struc - 0 and positive values - success - negative value - ioctl failed */ @@ -72,7 +72,7 @@ { TAPI_FD_PRIV_DATA_t *pTapiPriv; IFX_TAPI_ioctlCtx_t ctx; -@@ -3721,7 +3743,9 @@ +@@ -3725,7 +3747,9 @@ IFX_void_t TAPI_OS_ThreadKill(IFXOS_Thre kernel lock (lock_kernel()). The lock must be grabbed before changing the terminate flag and released after the down() call. */ @@ -83,7 +83,7 @@ mb(); #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28) kill_proc(pThrCntrl->tid, SIGKILL, 1); -@@ -3729,8 +3753,10 @@ +@@ -3733,8 +3757,10 @@ IFX_void_t TAPI_OS_ThreadKill(IFXOS_Thre kill_pid(find_vpid(pThrCntrl->tid), SIGKILL, 1); #endif /* release the big kernel lock */ diff --git a/package/kernel/lantiq/ltq-tapi/patches/300-linux-310.patch b/package/kernel/lantiq/ltq-tapi/patches/300-linux-310.patch index ac72515eee..2da1719a1d 100644 --- a/package/kernel/lantiq/ltq-tapi/patches/300-linux-310.patch +++ b/package/kernel/lantiq/ltq-tapi/patches/300-linux-310.patch @@ -1,8 +1,6 @@ -Index: drv_tapi-3.13.0/src/drv_tapi_linux.c -=================================================================== ---- drv_tapi-3.13.0.orig/src/drv_tapi_linux.c 2013-09-05 22:28:16.868419283 +0200 -+++ drv_tapi-3.13.0/src/drv_tapi_linux.c 2013-09-05 22:32:37.396425814 +0200 -@@ -93,6 +93,8 @@ +--- a/src/drv_tapi_linux.c ++++ b/src/drv_tapi_linux.c +@@ -97,6 +97,8 @@ #include "drv_tapi_announcements.h" #endif /* TAPI_ANNOUNCEMENTS */ |