From: Rosen Penev Date: Tue, 14 Apr 2026 03:22:54 +0000 (-0700) Subject: lantiq: remove old kernel fixes X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7116f3cd00554242a2e3cb87b891a6bcfc3c59ff;p=thirdparty%2Fopenwrt.git lantiq: remove old kernel fixes No longer needed. Signed-off-by: Rosen Penev Link: https://github.com/openwrt/openwrt/pull/22949 Signed-off-by: Hauke Mehrtens --- diff --git a/package/kernel/lantiq/ltq-adsl-mei/src/drv_mei_cpe.c b/package/kernel/lantiq/ltq-adsl-mei/src/drv_mei_cpe.c index 8d3cbe7054f..cce09993966 100644 --- a/package/kernel/lantiq/ltq-adsl-mei/src/drv_mei_cpe.c +++ b/package/kernel/lantiq/ltq-adsl-mei/src/drv_mei_cpe.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include @@ -2777,11 +2776,7 @@ static int ltq_mei_probe(struct platform_device *pdev) IFX_MEI_DMSG("Start loopback test...\n"); DFE_Loopback_Test (); #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0) - dsl_class = class_create(THIS_MODULE, "ifx_mei"); -#else dsl_class = class_create("ifx_mei"); -#endif device_create(dsl_class, NULL, MKDEV(MEI_MAJOR, 0), NULL, "ifx_mei"); return 0; } diff --git a/package/kernel/lantiq/ltq-adsl/patches/100-dsl_compat.patch b/package/kernel/lantiq/ltq-adsl/patches/100-dsl_compat.patch index db02ebf4fdb..248fa94e0fe 100644 --- a/package/kernel/lantiq/ltq-adsl/patches/100-dsl_compat.patch +++ b/package/kernel/lantiq/ltq-adsl/patches/100-dsl_compat.patch @@ -34,19 +34,16 @@ static int DSL_DRV_Open(DSL_DRV_inode_t * ino, DSL_DRV_file_t * fil); static int DSL_DRV_Release(DSL_DRV_inode_t * ino, DSL_DRV_file_t * fil); -@@ -72,7 +77,11 @@ static struct file_operations dslCpeApiO +@@ -72,7 +77,7 @@ static struct file_operations dslCpeApiO open: DSL_DRV_Open, release: DSL_DRV_Release, write: DSL_DRV_Write, -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)) - ioctl: DSL_DRV_Ioctls, -+#else +- ioctl: DSL_DRV_Ioctls, + unlocked_ioctl: DSL_DRV_Ioctls, -+#endif poll: DSL_DRV_Poll }; #else -@@ -168,10 +177,17 @@ static DSL_ssize_t DSL_DRV_Write(DSL_DRV +@@ -168,10 +173,17 @@ static DSL_ssize_t DSL_DRV_Write(DSL_DRV \return Success or failure. \ingroup Internal */ @@ -64,7 +61,7 @@ { DSL_int_t nErr=0; DSL_boolean_t bIsInKernel; -@@ -216,16 +232,7 @@ static DSL_int_t DSL_DRV_Ioctls(DSL_DRV_ +@@ -216,16 +228,7 @@ static DSL_int_t DSL_DRV_Ioctls(DSL_DRV_ } } } @@ -82,28 +79,23 @@ if ( (_IOC_TYPE(nCommand) == DSL_IOC_MAGIC_CPE_API) || (_IOC_TYPE(nCommand) == DSL_IOC_MAGIC_CPE_API_G997) || (_IOC_TYPE(nCommand) == DSL_IOC_MAGIC_CPE_API_PM) || -@@ -828,12 +835,19 @@ DSL_int32_t DSL_DRV_ThreadShutdown( +@@ -828,12 +831,11 @@ DSL_int32_t DSL_DRV_ThreadShutdown( DSL_uint32_t DSL_DRV_SysTimeGet(DSL_uint32_t nOffset) { - struct timeval tv; ++ struct timespec64 now; DSL_uint32_t nTime = 0; -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0)) -+ struct timeval tv; - memset(&tv, 0, sizeof(tv)); - do_gettimeofday(&tv); - nTime = (DSL_uint32_t)tv.tv_sec; -+#else -+ struct timespec64 now; -+ +- memset(&tv, 0, sizeof(tv)); +- do_gettimeofday(&tv); +- nTime = (DSL_uint32_t)tv.tv_sec; + ktime_get_real_ts64(&now); + nTime = (DSL_uint32_t)now.tv_sec; -+#endif if ( (nOffset == 0) || (nOffset > nTime) ) { -@@ -1058,6 +1072,7 @@ static void DSL_DRV_DebugInit(void) +@@ -1058,6 +1060,7 @@ static void DSL_DRV_DebugInit(void) /* Entry point of driver */ int __init DSL_ModuleInit(void) { @@ -111,23 +103,19 @@ DSL_int_t i; printk(DSL_DRV_CRLF DSL_DRV_CRLF "Infineon CPE API Driver version: %s" DSL_DRV_CRLF, -@@ -1104,7 +1119,12 @@ int __init DSL_ModuleInit(void) +@@ -1104,7 +1107,8 @@ int __init DSL_ModuleInit(void) } DSL_DRV_DevNodeInit(); - -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0) -+ dsl_class = class_create(THIS_MODULE, "dsl_cpe_api"); -+#else + dsl_class = class_create("dsl_cpe_api"); -+#endif + device_create(dsl_class, NULL, MKDEV(DRV_DSL_CPE_API_DEV_MAJOR, 0), NULL, "dsl_cpe_api"); return 0; } --- a/src/include/drv_dsl_cpe_os_linux.h +++ b/src/include/drv_dsl_cpe_os_linux.h -@@ -16,18 +16,18 @@ +@@ -16,19 +16,15 @@ extern "C" { #endif @@ -144,14 +132,12 @@ - -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17)) - #include -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)) -+#include -+#else +-#endif +#include - #endif #include -@@ -39,7 +39,8 @@ + #include +@@ -39,7 +35,8 @@ #include #include #include diff --git a/package/kernel/lantiq/ltq-adsl/patches/120-platform.patch b/package/kernel/lantiq/ltq-adsl/patches/120-platform.patch index 993efd3b2ae..14132588992 100644 --- a/package/kernel/lantiq/ltq-adsl/patches/120-platform.patch +++ b/package/kernel/lantiq/ltq-adsl/patches/120-platform.patch @@ -10,7 +10,7 @@ #include "drv_dsl_cpe_api.h" #include "drv_dsl_cpe_api_ioctl.h" -@@ -1070,7 +1071,7 @@ static void DSL_DRV_DebugInit(void) +@@ -1058,7 +1059,7 @@ static void DSL_DRV_DebugInit(void) #endif /* Entry point of driver */ @@ -19,7 +19,7 @@ { struct class *dsl_class; DSL_int_t i; -@@ -1128,7 +1129,7 @@ int __init DSL_ModuleInit(void) +@@ -1112,7 +1113,7 @@ int __init DSL_ModuleInit(void) return 0; } @@ -28,7 +28,7 @@ { printk("Module will be unloaded"DSL_DRV_CRLF); -@@ -1142,8 +1143,6 @@ void __exit DSL_ModuleCleanup(void) +@@ -1126,8 +1127,6 @@ void __exit DSL_ModuleCleanup(void) DSL_FPGA_BND_REGS_SZ_BYTE, (DSL_uint8_t**)&g_BndFpgaBase); #endif /* defined(INCLUDE_DSL_CPE_API_VINAX) && defined(INCLUDE_DSL_BONDING)*/ @@ -37,7 +37,7 @@ } #ifndef _lint -@@ -1159,8 +1158,29 @@ module_param(debug_level, byte, 0); +@@ -1143,8 +1142,29 @@ module_param(debug_level, byte, 0); MODULE_PARM_DESC(debug_level, "set to get more (1) or fewer (4) debug outputs"); #endif /* #ifndef DSL_DEBUG_DISABLE*/ diff --git a/package/kernel/lantiq/ltq-adsl/patches/130-linux3.8.patch b/package/kernel/lantiq/ltq-adsl/patches/130-linux3.8.patch index ee4670d4037..c842e968253 100644 --- a/package/kernel/lantiq/ltq-adsl/patches/130-linux3.8.patch +++ b/package/kernel/lantiq/ltq-adsl/patches/130-linux3.8.patch @@ -17,7 +17,7 @@ DSL_uint_t nCommand, unsigned long nArg); #endif static int DSL_DRV_Open(DSL_DRV_inode_t * ino, DSL_DRV_file_t * fil); -@@ -184,7 +185,7 @@ static DSL_int_t DSL_DRV_Ioctls(DSL_DRV_ +@@ -180,7 +181,7 @@ static DSL_int_t DSL_DRV_Ioctls(DSL_DRV_ DSL_uint_t nCommand, unsigned long nArg) #else @@ -26,7 +26,7 @@ DSL_DRV_file_t * pFile, DSL_uint_t nCommand, unsigned long nArg) -@@ -521,9 +522,9 @@ DSL_void_t* DSL_IoctlMemCpyTo( +@@ -517,9 +518,9 @@ DSL_void_t* DSL_IoctlMemCpyTo( - IFX_SUCCESS on success - IFX_ERROR on error */ @@ -38,7 +38,7 @@ DSL_int32_t retVal = -1; #ifndef _lint -@@ -546,30 +547,6 @@ DSL_DRV_STATIC DSL_int32_t DSL_DRV_Kerne +@@ -542,30 +543,6 @@ DSL_DRV_STATIC DSL_int32_t DSL_DRV_Kerne (DSL_NULL, "ENTER - Kernel Thread Startup <%s>" DSL_DRV_CRLF, pThrCntrl->thrParams.pName)); @@ -69,7 +69,7 @@ /*DSL_DRV_ThreadPriorityModify(pThrCntrl->nPriority);*/ pThrCntrl->thrParams.bRunning = 1; -@@ -639,9 +616,7 @@ DSL_int32_t DSL_DRV_ThreadInit( +@@ -635,9 +612,7 @@ DSL_int32_t DSL_DRV_ThreadInit( init_completion(&pThrCntrl->thrCompletion); /* start kernel thread via the wrapper function */ @@ -80,7 +80,7 @@ pThrCntrl->bValid = DSL_TRUE; -@@ -1076,7 +1051,7 @@ static int ltq_adsl_probe(struct platfor +@@ -1064,7 +1039,7 @@ static int ltq_adsl_probe(struct platfor struct class *dsl_class; DSL_int_t i; @@ -102,7 +102,7 @@ DSL_int32_t nPriority; --- a/src/include/drv_dsl_cpe_os_linux.h +++ b/src/include/drv_dsl_cpe_os_linux.h -@@ -288,7 +288,7 @@ typedef struct +@@ -284,7 +284,7 @@ typedef struct DSL_DRV_ThreadFunction_t pThrFct; /** Kernel thread process ID */ diff --git a/package/kernel/lantiq/ltq-adsl/patches/140-linux_3.18.patch b/package/kernel/lantiq/ltq-adsl/patches/140-linux_3.18.patch index 668732ff075..ac64ce7293d 100644 --- a/package/kernel/lantiq/ltq-adsl/patches/140-linux_3.18.patch +++ b/package/kernel/lantiq/ltq-adsl/patches/140-linux_3.18.patch @@ -1,6 +1,6 @@ --- a/src/include/drv_dsl_cpe_os_linux.h +++ b/src/include/drv_dsl_cpe_os_linux.h -@@ -214,12 +214,25 @@ static inline int dsl_mutex_lock(struct +@@ -210,12 +210,25 @@ static inline int dsl_mutex_lock(struct #define DSL_DRV_MUTEX_LOCK(id) down_interruptible(&(id)) #define DSL_DRV_MUTEX_UNLOCK(id) up(&(id)) #endif diff --git a/package/kernel/lantiq/ltq-adsl/patches/150-linux_5.9.patch b/package/kernel/lantiq/ltq-adsl/patches/150-linux_5.9.patch index a29d453ac47..8ad8fc58c0a 100644 --- a/package/kernel/lantiq/ltq-adsl/patches/150-linux_5.9.patch +++ b/package/kernel/lantiq/ltq-adsl/patches/150-linux_5.9.patch @@ -1,14 +1,11 @@ --- a/src/common/drv_dsl_cpe_os_linux.c +++ b/src/common/drv_dsl_cpe_os_linux.c -@@ -418,7 +418,11 @@ int DSL_DRV_ErrorToOS(DSL_Error_t nError +@@ -414,7 +414,7 @@ int DSL_DRV_ErrorToOS(DSL_Error_t nError DSL_void_t* DSL_DRV_VMalloc( DSL_DRV_size_t nSize) { -+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0) - return __vmalloc((unsigned long)nSize, GFP_KERNEL, PAGE_KERNEL); -+#else +- return __vmalloc((unsigned long)nSize, GFP_KERNEL, PAGE_KERNEL); + return __vmalloc((unsigned long)nSize, GFP_KERNEL); -+#endif /* return vmalloc(nSize);*/ } diff --git a/package/kernel/lantiq/ltq-adsl/patches/400-kernel-6.1.patch b/package/kernel/lantiq/ltq-adsl/patches/400-kernel-6.1.patch index 616812b4488..bc270fcd012 100644 --- a/package/kernel/lantiq/ltq-adsl/patches/400-kernel-6.1.patch +++ b/package/kernel/lantiq/ltq-adsl/patches/400-kernel-6.1.patch @@ -1,14 +1,11 @@ --- a/src/common/drv_dsl_cpe_os_linux.c +++ b/src/common/drv_dsl_cpe_os_linux.c -@@ -557,7 +557,11 @@ static int DSL_DRV_KernelThreadStartup(v +@@ -549,7 +549,7 @@ static int DSL_DRV_KernelThreadStartup(v retVal = pThrCntrl->pThrFct(&pThrCntrl->thrParams); pThrCntrl->thrParams.bRunning = 0; -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,17,0)) - complete_and_exit(&pThrCntrl->thrCompletion, (long)retVal); -+#else +- complete_and_exit(&pThrCntrl->thrCompletion, (long)retVal); + kthread_complete_and_exit(&pThrCntrl->thrCompletion, (long)retVal); -+#endif DSL_DEBUG( DSL_DBG_MSG, (DSL_NULL, "EXIT - Kernel Thread Startup <%s>" DSL_DRV_CRLF, diff --git a/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_amazon_se.c b/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_amazon_se.c index db40bbcaa62..31bb1582e76 100644 --- a/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_amazon_se.c +++ b/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_amazon_se.c @@ -34,7 +34,6 @@ */ #include #include -#include #include #include #include diff --git a/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_ar9.c b/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_ar9.c index e9949d6af31..2682d8b06d4 100644 --- a/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_ar9.c +++ b/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_ar9.c @@ -34,7 +34,6 @@ */ #include #include -#include #include #include #include diff --git a/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_danube.c b/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_danube.c index 81df6386fb9..2d402cd6576 100644 --- a/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_danube.c +++ b/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_danube.c @@ -34,7 +34,6 @@ */ #include #include -#include #include #include #include diff --git a/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_vr9.c b/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_vr9.c index f6602db921d..b702cbb45ff 100644 --- a/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_vr9.c +++ b/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_vr9.c @@ -34,7 +34,6 @@ */ #include #include -#include #include #include #include diff --git a/package/kernel/lantiq/ltq-atm/src/ltq_atm.c b/package/kernel/lantiq/ltq-atm/src/ltq_atm.c index 609b521ad66..2143658a9fb 100644 --- a/package/kernel/lantiq/ltq-atm/src/ltq_atm.c +++ b/package/kernel/lantiq/ltq-atm/src/ltq_atm.c @@ -29,7 +29,6 @@ #include #include -#include #include #include #include @@ -42,7 +41,6 @@ #include #include #include -#include #ifdef CONFIG_XFRM #include #endif @@ -201,11 +199,7 @@ 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) -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-deu/src/ifxmips_aes.c b/package/kernel/lantiq/ltq-deu/src/ifxmips_aes.c index 2bb2726be64..69f266138d5 100644 --- a/package/kernel/lantiq/ltq-deu/src/ifxmips_aes.c +++ b/package/kernel/lantiq/ltq-deu/src/ifxmips_aes.c @@ -45,7 +45,6 @@ #include #endif -#include #include #include #include diff --git a/package/kernel/lantiq/ltq-deu/src/ifxmips_arc4.c b/package/kernel/lantiq/ltq-deu/src/ifxmips_arc4.c index d4848569d73..2ec92a927f0 100644 --- a/package/kernel/lantiq/ltq-deu/src/ifxmips_arc4.c +++ b/package/kernel/lantiq/ltq-deu/src/ifxmips_arc4.c @@ -40,7 +40,6 @@ */ /* Project header */ -#include #include #include #include diff --git a/package/kernel/lantiq/ltq-deu/src/ifxmips_des.c b/package/kernel/lantiq/ltq-deu/src/ifxmips_des.c index 862419f7f75..fb33a761d1f 100644 --- a/package/kernel/lantiq/ltq-deu/src/ifxmips_des.c +++ b/package/kernel/lantiq/ltq-deu/src/ifxmips_des.c @@ -40,7 +40,6 @@ */ /* Project Header Files */ -#include #include #include #include diff --git a/package/kernel/lantiq/ltq-deu/src/ifxmips_deu.c b/package/kernel/lantiq/ltq-deu/src/ifxmips_deu.c index fa981d72072..99eb62c454b 100644 --- a/package/kernel/lantiq/ltq-deu/src/ifxmips_deu.c +++ b/package/kernel/lantiq/ltq-deu/src/ifxmips_deu.c @@ -40,7 +40,6 @@ */ /* Project header */ -#include #if defined(CONFIG_MODVERSIONS) #define MODVERSIONS #include diff --git a/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_ar9.h b/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_ar9.h index cf9745fc860..41880a92254 100644 --- a/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_ar9.h +++ b/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_ar9.h @@ -42,7 +42,6 @@ #define IFXMIPS_DEU_AR9_H /* Project Header Files */ -#include #include #include #include diff --git a/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_danube.h b/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_danube.h index 1a572073f97..47ed325bdab 100644 --- a/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_danube.h +++ b/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_danube.h @@ -41,7 +41,6 @@ #define IFXMIPS_DEU_DANUBE_H /* Project Header Files */ -#include #include #include #include diff --git a/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_dma.h b/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_dma.h index 7a1b85f1d14..6ceaefd5de2 100644 --- a/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_dma.h +++ b/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_dma.h @@ -39,7 +39,6 @@ #include #include #include -#include // must match the size of memory block allocated for g_dma_block and g_dma_block2 #define DEU_MAX_PACKET_SIZE (PAGE_SIZE >> 1) diff --git a/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_vr9.h b/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_vr9.h index 06f0e8b8239..68f66698429 100644 --- a/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_vr9.h +++ b/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_vr9.h @@ -42,7 +42,6 @@ #define IFXMIPS_DEU_VR9_H /* Project Header Files */ -#include #include #include #include diff --git a/package/kernel/lantiq/ltq-deu/src/ifxmips_sha1.c b/package/kernel/lantiq/ltq-deu/src/ifxmips_sha1.c index 2a87c1c55a8..f74f66d5e05 100644 --- a/package/kernel/lantiq/ltq-deu/src/ifxmips_sha1.c +++ b/package/kernel/lantiq/ltq-deu/src/ifxmips_sha1.c @@ -43,12 +43,7 @@ #include #include #include -#include -#if LINUX_VERSION_CODE < KERNEL_VERSION(5,11,0) -#include -#else #include -#endif #include #include #include diff --git a/package/kernel/lantiq/ltq-deu/src/ifxmips_sha1_hmac.c b/package/kernel/lantiq/ltq-deu/src/ifxmips_sha1_hmac.c index 3ab3966e571..da1a79453e5 100644 --- a/package/kernel/lantiq/ltq-deu/src/ifxmips_sha1_hmac.c +++ b/package/kernel/lantiq/ltq-deu/src/ifxmips_sha1_hmac.c @@ -44,12 +44,7 @@ #include #include #include -#include -#if LINUX_VERSION_CODE < KERNEL_VERSION(5,11,0) -#include -#else #include -#endif #include #include #include diff --git a/package/kernel/lantiq/ltq-ifxos/patches/100-compat.patch b/package/kernel/lantiq/ltq-ifxos/patches/100-compat.patch index a3f210487ea..f5f652c4125 100644 --- a/package/kernel/lantiq/ltq-ifxos/patches/100-compat.patch +++ b/package/kernel/lantiq/ltq-ifxos/patches/100-compat.patch @@ -1,106 +1,103 @@ --- a/src/linux/ifxos_linux_memory_map_drv.c +++ b/src/linux/ifxos_linux_memory_map_drv.c -@@ -25,6 +25,7 @@ - IFX Linux adaptation - Global Includes - Kernel - ========================================================================= */ - -+#include - #include - #ifdef MODULE - #include -@@ -97,8 +98,13 @@ IFX_int32_t IFXOS_Phy2VirtMap( +@@ -97,8 +97,7 @@ IFX_int32_t IFXOS_Phy2VirtMap( } /* remap memory (not cache able): physical --> virtual */ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0) - pVirtAddr = (IFX_uint8_t *)ioremap_nocache( physicalAddr, - addrRangeSize_byte ); -+#else +- pVirtAddr = (IFX_uint8_t *)ioremap_nocache( physicalAddr, +- addrRangeSize_byte ); + pVirtAddr = (IFX_uint8_t *)ioremap(physicalAddr, addrRangeSize_byte); -+#endif -+ if (pVirtAddr == IFX_NULL) { IFXOS_PRN_USR_ERR_NL( IFXOS, IFXOS_PRN_LEVEL_ERR, --- a/src/linux/ifxos_linux_socket_drv.c +++ b/src/linux/ifxos_linux_socket_drv.c -@@ -165,8 +165,12 @@ IFX_int_t IFXOS_SocketRecvFrom( +@@ -165,9 +165,7 @@ IFX_int_t IFXOS_SocketRecvFrom( IFXOS_sockAddr_t *pSocAddr) { struct msghdr msg; -+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,13,0) - struct iovec iov; - mm_segment_t old_fs; -+#else +- struct iovec iov; +- mm_segment_t old_fs; +- int ret; + struct kvec iov; -+#endif - int ret; IFXOS_RETURN_IF_POINTER_NULL(pBuffer, IFX_ERROR); -@@ -181,6 +185,8 @@ IFX_int_t IFXOS_SocketRecvFrom( + IFXOS_RETURN_IF_ARG_LE_ZERO(bufSize_byte, IFX_ERROR); +@@ -181,26 +179,7 @@ IFX_int_t IFXOS_SocketRecvFrom( msg.msg_controllen = 0; msg.msg_flags = 0; -+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,13,0) -+ - #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)) - msg.msg_iov = &iov; - msg.msg_iovlen = 1; -@@ -200,6 +206,10 @@ IFX_int_t IFXOS_SocketRecvFrom( - #endif - set_fs(old_fs); - -+#else -+ ret = kernel_recvmsg (socFd, &msg, &iov, 1, bufSize_byte, 0); -+#endif -+ - return ret; +-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)) +- msg.msg_iov = &iov; +- msg.msg_iovlen = 1; +-#else +- iov_iter_init(&msg.msg_iter, READ, &iov, 1, bufSize_byte); +-#endif +- +- /* Modify address limitation which is used if user space is calling +- kernel space, otherwise sock_recvmsg() will fail.*/ +- old_fs = get_fs(); +- set_fs(KERNEL_DS); +- +-#if LINUX_VERSION_CODE < KERNEL_VERSION(4,7,0) +- ret = sock_recvmsg (socFd, &msg, bufSize_byte, 0); +-#else +- ret = sock_recvmsg (socFd, &msg, 0); +-#endif +- set_fs(old_fs); +- +- return ret; ++ return kernel_recvmsg (socFd, &msg, &iov, 1, bufSize_byte, 0); } -@@ -229,8 +239,12 @@ IFX_int_t IFXOS_SocketSendTo( + /** +@@ -229,9 +208,7 @@ IFX_int_t IFXOS_SocketSendTo( IFXOS_sockAddr_t *pSocAddr) { struct msghdr msg; -+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,13,0) - struct iovec iov; - mm_segment_t old_fs; -+#else +- struct iovec iov; +- mm_segment_t old_fs; +- int ret; + struct kvec iov; -+#endif - int ret; IFXOS_RETURN_IF_POINTER_NULL(pBuffer, IFX_ERROR); -@@ -245,6 +259,8 @@ IFX_int_t IFXOS_SocketSendTo( + IFXOS_RETURN_IF_ARG_LE_ZERO(bufSize_byte, IFX_ERROR); +@@ -245,26 +222,7 @@ IFX_int_t IFXOS_SocketSendTo( msg.msg_controllen = 0; msg.msg_flags = MSG_DONTWAIT; -+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,13,0) -+ - #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)) - msg.msg_iov = &iov; - msg.msg_iovlen = 1; -@@ -264,6 +280,10 @@ IFX_int_t IFXOS_SocketSendTo( - #endif - set_fs(old_fs); - -+#else -+ ret = kernel_sendmsg(socFd, &msg, &iov, 1, bufSize_byte); -+#endif -+ - return ret; +-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)) +- msg.msg_iov = &iov; +- msg.msg_iovlen = 1; +-#else +- iov_iter_init(&msg.msg_iter, WRITE, &iov, 1, bufSize_byte); +-#endif +- +- /* Modify address limitation which is used if user space is calling +- kernel space, otherwise sock_sendmsg() will fail.*/ +- old_fs = get_fs(); +- set_fs(KERNEL_DS); +- +-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) +- ret = sock_sendmsg(socFd, &msg, bufSize_byte); +-#else +- ret = sock_sendmsg(socFd, &msg); +-#endif +- set_fs(old_fs); +- +- return ret; ++ return kernel_sendmsg (socFd, &msg, &iov, 1, bufSize_byte); } + /** --- a/src/linux/ifxos_linux_thread_drv.c +++ b/src/linux/ifxos_linux_thread_drv.c -@@ -154,7 +154,11 @@ IFXOS_STATIC int IFXOS_KernelThreadStart +@@ -154,7 +154,7 @@ IFXOS_STATIC int IFXOS_KernelThreadStart retVal = pThrCntrl->pThrFct(&pThrCntrl->thrParams); pThrCntrl->thrParams.bRunning = IFX_FALSE; -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0)) +- complete_and_exit(&pThrCntrl->thrCompletion, (long)retVal); + kthread_complete_and_exit(&pThrCntrl->thrCompletion, (long)retVal); -+#else - complete_and_exit(&pThrCntrl->thrCompletion, (long)retVal); -+#endif IFXOS_PRN_USR_DBG_NL( IFXOS, IFXOS_PRN_LEVEL_NORMAL, ("EXIT - Kernel Thread Startup <%s>" IFXOS_CRLF, 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 48506d28ca6..e92a59001d9 100644 --- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c +++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c @@ -33,7 +33,6 @@ /* * Common Head File */ -#include #include #include #include @@ -130,11 +129,7 @@ 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 *, void __user *, 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 @@ -291,11 +286,7 @@ static int ptm_setup(struct device_node *np, struct net_device *dev, int ndev) dev->netdev_ops = &g_ptm_netdev_ops; /* Allow up to 1508 bytes, for RFC4638 */ dev->max_mtu = ETH_DATA_LEN + 8; -#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,19,0)) - netif_napi_add(dev, &g_ptm_priv_data.itf[ndev].napi, ptm_napi_poll, 25); -#else netif_napi_add_weight(dev, &g_ptm_priv_data.itf[ndev].napi, ptm_napi_poll, 25); -#endif dev->watchdog_timeo = ETH_WATCHDOG_TIMEOUT; err = of_get_ethdev_address(np, dev); @@ -562,11 +553,7 @@ static int ptm_ioctl(struct net_device *dev, struct ifreq *ifr, void __user *dat 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_adsl.h b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.h index dd8a2fddca7..20b76357ed3 100644 --- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.h +++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.h @@ -27,7 +27,6 @@ -#include #include #include #include "ifxmips_ptm_common.h" diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_amazon_se.c b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_amazon_se.c index 541e3dc094b..e5393d643d6 100644 --- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_amazon_se.c +++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_amazon_se.c @@ -34,7 +34,6 @@ */ #include #include -#include #include #include #include diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_ar9.c b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_ar9.c index 65a71402842..6a655cd0007 100644 --- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_ar9.c +++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_ar9.c @@ -34,7 +34,6 @@ */ #include #include -#include #include #include #include diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_danube.c b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_danube.c index 8ddf6f82740..b9d5a7cd57e 100644 --- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_danube.c +++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_danube.c @@ -34,7 +34,6 @@ */ #include #include -#include #include #include #include diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_test.c b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_test.c index 15d83527077..76ec1cc76d1 100644 --- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_test.c +++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_test.c @@ -36,7 +36,6 @@ */ #include #include -#include #include #include #include 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 e020d531fe6..77876dce1cb 100644 --- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c +++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c @@ -21,7 +21,6 @@ ** 07 JUL 2009 Xu Liang Init Version *******************************************************************************/ -#include #include #include #include @@ -78,11 +77,7 @@ 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 *, void __user *, 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); @@ -130,11 +125,7 @@ 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) -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; @@ -155,11 +146,7 @@ static int ptm_setup(struct device_node *np, struct net_device *dev, int ndev) dev->netdev_ops = &g_ptm_netdev_ops; /* Allow up to 1508 bytes, for RFC4638 */ dev->max_mtu = ETH_DATA_LEN + 8; -#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,19,0)) - netif_napi_add(dev, &g_ptm_priv_data.itf[ndev].napi, ptm_napi_poll, 16); -#else netif_napi_add_weight(dev, &g_ptm_priv_data.itf[ndev].napi, ptm_napi_poll, 16); -#endif dev->watchdog_timeo = ETH_WATCHDOG_TIMEOUT; err = of_get_ethdev_address(np, dev); @@ -497,11 +484,7 @@ static int ptm_ioctl(struct net_device *dev, struct ifreq *ifr, void __user *dat 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"); diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.h b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.h index 19a86867be1..046b733f7de 100644 --- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.h +++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.h @@ -24,7 +24,6 @@ #ifndef IFXMIPS_PTM_VDSL_H #define IFXMIPS_PTM_VDSL_H -#include #include #include #include "ifxmips_ptm_common.h" diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vr9.c b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vr9.c index 41a0bbbd9fe..e7a346f12da 100644 --- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vr9.c +++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vr9.c @@ -34,7 +34,6 @@ */ #include #include -#include #include #include #include diff --git a/package/kernel/lantiq/ltq-tapi/patches/000-portability.patch b/package/kernel/lantiq/ltq-tapi/patches/000-portability.patch index 78fcbad668e..f82fdf1a379 100644 --- a/package/kernel/lantiq/ltq-tapi/patches/000-portability.patch +++ b/package/kernel/lantiq/ltq-tapi/patches/000-portability.patch @@ -55,28 +55,21 @@ #include #ifdef LINUX_2_6 -@@ -55,7 +56,11 @@ +@@ -55,7 +56,7 @@ #include #undef CONFIG_DEVFS_FS #ifndef UTS_RELEASE - #include "linux/utsrelease.h" -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)) -+# include -+#else -+# include -+#endif ++ #include #endif /* UTC_RELEASE */ #else #include -@@ -3718,7 +3723,11 @@ IFX_void_t TAPI_OS_ThreadKill(IFXOS_Thre +@@ -3718,7 +3719,7 @@ IFX_void_t TAPI_OS_ThreadKill(IFXOS_Thre flag and released after the down() call. */ lock_kernel(); mb(); -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28) - kill_proc(pThrCntrl->tid, SIGKILL, 1); -+#else -+ kill_pid(find_vpid(pThrCntrl->tid), SIGKILL, 1); -+#endif +- kill_proc(pThrCntrl->tid, SIGKILL, 1); ++ kill_pid(get_task_pid(pThrCntrl->tid, PIDTYPE_PID), SIGKILL, 1); /* release the big kernel lock */ unlock_kernel(); wait_for_completion (&pThrCntrl->thrCompletion); diff --git a/package/kernel/lantiq/ltq-tapi/patches/010-fix-compile.patch b/package/kernel/lantiq/ltq-tapi/patches/010-fix-compile.patch index 0407b38b6fd..db6b3b0877c 100644 --- a/package/kernel/lantiq/ltq-tapi/patches/010-fix-compile.patch +++ b/package/kernel/lantiq/ltq-tapi/patches/010-fix-compile.patch @@ -1,17 +1,15 @@ --- a/src/drv_tapi_linux.c +++ b/src/drv_tapi_linux.c -@@ -54,6 +54,10 @@ +@@ -54,6 +54,8 @@ #include /* LINUX 2.6 We need work_struct */ #include #include -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) + #include + #include -+#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, " + #include +@@ -180,7 +182,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*/ diff --git a/package/kernel/lantiq/ltq-tapi/patches/100-ifxmips.patch b/package/kernel/lantiq/ltq-tapi/patches/100-ifxmips.patch index f56587d0672..27c5a273c96 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 -@@ -556,7 +556,7 @@ static ssize_t ifx_tapi_write (struct fi +@@ -550,7 +550,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 fd6133eec19..cdde8029c88 100644 --- a/package/kernel/lantiq/ltq-tapi/patches/200-linux-37.patch +++ b/package/kernel/lantiq/ltq-tapi/patches/200-linux-37.patch @@ -1,100 +1,69 @@ --- a/src/drv_tapi_linux.c +++ b/src/drv_tapi_linux.c -@@ -47,7 +47,9 @@ +@@ -47,7 +47,6 @@ #include #include /* copy_from_user(), ... */ #include -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)) - #include /* lock_kernel() */ -+#endif +-#include /* lock_kernel() */ #include #ifdef LINUX_2_6 -@@ -69,7 +71,9 @@ +@@ -63,7 +62,6 @@ #else #include #include -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)) - #include /* lock_kernel() */ -+#endif +- #include /* lock_kernel() */ #endif /* LINUX_2_6 */ #include "drv_tapi.h" -@@ -137,8 +141,13 @@ static ssize_t ifx_tapi_write(struct fil +@@ -131,7 +129,7 @@ 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); -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)) - static int ifx_tapi_ioctl(struct inode *inode, struct file *filp, - unsigned int nCmd, unsigned long nArgument); -+#else +-static int ifx_tapi_ioctl(struct inode *inode, struct file *filp, +static long ifx_tapi_ioctl(struct file *filp, -+ unsigned int nCmd, unsigned long nArgument); -+#endif + unsigned int nCmd, unsigned long nArgument); static unsigned int ifx_tapi_poll (struct file *filp, poll_table *table); - #ifdef CONFIG_PROC_FS -@@ -222,7 +231,11 @@ IFX_return_t TAPI_OS_RegisterLLDrv (IFX_ +@@ -216,7 +214,7 @@ IFX_return_t TAPI_OS_RegisterLLDrv (IFX_ IFX_char_t *pRegDrvName = IFX_NULL; IFX_int32_t ret = 0; -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)) - if (tapi_fops.ioctl == IFX_NULL) -+#else +- if (tapi_fops.ioctl == IFX_NULL) + if (tapi_fops.unlocked_ioctl == IFX_NULL) -+#endif { #ifdef MODULE tapi_fops.owner = THIS_MODULE; -@@ -230,7 +243,11 @@ IFX_return_t TAPI_OS_RegisterLLDrv (IFX_ +@@ -224,7 +222,7 @@ 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; -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)) - tapi_fops.ioctl = ifx_tapi_ioctl; -+#else +- tapi_fops.ioctl = ifx_tapi_ioctl; + tapi_fops.unlocked_ioctl = ifx_tapi_ioctl; -+#endif tapi_fops.open = ifx_tapi_open; tapi_fops.release = ifx_tapi_release; } -@@ -885,8 +902,13 @@ static IFX_uint32_t ifx_tapi_poll (struc +@@ -879,7 +877,7 @@ static IFX_uint32_t ifx_tapi_poll (struc - 0 and positive values - success - negative value - ioctl failed */ -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)) - static int ifx_tapi_ioctl(struct inode *inode, struct file *filp, - unsigned int nCmd, unsigned long nArg) -+#else +-static int ifx_tapi_ioctl(struct inode *inode, struct file *filp, +static long ifx_tapi_ioctl(struct file *filp, -+ unsigned int nCmd, unsigned long nArg) -+#endif + unsigned int nCmd, unsigned long nArg) { TAPI_FD_PRIV_DATA_t *pTapiPriv; - IFX_TAPI_ioctlCtx_t ctx; -@@ -3725,7 +3747,9 @@ IFX_void_t TAPI_OS_ThreadKill(IFXOS_Thre +@@ -3719,11 +3717,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. */ - lock_kernel(); -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33) -+ lock_kernel(); -+#endif mb(); - #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28) - kill_proc(pThrCntrl->tid, SIGKILL, 1); -@@ -3733,8 +3757,10 @@ IFX_void_t TAPI_OS_ThreadKill(IFXOS_Thre - kill_pid(find_vpid(pThrCntrl->tid), SIGKILL, 1); - #endif + kill_pid(get_task_pid(pThrCntrl->tid, PIDTYPE_PID), SIGKILL, 1); /* release the big kernel lock */ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33) - unlock_kernel(); -- wait_for_completion (&pThrCntrl->thrCompletion); -+#endif -+ wait_for_completion (&pThrCntrl->thrCompletion); +- unlock_kernel(); + wait_for_completion (&pThrCntrl->thrCompletion); #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23) - /* Now we are sure the thread is in zombie state. --- a/src/lib/lib_fifo/lib_fifo.c +++ b/src/lib/lib_fifo/lib_fifo.c @@ -41,7 +41,7 @@ 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 2da1719a1d4..39deb8e5eef 100644 --- a/package/kernel/lantiq/ltq-tapi/patches/300-linux-310.patch +++ b/package/kernel/lantiq/ltq-tapi/patches/300-linux-310.patch @@ -1,6 +1,6 @@ --- a/src/drv_tapi_linux.c +++ b/src/drv_tapi_linux.c -@@ -97,6 +97,8 @@ +@@ -85,6 +85,8 @@ #include "drv_tapi_announcements.h" #endif /* TAPI_ANNOUNCEMENTS */ diff --git a/package/kernel/lantiq/ltq-tapi/patches/400-linux-415.patch b/package/kernel/lantiq/ltq-tapi/patches/400-linux-415.patch index cddb1b6553c..91552b472e8 100644 --- a/package/kernel/lantiq/ltq-tapi/patches/400-linux-415.patch +++ b/package/kernel/lantiq/ltq-tapi/patches/400-linux-415.patch @@ -1,48 +1,36 @@ --- a/src/drv_tapi_linux.c +++ b/src/drv_tapi_linux.c -@@ -119,7 +119,11 @@ struct _TAPI_FD_PRIV_DATA +@@ -107,7 +107,7 @@ struct _TAPI_FD_PRIV_DATA /* ============================= */ /* Local Functions */ /* ============================= */ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0) - static IFX_void_t TAPI_timer_call_back (IFX_ulong_t arg); -+#else +-static IFX_void_t TAPI_timer_call_back (IFX_ulong_t arg); +static IFX_void_t TAPI_timer_call_back (struct timer_list *t); -+#endif #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)) static IFX_void_t TAPI_tqueue (IFX_void_t *pWork); #else /* for Kernel newer or equal 2.6.20 */ -@@ -3384,11 +3388,15 @@ Timer_ID TAPI_Create_Timer(TIMER_ENTRY p +@@ -3354,11 +3354,7 @@ Timer_ID TAPI_Create_Timer(TIMER_ENTRY p pTimerData->nArgument = nArgument; pTimerData->bStopped = IFX_FALSE; -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0)) - init_timer(&(pTimerData->Timer_List)); - - /* set timer call back function */ - pTimerData->Timer_List.function = TAPI_timer_call_back; - pTimerData->Timer_List.data = (IFX_ulong_t) pTimerData; -+#else +- init_timer(&(pTimerData->Timer_List)); +- +- /* set timer call back function */ +- pTimerData->Timer_List.function = TAPI_timer_call_back; +- pTimerData->Timer_List.data = (IFX_ulong_t) pTimerData; + timer_setup(&(pTimerData->Timer_List), TAPI_timer_call_back, 0); -+#endif /* Initialize Timer Task */ #ifdef LINUX_2_6 -@@ -3529,9 +3537,17 @@ static IFX_void_t TAPI_tqueue (struct wo +@@ -3499,9 +3495,9 @@ static IFX_void_t TAPI_tqueue (struct wo \param arg Pointer to corresponding timer ID. */ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0) - static IFX_void_t TAPI_timer_call_back (IFX_ulong_t arg) -+#else +-static IFX_void_t TAPI_timer_call_back (IFX_ulong_t arg) +static IFX_void_t TAPI_timer_call_back (struct timer_list *t) -+#endif { -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0) - Timer_ID Timer = (Timer_ID) arg; -+#else +- Timer_ID Timer = (Timer_ID) arg; + Timer_ID Timer = from_timer(Timer, t, Timer_List); -+#endif /* do the operation in process context, not in interrupt context */ #ifdef LINUX_2_6 diff --git a/package/kernel/lantiq/ltq-tapi/patches/500-linux-509.patch b/package/kernel/lantiq/ltq-tapi/patches/500-linux-509.patch index 07f61aa6326..1253c1b8e46 100644 --- a/package/kernel/lantiq/ltq-tapi/patches/500-linux-509.patch +++ b/package/kernel/lantiq/ltq-tapi/patches/500-linux-509.patch @@ -1,60 +1,59 @@ --- a/src/drv_tapi_linux.c +++ b/src/drv_tapi_linux.c -@@ -3287,10 +3287,13 @@ static IFX_void_t proc_EntriesRemove(IFX +@@ -3253,10 +3253,7 @@ static IFX_void_t proc_EntriesRemove(IFX */ static IFX_void_t tapi_wq_setscheduler (IFX_int32_t foo) { -+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0) - struct sched_param sched_params; +- struct sched_param sched_params; - - sched_params.sched_priority = TAPI_OS_THREAD_PRIO_HIGH; - sched_setscheduler(current, SCHED_FIFO, &sched_params); -+#else +- sched_params.sched_priority = TAPI_OS_THREAD_PRIO_HIGH; +- sched_setscheduler(current, SCHED_FIFO, &sched_params); + sched_set_fifo_low(current); -+#endif } #endif /* LINUX_2_6 */ -@@ -3727,6 +3730,7 @@ static IFX_int32_t TAPI_SelectCh (TAPI_F +@@ -3677,23 +3674,8 @@ static IFX_int32_t TAPI_SelectCh (TAPI_F */ IFX_int32_t TAPI_OS_ThreadPriorityModify(IFX_uint32_t newPriority) { -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0)) - struct sched_param sched_params; - IFX_int32_t ret; - -@@ -3744,6 +3748,10 @@ IFX_int32_t TAPI_OS_ThreadPriorityModify - } - - return (ret < 0) ? IFX_ERROR : IFX_SUCCESS; -+#else +- struct sched_param sched_params; +- IFX_int32_t ret; +- +- sched_params.sched_priority = newPriority; +-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)) +- ret = setscheduler(current->pid, SCHED_FIFO, &sched_params); +-#else +- ret = sched_setscheduler(current, SCHED_FIFO, &sched_params); +-#endif +- +- if (ret < 0) +- { +- printk(KERN_ERR "Failed to set the thread priority to %d" +- " ret=%d\n", newPriority, ret); +- } +- +- return (ret < 0) ? IFX_ERROR : IFX_SUCCESS; + sched_set_fifo_low(current); + return IFX_SUCCESS; -+#endif } -@@ -3800,7 +3808,9 @@ module_exit (ifx_tapi_module_exit); +@@ -3740,7 +3722,6 @@ module_exit (ifx_tapi_module_exit); MODULE_AUTHOR ("Lantiq Deutschland GmbH"); MODULE_DESCRIPTION ("TAPI Driver - www.lantiq.com"); -+#if LINUX_VERSION_CODE <= KERNEL_VERSION(5,10,0) - MODULE_SUPPORTED_DEVICE ("TAPI DEVICE"); -+#endif +-MODULE_SUPPORTED_DEVICE ("TAPI DEVICE"); MODULE_LICENSE ("Dual BSD/GPL"); EXPORT_SYMBOL (IFX_TAPI_Register_LL_Drv); --- a/src/drv_tapi_kpi.c +++ b/src/drv_tapi_kpi.c -@@ -134,7 +134,11 @@ extern IFX_int32_t block_ingre +@@ -134,7 +134,7 @@ extern IFX_int32_t block_ingre /* ========================================================================== */ static IFX_void_t ifx_tapi_KPI_IngressHandler (IFX_ulong_t foo); #ifdef KPI_TASKLET -+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0) - DECLARE_TASKLET(tl_kpi_ingress, ifx_tapi_KPI_IngressHandler, 0L); -+#else +-DECLARE_TASKLET(tl_kpi_ingress, ifx_tapi_KPI_IngressHandler, 0L); +DECLARE_TASKLET_OLD(tl_kpi_ingress, ifx_tapi_KPI_IngressHandler); -+#endif #endif /* KPI_TASKLET */ static IFX_int32_t ifx_tapi_KPI_IngressThread (IFXOS_ThreadParams_t *pThread); static IFX_return_t ifx_tapi_KPI_GroupInit(IFX_uint32_t nKpiGroup); diff --git a/package/kernel/lantiq/ltq-tapi/patches/510-linux-515.patch b/package/kernel/lantiq/ltq-tapi/patches/510-linux-515.patch deleted file mode 100644 index ee20c6caf7c..00000000000 --- a/package/kernel/lantiq/ltq-tapi/patches/510-linux-515.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/src/drv_tapi_linux.c -+++ b/src/drv_tapi_linux.c -@@ -3779,8 +3779,10 @@ IFX_void_t TAPI_OS_ThreadKill(IFXOS_Thre - mb(); - #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28) - kill_proc(pThrCntrl->tid, SIGKILL, 1); --#else -+#elif LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0) - kill_pid(find_vpid(pThrCntrl->tid), SIGKILL, 1); -+#else -+ kill_pid(get_task_pid(pThrCntrl->tid, PIDTYPE_PID), SIGKILL, 1); - #endif - /* release the big kernel lock */ - #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33) diff --git a/package/kernel/lantiq/ltq-tapi/patches/610-flush-only-local-workqueue.patch b/package/kernel/lantiq/ltq-tapi/patches/610-flush-only-local-workqueue.patch index a56f04d10e0..14ca62d6921 100644 --- a/package/kernel/lantiq/ltq-tapi/patches/610-flush-only-local-workqueue.patch +++ b/package/kernel/lantiq/ltq-tapi/patches/610-flush-only-local-workqueue.patch @@ -1,6 +1,6 @@ --- a/src/drv_tapi_linux.c +++ b/src/drv_tapi_linux.c -@@ -3351,7 +3351,7 @@ static void __exit ifx_tapi_module_exit( +@@ -3311,7 +3311,7 @@ static void __exit ifx_tapi_module_exit( /* as we are using work queues to schedule events from the interrupt context to the process context, we use work queues in case of Linux 2.6. they must be flushed on driver unload... */ diff --git a/package/kernel/lantiq/ltq-tapi/patches/611-ifxos-typedef-madness.diff b/package/kernel/lantiq/ltq-tapi/patches/611-ifxos-typedef-madness.diff index a3cd2c49931..ccf78794221 100644 --- a/package/kernel/lantiq/ltq-tapi/patches/611-ifxos-typedef-madness.diff +++ b/package/kernel/lantiq/ltq-tapi/patches/611-ifxos-typedef-madness.diff @@ -1,6 +1,6 @@ --- a/src/drv_tapi_linux.c +++ b/src/drv_tapi_linux.c -@@ -274,7 +274,7 @@ IFX_return_t TAPI_OS_RegisterLLDrv (IFX_ +@@ -245,7 +245,7 @@ IFX_return_t TAPI_OS_RegisterLLDrv (IFX_ TRACE( TAPI_DRV, DBG_LEVEL_HIGH, ("IFX_TAPI_Register_LL_Drv: unable to register chrdev major number " "%d\n", majorNumber)); @@ -9,7 +9,7 @@ } #if 0 -@@ -290,7 +290,7 @@ IFX_return_t TAPI_OS_RegisterLLDrv (IFX_ +@@ -261,7 +261,7 @@ IFX_return_t TAPI_OS_RegisterLLDrv (IFX_ #endif /* LINUX_2_6 */ #endif /* 0 */ @@ -18,7 +18,7 @@ } -@@ -316,7 +316,7 @@ IFX_return_t TAPI_OS_UnregisterLLDrv (IF +@@ -287,7 +287,7 @@ IFX_return_t TAPI_OS_UnregisterLLDrv (IF { unregister_chrdev (pLLDrvCtx->majorNumber, pHLDrvCtx->registeredDrvName); @@ -27,7 +27,7 @@ } -@@ -3589,7 +3589,7 @@ static IFX_void_t Deferred_Worker (struc +@@ -3533,7 +3533,7 @@ static IFX_void_t Deferred_Worker (struc */ IFX_return_t TAPI_DeferWork (IFX_void_t *pFunc, IFX_void_t *pParam) { @@ -36,7 +36,7 @@ IFX_TAPI_EXT_EVENT_PARAM_t *pEvParam = (IFX_TAPI_EXT_EVENT_PARAM_t *) pParam; #ifdef LINUX_2_6 struct work_struct *pTapiWs; -@@ -3605,7 +3605,7 @@ IFX_return_t TAPI_DeferWork (IFX_void_t +@@ -3549,7 +3549,7 @@ IFX_return_t TAPI_DeferWork (IFX_void_t if (queue_work (pTapiWq, pTapiWs) == 0) { @@ -45,7 +45,7 @@ } #else struct tq_struct *pTapiTq; -@@ -3617,7 +3617,7 @@ IFX_return_t TAPI_DeferWork (IFX_void_t +@@ -3561,7 +3561,7 @@ IFX_return_t TAPI_DeferWork (IFX_void_t pTapiTq->sync = 0; if (schedule_task (pTapiTq) == 0) { diff --git a/package/kernel/lantiq/ltq-tapi/patches/617-adapt-to-the-6.18-kernel-timer-API.patch b/package/kernel/lantiq/ltq-tapi/patches/617-adapt-to-the-6.18-kernel-timer-API.patch index 5c26f00221e..fa794562967 100644 --- a/package/kernel/lantiq/ltq-tapi/patches/617-adapt-to-the-6.18-kernel-timer-API.patch +++ b/package/kernel/lantiq/ltq-tapi/patches/617-adapt-to-the-6.18-kernel-timer-API.patch @@ -37,7 +37,7 @@ Signed-off-by: Shiji Yang #endif #ifdef MODULE #include -@@ -3446,7 +3447,11 @@ IFX_boolean_t TAPI_SetTime_Timer(Timer_I +@@ -3398,7 +3399,11 @@ IFX_boolean_t TAPI_SetTime_Timer(Timer_I /* prevent restart of driver */ Timer->bPeriodical = IFX_FALSE; /* remove driver from list */ @@ -49,7 +49,7 @@ Signed-off-by: Shiji Yang Timer->bPeriodical = bPeriodically; -@@ -3473,7 +3478,11 @@ IFX_boolean_t TAPI_Stop_Timer(Timer_ID T +@@ -3425,7 +3430,11 @@ IFX_boolean_t TAPI_Stop_Timer(Timer_ID T /* prevent restart of driver */ Timer->bPeriodical = IFX_FALSE; /* remove driver from list */ @@ -61,7 +61,7 @@ Signed-off-by: Shiji Yang return (IFX_TRUE); } -@@ -3526,7 +3535,11 @@ static IFX_void_t TAPI_tqueue (struct wo +@@ -3478,7 +3487,11 @@ static IFX_void_t TAPI_tqueue (struct wo if (Timer->bPeriodical) { /* remove driver from list */ @@ -73,15 +73,15 @@ Signed-off-by: Shiji Yang /* start new timer, then call function to gain precision */ Timer->Timer_List.expires = jiffies + Timer->Periodical_Time; add_timer(&(Timer->Timer_List)); -@@ -3548,8 +3561,10 @@ static IFX_void_t TAPI_timer_call_back ( +@@ -3494,7 +3507,11 @@ static IFX_void_t TAPI_tqueue (struct wo + */ + static IFX_void_t TAPI_timer_call_back (struct timer_list *t) { - #if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0) - Timer_ID Timer = (Timer_ID) arg; --#else -+#elif LINUX_VERSION_CODE < KERNEL_VERSION(6,16,0) ++#if LINUX_VERSION_CODE < KERNEL_VERSION(6,16,0) Timer_ID Timer = from_timer(Timer, t, Timer_List); +#else + Timer_ID Timer = timer_container_of(Timer, t, Timer_List); - #endif ++#endif /* do the operation in process context, not in interrupt context */ + #ifdef LINUX_2_6 diff --git a/package/kernel/lantiq/ltq-vdsl-vr11/patches/130-support-kernel-6.6.patch b/package/kernel/lantiq/ltq-vdsl-vr11/patches/130-support-kernel-6.6.patch index 4e127cd9072..25bc50bf44c 100644 --- a/package/kernel/lantiq/ltq-vdsl-vr11/patches/130-support-kernel-6.6.patch +++ b/package/kernel/lantiq/ltq-vdsl-vr11/patches/130-support-kernel-6.6.patch @@ -1,14 +1,11 @@ --- a/src/common/drv_dsl_cpe_os_linux.c +++ b/src/common/drv_dsl_cpe_os_linux.c -@@ -431,7 +431,11 @@ static int DSL_DRV_DevNodeInit(DSL_void_ +@@ -431,7 +431,7 @@ static int DSL_DRV_DevNodeInit(DSL_void_ } /* create a device class used for createing /dev/ entries */ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0) - dsl_class = class_create(THIS_MODULE, DRV_DSL_CPE_API_DEV_NAME); -+#else +- dsl_class = class_create(THIS_MODULE, DRV_DSL_CPE_API_DEV_NAME); + dsl_class = class_create(DRV_DSL_CPE_API_DEV_NAME); -+#endif if (IS_ERR(dsl_class)) { DSL_DEBUG(DSL_DBG_ERR, (DSL_NULL, SYS_DBG_ERR""DSL_DRV_CRLF DSL_DRV_CRLF diff --git a/package/kernel/lantiq/ltq-vdsl-vr11/patches/301-fix-missing-prototypes-warnings.patch b/package/kernel/lantiq/ltq-vdsl-vr11/patches/301-fix-missing-prototypes-warnings.patch index 609ebbc72e4..2cb8ce0b970 100644 --- a/package/kernel/lantiq/ltq-vdsl-vr11/patches/301-fix-missing-prototypes-warnings.patch +++ b/package/kernel/lantiq/ltq-vdsl-vr11/patches/301-fix-missing-prototypes-warnings.patch @@ -102,7 +102,7 @@ Signed-off-by: Shiji Yang { --- a/src/common/drv_dsl_cpe_os_linux.c +++ b/src/common/drv_dsl_cpe_os_linux.c -@@ -1341,7 +1341,7 @@ static void DSL_DRV_NlSendMsg(DSL_char_t +@@ -1337,7 +1337,7 @@ static void DSL_DRV_NlSendMsg(DSL_char_t #endif /* Entry point of driver */ @@ -111,7 +111,7 @@ Signed-off-by: Shiji Yang { DSL_int_t i; -@@ -1457,7 +1457,7 @@ void DSL_ModuleCleanup(void) +@@ -1453,7 +1453,7 @@ void DSL_ModuleCleanup(void) return; } diff --git a/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/001-fix-compile.patch b/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/001-fix-compile.patch index 6d3e182ec48..31254f99563 100644 --- a/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/001-fix-compile.patch +++ b/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/001-fix-compile.patch @@ -1,24 +1,19 @@ --- a/src/drv_mei_cpe_linux.h +++ b/src/drv_mei_cpe_linux.h -@@ -31,6 +31,9 @@ +@@ -31,6 +31,7 @@ #include #include -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) +#include -+#endif #include #include #include -@@ -121,7 +124,11 @@ typedef int (*MEI_RequestIrq_WrapLinux_t +@@ -121,7 +122,7 @@ typedef int (*MEI_RequestIrq_WrapLinux_t /** Function typedef for the Linux free_irq() */ -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)) +-typedef void (*MEI_FreeIrq_WrapLinux_t)( unsigned int usedIrq, +typedef const void *(*MEI_FreeIrq_WrapLinux_t)( unsigned int usedIrq, -+#else - typedef void (*MEI_FreeIrq_WrapLinux_t)( unsigned int usedIrq, -+#endif void *usedDevId ); diff --git a/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/100-compat.patch b/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/100-compat.patch index e061e689346..223004c6189 100644 --- a/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/100-compat.patch +++ b/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/100-compat.patch @@ -10,7 +10,7 @@ --- a/src/drv_mei_cpe_linux.h +++ b/src/drv_mei_cpe_linux.h -@@ -60,12 +60,6 @@ +@@ -58,12 +58,6 @@ #include #include @@ -54,19 +54,16 @@ return (ret < 0) ? -1 : 0; } -@@ -1479,7 +1485,11 @@ struct proc_entry { +@@ -1479,7 +1485,7 @@ struct proc_entry { char name[32]; proc_rd_callback_t rd; proc_wr_callback_t wr; -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)) - struct file_operations ops; -+#else +- struct file_operations ops; + struct proc_ops ops; -+#endif int entity; }; -@@ -1869,6 +1879,7 @@ static int mei_proc_single_open(struct i +@@ -1869,6 +1875,7 @@ static int mei_proc_single_open(struct i static void mei_proc_entry_create(struct proc_dir_entry *parent_node, struct proc_entry *proc_entry) { @@ -74,7 +71,7 @@ memset(&proc_entry->ops, 0, sizeof(struct file_operations)); proc_entry->ops.owner = THIS_MODULE; -@@ -1879,6 +1890,17 @@ static void mei_proc_entry_create(struct +@@ -1879,6 +1886,17 @@ static void mei_proc_entry_create(struct proc_entry->ops.llseek = seq_lseek; if (proc_entry->wr) proc_entry->ops.write = proc_entry->wr; @@ -92,7 +89,7 @@ proc_create_data(proc_entry->name, (S_IFREG | S_IRUGO), -@@ -2174,9 +2196,11 @@ static int MEI_module_init (void) +@@ -2174,9 +2192,11 @@ static int MEI_module_init (void) return (result); } @@ -104,7 +101,7 @@ return 0; } -@@ -2304,6 +2328,10 @@ static void MEI_module_exit (void) +@@ -2304,6 +2324,10 @@ static void MEI_module_exit (void) #else unregister_chrdev ( major_number , DRV_MEI_NAME ); @@ -115,7 +112,7 @@ #endif #if CONFIG_PROC_FS -@@ -2388,9 +2416,11 @@ static void MEI_module_exit (void) +@@ -2388,9 +2412,11 @@ static void MEI_module_exit (void) ("MEI_DRV: Chipset Basic Exit failed" MEI_DRV_CRLF)); } @@ -127,18 +124,18 @@ #if (MEI_SUPPORT_DEBUG_LOGGER == 1) if (nl_debug_sock) -@@ -2514,6 +2544,10 @@ static int MEI_InitModuleRegCharDev(cons +@@ -2514,6 +2540,10 @@ static int MEI_InitModuleRegCharDev(cons ("Using major number %d" MEI_DRV_CRLF, major_number)); } -+ mei_class = class_create(THIS_MODULE, devName); ++ mei_class = class_create(devName); + mei_devt = MKDEV(major_number, 0); + device_create(mei_class, NULL, mei_devt, NULL, "%s/%i", devName, 0); + return 0; #endif /* CONFIG_DEVFS_FS */ } -@@ -2563,21 +2597,32 @@ static int MEI_InitModuleBasics(void) +@@ -2563,21 +2593,32 @@ static int MEI_InitModuleBasics(void) } #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)) @@ -171,7 +168,7 @@ return 0; } -@@ -2905,11 +2950,15 @@ IFX_int32_t MEI_IoctlInitDevice( +@@ -2905,11 +2946,15 @@ IFX_int32_t MEI_IoctlInitDevice( pMeiDev->eModePoll = e_MEI_DEV_ACCESS_MODE_IRQ; pMeiDev->intMask = ME_ARC2ME_INTERRUPT_UNMASK_ALL; @@ -187,7 +184,7 @@ pTmpXCntrl = MEI_VrxXDevToIrqListAdd( MEI_DRV_LINENUM_GET(pMeiDev), -@@ -3249,9 +3298,11 @@ static int MEI_IoctlMeiDbgAccessWr_Wrap( +@@ -3249,9 +3294,11 @@ static int MEI_IoctlMeiDbgAccessWr_Wrap( ret = MEI_IoctlMeiDbgAccessWr( pMeiDynCntrl, pLocalArgument); /* return arguments - count */ @@ -202,7 +199,7 @@ return ret; } -@@ -3278,16 +3329,18 @@ static int MEI_IoctlMeiDbgAccessRd_Wrap( +@@ -3278,16 +3325,18 @@ static int MEI_IoctlMeiDbgAccessRd_Wrap( if ( pLocalArgument->count ) { /* return the buffer */ diff --git a/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/101_no-date-time.patch b/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/101_no-date-time.patch index 9785bfc4c18..a409d878584 100644 --- a/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/101_no-date-time.patch +++ b/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/101_no-date-time.patch @@ -1,6 +1,6 @@ --- a/src/drv_mei_cpe_linux.c +++ b/src/drv_mei_cpe_linux.c -@@ -1505,8 +1505,8 @@ struct proc_entry { +@@ -1501,8 +1501,8 @@ struct proc_entry { static void MEI_GetVersionProc(struct seq_file *s) { seq_printf(s, "%s" MEI_DRV_CRLF, &MEI_WHATVERSION[4]); @@ -11,13 +11,11 @@ } /** -@@ -4233,7 +4233,9 @@ module_exit (MEI_module_exit); +@@ -4229,7 +4229,6 @@ module_exit (MEI_module_exit); #ifdef MODULE MODULE_AUTHOR("www.lantiq.com"); MODULE_DESCRIPTION("MEI CPE Driver - www.lantiq.com"); -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,11,0)) - MODULE_SUPPORTED_DEVICE("MEI CPE Interface"); -+#endif +-MODULE_SUPPORTED_DEVICE("MEI CPE Interface"); MODULE_LICENSE ("GPL"); #endif /* #ifdef MODULE*/ diff --git a/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/300-fix-simple-compilation-warning.patch b/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/300-fix-simple-compilation-warning.patch index c1d3aa8b411..f2b06545dfd 100644 --- a/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/300-fix-simple-compilation-warning.patch +++ b/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/300-fix-simple-compilation-warning.patch @@ -9,7 +9,7 @@ #endif /* add MEI CPE debug/printout part */ -@@ -1718,8 +1718,8 @@ static void MEI_MeminfoProcPerDevGet(str +@@ -1714,8 +1714,8 @@ static void MEI_MeminfoProcPerDevGet(str ", CRC = 0x%08X" #endif MEI_DRV_CRLF, diff --git a/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/400-kernel-6.1.patch b/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/400-kernel-6.1.patch index a1efdb7b481..b70a5cb9d03 100644 --- a/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/400-kernel-6.1.patch +++ b/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/400-kernel-6.1.patch @@ -1,28 +1,22 @@ --- a/src/drv_mei_cpe_linux.c +++ b/src/drv_mei_cpe_linux.c -@@ -1873,7 +1873,11 @@ static int mei_seq_single_show(struct se +@@ -1869,7 +1869,7 @@ static int mei_seq_single_show(struct se static int mei_proc_single_open(struct inode *inode, struct file *file) { -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,17,0)) - return single_open(file, mei_seq_single_show, PDE_DATA(inode)); -+#else +- return single_open(file, mei_seq_single_show, PDE_DATA(inode)); + return single_open(file, mei_seq_single_show, pde_data(inode)); -+#endif } static void mei_proc_entry_create(struct proc_dir_entry *parent_node, --- a/src/drv_mei_cpe_linux_proc_config.c +++ b/src/drv_mei_cpe_linux_proc_config.c -@@ -1036,7 +1036,11 @@ static int mei_seq_single_show(struct se +@@ -1036,7 +1036,7 @@ static int mei_seq_single_show(struct se static int mei_proc_single_open(struct inode *inode, struct file *file) { -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,17,0)) - return single_open(file, mei_seq_single_show, PDE_DATA(inode)); -+#else +- return single_open(file, mei_seq_single_show, PDE_DATA(inode)); + return single_open(file, mei_seq_single_show, pde_data(inode)); -+#endif } #if (LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)) diff --git a/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/402-kernel-6.6-fixes.patch b/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/402-kernel-6.6-fixes.patch index 8df0a31e7ea..3c34830db78 100644 --- a/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/402-kernel-6.6-fixes.patch +++ b/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/402-kernel-6.6-fixes.patch @@ -16,17 +16,3 @@ #if defined(IFXOS_HAVE_VERSION_CHECK) # if (IFXOS_VERSION_CHECK_EG_THAN(1,1,0)) # define IFXOS_SUPPORTS_FIFO_PEEK 1 ---- a/src/drv_mei_cpe_linux.c -+++ b/src/drv_mei_cpe_linux.c -@@ -2548,7 +2548,11 @@ static int MEI_InitModuleRegCharDev(cons - ("Using major number %d" MEI_DRV_CRLF, major_number)); - } - -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0) - mei_class = class_create(THIS_MODULE, devName); -+#else -+ mei_class = class_create(devName); -+#endif - mei_devt = MKDEV(major_number, 0); - device_create(mei_class, NULL, mei_devt, NULL, "%s/%i", devName, 0); - diff --git a/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/405-convert-platform-driver-.remove-to-.remove_new.patch b/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/405-convert-platform-driver-.remove-to-.remove_new.patch index 186fdbaeb7d..85793a50506 100644 --- a/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/405-convert-platform-driver-.remove-to-.remove_new.patch +++ b/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/405-convert-platform-driver-.remove-to-.remove_new.patch @@ -15,7 +15,7 @@ Signed-off-by: Shiji Yang --- a/src/drv_mei_cpe_linux.c +++ b/src/drv_mei_cpe_linux.c -@@ -2048,13 +2048,12 @@ static int MEI_InstallProcEntry(unsigned +@@ -2040,13 +2040,12 @@ static int MEI_InstallProcEntry(unsigned #endif #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)) diff --git a/package/kernel/lantiq/ltq-vdsl-vr9/patches/001-fix-compile.patch b/package/kernel/lantiq/ltq-vdsl-vr9/patches/001-fix-compile.patch index 1355a1a7915..6c828fe370b 100644 --- a/package/kernel/lantiq/ltq-vdsl-vr9/patches/001-fix-compile.patch +++ b/package/kernel/lantiq/ltq-vdsl-vr9/patches/001-fix-compile.patch @@ -1,12 +1,10 @@ --- a/src/include/drv_dsl_cpe_os_linux.h +++ b/src/include/drv_dsl_cpe_os_linux.h -@@ -33,6 +33,9 @@ +@@ -33,6 +33,7 @@ #endif #include -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) +#include -+#endif #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)) #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17)) diff --git a/package/kernel/lantiq/ltq-vdsl-vr9/patches/100-compat.patch b/package/kernel/lantiq/ltq-vdsl-vr9/patches/100-compat.patch index 7670fe6a00e..c372ee0e971 100644 --- a/package/kernel/lantiq/ltq-vdsl-vr9/patches/100-compat.patch +++ b/package/kernel/lantiq/ltq-vdsl-vr9/patches/100-compat.patch @@ -35,40 +35,32 @@ #endif if (pINode == DSL_NULL) -@@ -491,7 +485,11 @@ DSL_void_t* DSL_DRV_VMalloc( +@@ -491,7 +485,7 @@ DSL_void_t* DSL_DRV_VMalloc( DSL_DRV_size_t nSize) { /* VRX500-BU: Better to use vmalloc or vzmalloc here?! */ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0) - return __vmalloc((unsigned long)nSize, GFP_KERNEL, PAGE_KERNEL); -+#else +- return __vmalloc((unsigned long)nSize, GFP_KERNEL, PAGE_KERNEL); + return __vmalloc((unsigned long)nSize, GFP_KERNEL); -+#endif /* return vmalloc(nSize);*/ } -@@ -917,12 +915,19 @@ DSL_int32_t DSL_DRV_ThreadShutdown( +@@ -917,12 +911,11 @@ DSL_int32_t DSL_DRV_ThreadShutdown( DSL_uint32_t DSL_DRV_SysTimeGet(DSL_uint32_t nOffset) { - struct timeval tv; ++ struct timespec64 now; DSL_uint32_t nTime = 0; -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0)) -+ struct timeval tv; - memset(&tv, 0, sizeof(tv)); - do_gettimeofday(&tv); - nTime = (DSL_uint32_t)tv.tv_sec; -+#else -+ struct timespec64 now; -+ +- memset(&tv, 0, sizeof(tv)); +- do_gettimeofday(&tv); +- nTime = (DSL_uint32_t)tv.tv_sec; + ktime_get_real_ts64(&now); + nTime = (DSL_uint32_t)now.tv_sec; -+#endif if ( (nOffset == 0) || (nOffset > nTime) ) { -@@ -1203,6 +1208,9 @@ static void DSL_DRV_NlSendMsg(DSL_char_t +@@ -1203,6 +1196,9 @@ static void DSL_DRV_NlSendMsg(DSL_char_t } #endif @@ -78,18 +70,18 @@ /* Entry point of driver */ int __init DSL_ModuleInit(void) { -@@ -1241,6 +1249,10 @@ int __init DSL_ModuleInit(void) +@@ -1241,6 +1237,10 @@ int __init DSL_ModuleInit(void) DSL_DRV_DevNodeInit(); -+ dsl_class = class_create(THIS_MODULE, DRV_DSL_CPE_API_DEV_NAME); ++ dsl_class = class_create(DRV_DSL_CPE_API_DEV_NAME); + dsl_devt = MKDEV(DRV_DSL_CPE_API_DEV_MAJOR, 0); + device_create(dsl_class, NULL, dsl_devt, NULL, "dsl_cpe_api/0"); + return 0; } -@@ -1248,6 +1260,11 @@ void __exit DSL_ModuleCleanup(void) +@@ -1248,6 +1248,11 @@ void __exit DSL_ModuleCleanup(void) { printk("Module will be unloaded"DSL_DRV_CRLF); diff --git a/package/kernel/lantiq/ltq-vdsl-vr9/patches/301-fix-compilation-warning-simple-fix.patch b/package/kernel/lantiq/ltq-vdsl-vr9/patches/301-fix-compilation-warning-simple-fix.patch index 3a5e4acd742..7756b054098 100644 --- a/package/kernel/lantiq/ltq-vdsl-vr9/patches/301-fix-compilation-warning-simple-fix.patch +++ b/package/kernel/lantiq/ltq-vdsl-vr9/patches/301-fix-compilation-warning-simple-fix.patch @@ -31,7 +31,7 @@ DSL_char_t msg[DSL_DBG_MAX_DEBUG_PRINT_CHAR + 1] = "\0"; va_list ap; /* points to each unnamed arg in turn */ -@@ -1172,7 +1174,7 @@ static void DSL_DRV_DebugInit(void) +@@ -1160,7 +1162,7 @@ static void DSL_DRV_DebugInit(void) return; } @@ -40,7 +40,7 @@ static void DSL_DRV_NlSendMsg(DSL_char_t* pMsg) { struct nlmsghdr *pNlMsgHdr; -@@ -1261,7 +1263,7 @@ void __exit DSL_ModuleCleanup(void) +@@ -1249,7 +1251,7 @@ void __exit DSL_ModuleCleanup(void) printk("Module will be unloaded"DSL_DRV_CRLF); device_destroy(dsl_class, dsl_devt); diff --git a/package/kernel/lantiq/ltq-vdsl-vr9/patches/302-kernel-6.6-fixes.patch b/package/kernel/lantiq/ltq-vdsl-vr9/patches/302-kernel-6.6-fixes.patch index 3bf9cefc53d..9d83a65c75c 100644 --- a/package/kernel/lantiq/ltq-vdsl-vr9/patches/302-kernel-6.6-fixes.patch +++ b/package/kernel/lantiq/ltq-vdsl-vr9/patches/302-kernel-6.6-fixes.patch @@ -9,20 +9,6 @@ DSL_CHECK_ERR_CODE(); DSL_DEBUG(DSL_DBG_MSG, ---- a/src/common/drv_dsl_cpe_os_linux.c -+++ b/src/common/drv_dsl_cpe_os_linux.c -@@ -1251,7 +1251,11 @@ int __init DSL_ModuleInit(void) - - DSL_DRV_DevNodeInit(); - -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0) - dsl_class = class_create(THIS_MODULE, DRV_DSL_CPE_API_DEV_NAME); -+#else -+ dsl_class = class_create(DRV_DSL_CPE_API_DEV_NAME); -+#endif - dsl_devt = MKDEV(DRV_DSL_CPE_API_DEV_MAJOR, 0); - device_create(dsl_class, NULL, dsl_devt, NULL, "dsl_cpe_api/0"); - --- a/src/device/drv_dsl_cpe_device_vrx.c +++ b/src/device/drv_dsl_cpe_device_vrx.c @@ -2628,7 +2628,7 @@ static DSL_Error_t DSL_DRV_VRX_ChannelSt diff --git a/package/kernel/lantiq/ltq-vdsl-vr9/patches/303-fix-missing-prototypes-warning.patch b/package/kernel/lantiq/ltq-vdsl-vr9/patches/303-fix-missing-prototypes-warning.patch index 013dffcb878..7b2e49c865c 100644 --- a/package/kernel/lantiq/ltq-vdsl-vr9/patches/303-fix-missing-prototypes-warning.patch +++ b/package/kernel/lantiq/ltq-vdsl-vr9/patches/303-fix-missing-prototypes-warning.patch @@ -70,7 +70,7 @@ Signed-off-by: Shiji Yang DSL_boolean_t bIsInKernel, --- a/src/common/drv_dsl_cpe_os_linux.c +++ b/src/common/drv_dsl_cpe_os_linux.c -@@ -1214,7 +1214,7 @@ static struct class *dsl_class; +@@ -1202,7 +1202,7 @@ static struct class *dsl_class; static dev_t dsl_devt; /* Entry point of driver */ @@ -79,7 +79,7 @@ Signed-off-by: Shiji Yang { DSL_int_t i; -@@ -1262,7 +1262,7 @@ int __init DSL_ModuleInit(void) +@@ -1246,7 +1246,7 @@ int __init DSL_ModuleInit(void) return 0; } diff --git a/package/kernel/lantiq/ltq-vmmc/patches/000-portability.patch b/package/kernel/lantiq/ltq-vmmc/patches/000-portability.patch index a9dd957792f..6a82ac8a3f5 100644 --- a/package/kernel/lantiq/ltq-vmmc/patches/000-portability.patch +++ b/package/kernel/lantiq/ltq-vmmc/patches/000-portability.patch @@ -26,7 +26,7 @@ clean-generic: --- a/src/drv_vmmc_linux.c +++ b/src/drv_vmmc_linux.c -@@ -27,11 +27,18 @@ +@@ -27,11 +27,13 @@ #include #include #include @@ -35,161 +35,110 @@ #ifdef LINUX_2_6 #include #ifndef UTS_RELEASE -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)) -+#include - #include -+#else +-#include +#include +#include -+#endif #endif /* UTC_RELEASE */ #undef CONFIG_DEVFS_FS #endif /* LINUX_2_6 */ --- a/src/mps/drv_mps_vmmc_linux.c +++ b/src/mps/drv_mps_vmmc_linux.c -@@ -19,11 +19,22 @@ - #include "drv_config.h" - - #include "drv_mps_version.h" -+#include - +@@ -23,7 +23,7 @@ #ifdef CONFIG_DEBUG_MINI_BOOT #define IKOS_MINI_BOOT #endif /* */ -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)) - #include -+#ifndef UTS_RELEASE -+#include -+#endif -+#else +-#include +#include -+#ifndef UTS_RELEASE -+#include -+#endif -+#endif #include #include #include -@@ -34,7 +45,13 @@ +@@ -34,7 +34,9 @@ #include #include #ifdef LINUX_2_6 +-#include +#ifndef UTS_RELEASE -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33) - #include -+#else +#include -+#endif +#endif /* UTC_RELEASE */ #else /* */ #include #include -@@ -94,8 +111,13 @@ IFX_int32_t ifx_mps_get_status_proc (IFX +@@ -94,7 +96,7 @@ IFX_int32_t ifx_mps_get_status_proc (IFX #ifndef __KERNEL__ IFX_int32_t ifx_mps_open (struct inode *inode, struct file *file_p); IFX_int32_t ifx_mps_close (struct inode *inode, struct file *file_p); -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37) - IFX_int32_t ifx_mps_ioctl (struct inode *inode, struct file *file_p, - IFX_uint32_t nCmd, IFX_ulong_t arg); -+#else +-IFX_int32_t ifx_mps_ioctl (struct inode *inode, struct file *file_p, +long ifx_mps_ioctl (struct file *file_p, -+ IFX_uint32_t nCmd, IFX_ulong_t arg); -+#endif + IFX_uint32_t nCmd, IFX_ulong_t arg); IFX_int32_t ifx_mps_read_mailbox (mps_devices type, mps_message * rw); IFX_int32_t ifx_mps_write_mailbox (mps_devices type, mps_message * rw); - IFX_int32_t ifx_mps_register_data_callback (mps_devices type, IFX_uint32_t dir, -@@ -155,7 +177,11 @@ IFX_char_t voice_channel_int_name[NUM_VO +@@ -155,7 +157,7 @@ IFX_char_t voice_channel_int_name[NUM_VO static struct file_operations ifx_mps_fops = { owner:THIS_MODULE, poll:ifx_mps_poll, -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37) - ioctl:ifx_mps_ioctl, -+#else +- ioctl:ifx_mps_ioctl, + unlocked_ioctl:ifx_mps_ioctl, -+#endif open:ifx_mps_open, release:ifx_mps_close }; -@@ -598,8 +624,13 @@ static IFX_uint32_t ifx_mps_poll (struct +@@ -598,7 +600,7 @@ static IFX_uint32_t ifx_mps_poll (struct * \return -ENOIOCTLCMD Invalid command * \ingroup API */ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37) - IFX_int32_t ifx_mps_ioctl (struct inode * inode, struct file * file_p, - IFX_uint32_t nCmd, IFX_ulong_t arg) -+#else +-IFX_int32_t ifx_mps_ioctl (struct inode * inode, struct file * file_p, +long ifx_mps_ioctl (struct file *file_p, -+ IFX_uint32_t nCmd, IFX_ulong_t arg) -+#endif + IFX_uint32_t nCmd, IFX_ulong_t arg) { IFX_int32_t retvalue = -EINVAL; - mps_message rw_struct; -@@ -613,17 +644,30 @@ IFX_int32_t ifx_mps_ioctl (struct inode +@@ -613,17 +615,18 @@ IFX_int32_t ifx_mps_ioctl (struct inode 'mps_devices' enum type, which in fact is [0..8]; So, if inode value is [0..NUM_VOICE_CHANNEL+1], then we make sure that we are calling from kernel space. */ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37) - if (((IFX_int32_t) inode >= 0) && - ((IFX_int32_t) inode < NUM_VOICE_CHANNEL + 1)) -+#else +- if (((IFX_int32_t) inode >= 0) && +- ((IFX_int32_t) inode < NUM_VOICE_CHANNEL + 1)) + if (((IFX_int32_t) file_p >= 0) && + ((IFX_int32_t) file_p < NUM_VOICE_CHANNEL + 1)) -+#endif { from_kernel = 1; /* Get corresponding mailbox device structure */ if ((pMBDev = -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37) - ifx_mps_get_device ((mps_devices) ((IFX_int32_t) inode))) == 0) -+#else +- ifx_mps_get_device ((mps_devices) ((IFX_int32_t) inode))) == 0) + ifx_mps_get_device ((mps_devices) ((IFX_int32_t) file_p))) == 0) -+#endif { return (-EINVAL); } -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37) -+#else + file_p = NULL; -+#endif } else { --- a/src/mps/drv_mps_vmmc_common.c +++ b/src/mps/drv_mps_vmmc_common.c -@@ -21,7 +21,11 @@ +@@ -21,7 +21,7 @@ #undef USE_PLAIN_VOICE_FIRMWARE #undef PRINT_ON_ERR_INTERRUPT #undef FAIL_ON_ERR_INTERRUPT -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)) - #include -+#else +-#include +#include -+#endif #include #include -@@ -92,7 +96,9 @@ extern IFX_uint32_t danube_get_cpu_ver ( +@@ -92,7 +92,6 @@ extern IFX_uint32_t danube_get_cpu_ver ( extern mps_mbx_dev *ifx_mps_get_device (mps_devices type); #ifdef LINUX_2_6 -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) - extern IFX_void_t bsp_mask_and_ack_irq (IFX_uint32_t irq_nr); -+#endif +-extern IFX_void_t bsp_mask_and_ack_irq (IFX_uint32_t irq_nr); #else /* */ extern IFX_void_t mask_and_ack_danube_irq (IFX_uint32_t irq_nr); --- a/src/mps/drv_mps_vmmc_danube.c +++ b/src/mps/drv_mps_vmmc_danube.c -@@ -20,7 +20,11 @@ +@@ -20,7 +20,7 @@ #ifdef SYSTEM_DANUBE /* defined in drv_mps_vmmc_config.h */ -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)) - #include -+#else +-#include +#include -+#endif /* lib_ifxos headers */ #include "ifx_types.h" @@ -221,67 +170,47 @@ cpb2w (&cram_offset, &bbd_cram->pData[0], sizeof (IFX_uint16_t)); --- a/src/drv_vmmc_init.c +++ b/src/drv_vmmc_init.c -@@ -776,8 +776,13 @@ IFX_int32_t VMMC_TAPI_LL_FW_Start(IFX_TA +@@ -776,7 +776,7 @@ IFX_int32_t VMMC_TAPI_LL_FW_Start(IFX_TA dwld.fwDwld.length = IoInit.pram_size; /* download firmware */ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37) - ret = ifx_mps_ioctl((IFX_void_t *) command, IFX_NULL, FIO_MPS_DOWNLOAD, - (IFX_uint32_t) &dwld.fwDwld); -+#else +- ret = ifx_mps_ioctl((IFX_void_t *) command, IFX_NULL, FIO_MPS_DOWNLOAD, + ret = ifx_mps_ioctl((IFX_void_t *) command, FIO_MPS_DOWNLOAD, -+ (IFX_uint32_t) &dwld.fwDwld); -+#endif + (IFX_uint32_t) &dwld.fwDwld); } - if (VMMC_SUCCESS(ret)) --- a/src/drv_vmmc_ioctl.c +++ b/src/drv_vmmc_ioctl.c -@@ -426,18 +426,31 @@ IFX_int32_t VMMC_Dev_Spec_Ioctl (IFX_TAP +@@ -426,18 +426,18 @@ IFX_int32_t VMMC_Dev_Spec_Ioctl (IFX_TAP /* MPS driver will do the USR2KERN so just pass on the pointer. */ dwnld_struct.data = (IFX_void_t *)IoInit.pPRAMfw; -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37) - ret = ifx_mps_ioctl((IFX_void_t *)command, IFX_NULL, - FIO_MPS_DOWNLOAD, (IFX_uint32_t) &dwnld_struct); -+#else +- ret = ifx_mps_ioctl((IFX_void_t *)command, IFX_NULL, + ret = ifx_mps_ioctl((IFX_void_t *)command, -+ FIO_MPS_DOWNLOAD, (IFX_uint32_t) &dwnld_struct); -+#endif + FIO_MPS_DOWNLOAD, (IFX_uint32_t) &dwnld_struct); break; } case FIO_DEV_RESET: { -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37) - ret = ifx_mps_ioctl((IFX_void_t *)command, IFX_NULL, FIO_MPS_RESET, 0); -+#else +- ret = ifx_mps_ioctl((IFX_void_t *)command, IFX_NULL, FIO_MPS_RESET, 0); + ret = ifx_mps_ioctl((IFX_void_t *)command, FIO_MPS_RESET, 0); -+#endif break; } case FIO_DEV_RESTART: { -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37) - ret = ifx_mps_ioctl((IFX_void_t *)command, IFX_NULL, FIO_MPS_RESTART, 0); -+#else +- ret = ifx_mps_ioctl((IFX_void_t *)command, IFX_NULL, FIO_MPS_RESTART, 0); + ret = ifx_mps_ioctl((IFX_void_t *)command, FIO_MPS_RESTART, 0); -+#endif break; } case FIO_LASTERR: --- a/src/mps/drv_mps_vmmc.h +++ b/src/mps/drv_mps_vmmc.h -@@ -279,8 +279,13 @@ typedef struct +@@ -279,7 +279,7 @@ typedef struct #include IFX_int32_t ifx_mps_open (struct inode *inode, struct file *file_p); IFX_int32_t ifx_mps_close (struct inode *inode, struct file *filp); -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37) - IFX_int32_t ifx_mps_ioctl (struct inode *inode, struct file *file_p, - IFX_uint32_t nCmd, unsigned long arg); -+#else +-IFX_int32_t ifx_mps_ioctl (struct inode *inode, struct file *file_p, +long ifx_mps_ioctl (struct file *filp, -+ IFX_uint32_t nCmd, unsigned long arg); -+#endif + IFX_uint32_t nCmd, unsigned long arg); IFX_int32_t ifx_mps_register_data_callback (mps_devices type, IFX_uint32_t dir, IFX_void_t (*callback) (mps_devices - type)); diff --git a/package/kernel/lantiq/ltq-vmmc/patches/100-target.patch b/package/kernel/lantiq/ltq-vmmc/patches/100-target.patch index 340a3d55c86..def17fe687b 100644 --- a/package/kernel/lantiq/ltq-vmmc/patches/100-target.patch +++ b/package/kernel/lantiq/ltq-vmmc/patches/100-target.patch @@ -1,12 +1,10 @@ --- a/src/drv_vmmc_access.h +++ b/src/drv_vmmc_access.h -@@ -24,6 +24,10 @@ +@@ -24,6 +24,8 @@ #include "drv_mps_vmmc.h" #endif -+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28)) -+# define IFX_MPS IFXMIPS_MPS_BASE_ADDR -+#endif ++#define IFX_MPS IFXMIPS_MPS_BASE_ADDR + /* ============================= */ /* Global Defines */ @@ -87,22 +85,7 @@ #endif /* _DRV_VMMC_AMAZON_S_H */ --- a/src/drv_vmmc_init.c +++ b/src/drv_vmmc_init.c -@@ -52,6 +52,14 @@ - #include "ifx_pmu.h" - #endif /* PMU_SUPPORTED */ - -+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28)) -+# define IFX_MPS_CAD0SR IFXMIPS_MPS_CAD0SR -+# define IFX_MPS_CAD1SR IFXMIPS_MPS_CAD1SR -+# define IFX_MPS_CVC0SR IFXMIPS_MPS_CVC0SR -+# define IFX_MPS_CVC1SR IFXMIPS_MPS_CVC1SR -+# define IFX_MPS_CVC2SR IFXMIPS_MPS_CVC2SR -+# define IFX_MPS_CVC3SR IFXMIPS_MPS_CVC3SR -+#endif - - /* ============================= */ - /* Local Macros & Definitions */ -@@ -1591,7 +1599,7 @@ IFX_void_t VMMC_DeviceDriverStop(IFX_voi +@@ -1586,7 +1586,7 @@ IFX_void_t VMMC_DeviceDriverStop(IFX_voi #ifdef VMMC_DRIVER_UNLOAD_HOOK if (VDevices[0].nDevState & DS_GPIO_RESERVED) { @@ -113,14 +96,12 @@ { --- a/src/drv_vmmc_init_cap.c +++ b/src/drv_vmmc_init_cap.c -@@ -22,6 +22,11 @@ +@@ -22,6 +22,9 @@ #include "drv_mps_vmmc.h" #include "drv_mps_vmmc_device.h" -+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28)) -+# define IFX_MPS_CHIPID_VERSION_GET IFXMIPS_MPS_CHIPID_VERSION_GET -+# define IFX_MPS_CHIPID IFXMIPS_MPS_CHIPID -+#endif ++#define IFX_MPS_CHIPID_VERSION_GET IFXMIPS_MPS_CHIPID_VERSION_GET ++#define IFX_MPS_CHIPID IFXMIPS_MPS_CHIPID + /* ============================= */ /* Configuration defintions */ @@ -135,42 +116,33 @@ #undef USE_PLAIN_VOICE_FIRMWARE #undef PRINT_ON_ERR_INTERRUPT -@@ -39,8 +40,32 @@ +@@ -35,8 +36,23 @@ #include "ifxos_interrupt.h" #include "ifxos_time.h" -#include -#include -+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28)) -+# include -+# include -+# include ++#include ++#include ++#include + -+# define ifx_gptu_timer_request lq_request_timer -+# define ifx_gptu_timer_start lq_start_timer -+# define ifx_gptu_countvalue_get lq_get_count_value -+# define ifx_gptu_timer_free lq_free_timer ++#define ifx_gptu_timer_request lq_request_timer ++#define ifx_gptu_timer_start lq_start_timer ++#define ifx_gptu_countvalue_get lq_get_count_value ++#define ifx_gptu_timer_free lq_free_timer + + -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) -+# define bsp_mask_and_ack_irq ltq_mask_and_ack_irq -+#else +extern void ltq_mask_and_ack_irq(struct irq_data *d); -+static void inline bsp_mask_and_ack_irq(int x) ++static inline void bsp_mask_and_ack_irq(int x) +{ + struct irq_data d; + d.hwirq = x; + ltq_mask_and_ack_irq(&d); +} -+#endif -+#else -+# include -+# include -+#endif #include "drv_mps_vmmc.h" #include "drv_mps_vmmc_dbg.h" -@@ -104,6 +129,9 @@ extern IFX_void_t bsp_mask_and_ack_irq ( +@@ -97,6 +113,9 @@ extern mps_mbx_dev *ifx_mps_get_device ( extern IFX_void_t mask_and_ack_danube_irq (IFX_uint32_t irq_nr); #endif /* */ @@ -180,7 +152,7 @@ extern IFXOS_event_t fw_ready_evt; /* callback function to free all data buffers currently used by voice FW */ IFX_void_t (*ifx_mps_bufman_freeall)(IFX_void_t) = IFX_NULL; -@@ -207,7 +235,8 @@ IFX_boolean_t ifx_mps_ext_bufman () +@@ -200,7 +219,8 @@ IFX_boolean_t ifx_mps_ext_bufman () */ IFX_void_t *ifx_mps_fastbuf_malloc (IFX_size_t size, IFX_int32_t priority) { @@ -190,7 +162,7 @@ IFX_int32_t index = fastbuf_index; if (fastbuf_initialized == 0) -@@ -261,7 +290,7 @@ IFX_void_t *ifx_mps_fastbuf_malloc (IFX_ +@@ -254,7 +274,7 @@ IFX_void_t *ifx_mps_fastbuf_malloc (IFX_ */ IFX_void_t ifx_mps_fastbuf_free (const IFX_void_t * ptr) { @@ -199,7 +171,7 @@ IFX_int32_t index = fastbuf_index; IFXOS_LOCKINT (flags); -@@ -457,7 +486,7 @@ static mps_buffer_state_e ifx_mps_bufman +@@ -450,7 +470,7 @@ static mps_buffer_state_e ifx_mps_bufman */ static IFX_int32_t ifx_mps_bufman_inc_level (IFX_uint32_t value) { @@ -208,7 +180,7 @@ if (mps_buffer.buf_level + value > MPS_BUFFER_MAX_LEVEL) { -@@ -484,7 +513,7 @@ static IFX_int32_t ifx_mps_bufman_inc_le +@@ -477,7 +497,7 @@ static IFX_int32_t ifx_mps_bufman_inc_le */ static IFX_int32_t ifx_mps_bufman_dec_level (IFX_uint32_t value) { @@ -217,7 +189,7 @@ if (mps_buffer.buf_level < value) { -@@ -636,7 +665,7 @@ IFX_int32_t ifx_mps_bufman_buf_provide ( +@@ -629,7 +649,7 @@ IFX_int32_t ifx_mps_bufman_buf_provide ( mem_seg_ptr[i] = (IFX_uint32_t *) CPHYSADDR ((IFX_uint32_t) mps_buffer. malloc (segment_size, FASTBUF_FW_OWNED)); @@ -226,7 +198,7 @@ { TRACE (MPS, DBG_LEVEL_HIGH, ("%s(): cannot allocate buffer\n", __FUNCTION__)); -@@ -952,7 +981,7 @@ IFX_int32_t ifx_mps_common_open (mps_com +@@ -945,7 +965,7 @@ IFX_int32_t ifx_mps_common_open (mps_com mps_mbx_dev * pMBDev, IFX_int32_t bcommand, IFX_boolean_t from_kernel) { @@ -235,7 +207,7 @@ IFXOS_LOCKINT (flags); -@@ -1068,7 +1097,7 @@ IFX_int32_t ifx_mps_common_close (mps_mb +@@ -1061,7 +1081,7 @@ IFX_int32_t ifx_mps_common_close (mps_mb IFX_void_t ifx_mps_release_structures (mps_comm_dev * pDev) { IFX_int32_t count; @@ -244,7 +216,7 @@ IFXOS_LOCKINT (flags); IFXOS_BlockFree (pFW_img_data); -@@ -1117,7 +1146,7 @@ IFX_uint32_t ifx_mps_init_structures (mp +@@ -1110,7 +1130,7 @@ IFX_uint32_t ifx_mps_init_structures (mp /* Initialize MPS main structure */ memset ((IFX_void_t *) pDev, 0, sizeof (mps_comm_dev)); @@ -253,7 +225,7 @@ pDev->flags = 0x00000000; MBX_Memory = pDev->base_global; -@@ -1125,9 +1154,11 @@ IFX_uint32_t ifx_mps_init_structures (mp +@@ -1118,9 +1138,11 @@ IFX_uint32_t ifx_mps_init_structures (mp for MBX communication. These are: mailbox base address, mailbox size, * mailbox read index and mailbox write index. for command and voice mailbox, * upstream and downstream direction. */ @@ -268,7 +240,7 @@ MBX_Memory->MBX_UPSTR_CMD_BASE = (IFX_uint32_t *) CPHYSADDR ((IFX_uint32_t) MBX_UPSTRM_CMD_FIFO_BASE); MBX_Memory->MBX_UPSTR_CMD_SIZE = MBX_CMD_FIFO_SIZE; -@@ -1564,7 +1595,7 @@ IFX_int32_t ifx_mps_mbx_read_message (mp +@@ -1557,7 +1579,7 @@ IFX_int32_t ifx_mps_mbx_read_message (mp IFX_uint32_t * bytes) { IFX_int32_t i, ret; @@ -277,7 +249,7 @@ IFXOS_LOCKINT (flags); -@@ -1774,7 +1805,7 @@ IFX_int32_t ifx_mps_mbx_write_message (m +@@ -1767,7 +1789,7 @@ IFX_int32_t ifx_mps_mbx_write_message (m { mps_fifo *mbx; IFX_uint32_t i; @@ -286,7 +258,7 @@ IFX_int32_t retval = -EAGAIN; IFX_int32_t retries = 0; IFX_uint32_t word = 0; -@@ -2169,6 +2200,7 @@ IFX_int32_t ifx_mps_mbx_write_cmd (mps_m +@@ -2162,6 +2184,7 @@ IFX_int32_t ifx_mps_mbx_write_cmd (mps_m TRACE (MPS, DBG_LEVEL_HIGH, ("%s(): Invalid device ID %d !\n", __FUNCTION__, pMBDev->devID)); } @@ -294,7 +266,7 @@ return retval; } -@@ -2192,7 +2224,7 @@ IFX_void_t ifx_mps_mbx_data_upstream (IF +@@ -2185,7 +2208,7 @@ IFX_void_t ifx_mps_mbx_data_upstream (IF mps_mbx_dev *mbx_dev; MbxMsg_s msg; IFX_uint32_t bytes_read = 0; @@ -303,7 +275,7 @@ IFX_int32_t ret; /* set pointer to data upstream mailbox, no matter if 0,1,2 or 3 because -@@ -2283,7 +2315,7 @@ IFX_void_t ifx_mps_mbx_data_upstream (IF +@@ -2276,7 +2299,7 @@ IFX_void_t ifx_mps_mbx_data_upstream (IF { ifx_mps_bufman_dec_level (1); if ((ifx_mps_bufman_get_level () <= mps_buffer.buf_threshold) && @@ -312,7 +284,7 @@ { IFXOS_LockRelease (pMPSDev->provide_buffer); } -@@ -2326,7 +2358,7 @@ IFX_void_t ifx_mps_mbx_data_upstream (IF +@@ -2319,7 +2342,7 @@ IFX_void_t ifx_mps_mbx_data_upstream (IF #endif /* CONFIG_PROC_FS */ ifx_mps_bufman_dec_level (1); if ((ifx_mps_bufman_get_level () <= mps_buffer.buf_threshold) && @@ -321,7 +293,7 @@ { IFXOS_LockRelease (pMPSDev->provide_buffer); } -@@ -2356,7 +2388,7 @@ IFX_void_t ifx_mps_mbx_data_upstream (IF +@@ -2349,7 +2372,7 @@ IFX_void_t ifx_mps_mbx_data_upstream (IF IFX_void_t ifx_mps_mbx_cmd_upstream (IFX_ulong_t dummy) { mps_fifo *mbx; @@ -330,7 +302,7 @@ /* set pointer to upstream command mailbox */ mbx = &(pMPSDev->cmd_upstrm_fifo); -@@ -2404,7 +2436,7 @@ IFX_void_t ifx_mps_mbx_event_upstream (I +@@ -2397,7 +2420,7 @@ IFX_void_t ifx_mps_mbx_event_upstream (I mps_event_msg msg; IFX_int32_t length = 0; IFX_int32_t read_length = 0; @@ -339,7 +311,7 @@ /* set pointer to upstream event mailbox */ mbx = &(pMPSDev->event_upstrm_fifo); -@@ -2619,6 +2651,7 @@ IFX_void_t ifx_mps_enable_mailbox_int () +@@ -2612,6 +2635,7 @@ IFX_void_t ifx_mps_enable_mailbox_int () #endif *IFX_MPS_AD0ENR = Ad0Reg.val; @@ -347,7 +319,7 @@ } /** -@@ -2647,7 +2680,7 @@ IFX_void_t ifx_mps_disable_mailbox_int ( +@@ -2640,7 +2664,7 @@ IFX_void_t ifx_mps_disable_mailbox_int ( */ IFX_void_t ifx_mps_dd_mbx_int_enable (IFX_void_t) { @@ -356,7 +328,7 @@ MPS_Ad0Reg_u Ad0Reg; IFXOS_LOCKINT (flags); -@@ -2673,7 +2706,7 @@ IFX_void_t ifx_mps_dd_mbx_int_enable (IF +@@ -2666,7 +2690,7 @@ IFX_void_t ifx_mps_dd_mbx_int_enable (IF */ IFX_void_t ifx_mps_dd_mbx_int_disable (IFX_void_t) { @@ -365,7 +337,7 @@ MPS_Ad0Reg_u Ad0Reg; IFXOS_LOCKINT (flags); -@@ -2738,7 +2771,6 @@ irqreturn_t ifx_mps_ad0_irq (IFX_int32_t +@@ -2731,7 +2755,6 @@ irqreturn_t ifx_mps_ad0_irq (IFX_int32_t #else /* */ mask_and_ack_danube_irq (irq); #endif /* */ @@ -373,7 +345,7 @@ /* FW is up and ready to process commands */ if (MPS_Ad0StatusReg.fld.dl_end) { -@@ -2800,6 +2832,7 @@ irqreturn_t ifx_mps_ad0_irq (IFX_int32_t +@@ -2793,6 +2816,7 @@ irqreturn_t ifx_mps_ad0_irq (IFX_int32_t } } @@ -381,7 +353,7 @@ if (MPS_Ad0StatusReg.fld.du_mbx) { #ifdef CONFIG_PROC_FS -@@ -2944,12 +2977,12 @@ irqreturn_t ifx_mps_vc_irq (IFX_int32_t +@@ -2937,12 +2961,12 @@ irqreturn_t ifx_mps_vc_irq (IFX_int32_t IFX_MPS_CVC0SR[chan] = MPS_VCStatusReg.val; /* handle only enabled interrupts */ MPS_VCStatusReg.val &= IFX_MPS_VC0ENR[chan]; @@ -395,7 +367,7 @@ pMPSDev->event.MPS_VCStatReg[chan].val = MPS_VCStatusReg.val; #ifdef PRINT_ON_ERR_INTERRUPT if (MPS_VCStatusReg.fld.rcv_ov) -@@ -3093,7 +3126,8 @@ IFX_int32_t ifx_mps_get_fw_version (IFX_ +@@ -3086,7 +3110,8 @@ IFX_int32_t ifx_mps_get_fw_version (IFX_ */ IFX_return_t ifx_mps_init_gpt () { @@ -405,7 +377,7 @@ IFX_ulong_t count; #if defined(SYSTEM_AR9) || defined(SYSTEM_VR9) timer = TIMER1A; -@@ -3166,6 +3200,7 @@ IFX_void_t ifx_mps_shutdown_gpt (IFX_voi +@@ -3159,6 +3184,7 @@ IFX_void_t ifx_mps_shutdown_gpt (IFX_voi #else /* Danube */ timer = TIMER1B; #endif /* SYSTEM_AR9 || SYSTEM_VR9 */ @@ -423,37 +395,30 @@ #include "drv_config.h" #ifdef SYSTEM_DANUBE /* defined in drv_mps_vmmc_config.h */ -@@ -36,9 +37,22 @@ +@@ -32,9 +33,16 @@ #include "ifxos_select.h" #include "ifxos_interrupt.h" -#include -#include -#include -+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28)) -+# include -+# include -+# include -+# include ++#include ++#include ++#include ++#include + + +#define LQ_RCU_BASE_ADDR (KSEG1 + 0x1F203000) -+# define LQ_RCU_RST ((u32 *)(LQ_RCU_BASE_ADDR + 0x0010)) ++#define LQ_RCU_RST ((u32 *)(LQ_RCU_BASE_ADDR + 0x0010)) +#define IFX_RCU_RST_REQ_CPU1 (1 << 3) -+# define IFX_RCU_RST_REQ LQ_RCU_RST -+#else -+# include -+# include -+# include -+#endif ++#define IFX_RCU_RST_REQ LQ_RCU_RST #include "drv_mps_vmmc.h" #include "drv_mps_vmmc_dbg.h" -@@ -75,6 +89,20 @@ IFX_void_t ifx_mps_release (IFX_void_t); +@@ -71,6 +79,18 @@ IFX_void_t ifx_mps_release (IFX_void_t); /* Local function definition */ /* ============================= */ -+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28)) +IFX_uint32_t ifx_get_cp1_size(IFX_void_t) +{ + return 1; @@ -465,12 +430,11 @@ +{ + return ltq_get_cp1_base(); +} -+#endif + /****************************************************************************** * DANUBE Specific Routines ******************************************************************************/ -@@ -134,6 +162,15 @@ IFX_int32_t ifx_mps_download_firmware (m +@@ -130,6 +150,15 @@ IFX_int32_t ifx_mps_download_firmware (m } /* check if FW image fits in available memory space */ @@ -486,7 +450,7 @@ if (mem > ifx_get_cp1_size()) { TRACE (MPS, DBG_LEVEL_HIGH, -@@ -141,6 +178,7 @@ IFX_int32_t ifx_mps_download_firmware (m +@@ -137,6 +166,7 @@ IFX_int32_t ifx_mps_download_firmware (m __FILE__, __func__, __LINE__, mem, ifx_get_cp1_size())); return IFX_ERROR; } @@ -494,7 +458,7 @@ /* reset the driver */ ifx_mps_reset (); -@@ -361,7 +399,7 @@ IFX_void_t ifx_mps_release (IFX_void_t) +@@ -357,7 +387,7 @@ IFX_void_t ifx_mps_release (IFX_void_t) */ IFX_void_t ifx_mps_wdog_expiry() { @@ -505,17 +469,16 @@ /* recalculate and compare the firmware checksum */ --- a/src/mps/drv_mps_vmmc_device.h +++ b/src/mps/drv_mps_vmmc_device.h -@@ -16,8 +16,58 @@ +@@ -16,8 +16,53 @@ declarations. *******************************************************************************/ -#include -#include -+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28)) -+# include -+# include -+# include -+# include ++#include ++#include ++#include ++#include +#define IFXMIPS_MPS_SRAM ((u32 *)(KSEG1 + 0x1F200000)) +#define IFXMIPS_MPS_BASE_ADDR (KSEG1 + 0x1F107000) +#define IFXMIPS_MPS_CHIPID ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0344)) @@ -540,10 +503,6 @@ +#define IFXMIPS_MPS_CHIPID_PARTNUM_SET(value) ((((1 << 16) - 1) & (value)) << 12) +#define IFXMIPS_MPS_CHIPID_MANID_GET(value) (((value) >> 1) & ((1 << 10) - 1)) +#define IFXMIPS_MPS_CHIPID_MANID_SET(value) ((((1 << 10) - 1) & (value)) << 1) -+#else -+# include -+# include -+#endif +/* MPS register */ +# define IFX_MPS_AD0ENR IFXMIPS_MPS_AD0ENR +# define IFX_MPS_AD1ENR IFXMIPS_MPS_AD1ENR @@ -566,7 +525,7 @@ /* ============================= */ /* MPS Common defines */ -@@ -26,32 +76,28 @@ +@@ -26,32 +71,28 @@ #define MPS_BASEADDRESS 0xBF107000 #define MPS_RAD0SR MPS_BASEADDRESS + 0x0004 @@ -604,7 +563,7 @@ /*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/ -@@ -142,53 +188,9 @@ +@@ -142,53 +183,9 @@ #if defined(SYSTEM_AR9) || defined(SYSTEM_VR9) /* ***** Amazon-S specific defines ***** */ #define IFX_MPS_Base AMAZON_S_MPS @@ -660,7 +619,7 @@ { --- a/src/mps/drv_mps_vmmc_linux.c +++ b/src/mps/drv_mps_vmmc_linux.c -@@ -57,10 +57,11 @@ +@@ -42,10 +42,11 @@ #include #endif /* */ @@ -673,7 +632,7 @@ /* lib_ifxos headers */ #include "ifx_types.h" -@@ -959,7 +960,7 @@ long ifx_mps_ioctl (struct file *file_p, +@@ -918,7 +919,7 @@ long ifx_mps_ioctl (struct file *file_p, #endif /* MPS_FIFO_BLOCKING_WRITE */ case FIO_MPS_GET_STATUS: { @@ -682,7 +641,7 @@ /* get the status of the channel */ if (!from_kernel) -@@ -993,7 +994,7 @@ long ifx_mps_ioctl (struct file *file_p, +@@ -952,7 +953,7 @@ long ifx_mps_ioctl (struct file *file_p, #if CONFIG_MPS_HISTORY_SIZE > 0 case FIO_MPS_GET_CMD_HISTORY: { @@ -691,7 +650,7 @@ if (from_kernel) { -@@ -1685,6 +1686,7 @@ IFX_int32_t ifx_mps_get_status_proc (IFX +@@ -1644,6 +1645,7 @@ IFX_int32_t ifx_mps_get_status_proc (IFX sprintf (buf + len, " minLv: \t %8d\n", ifx_mps_dev.voice_mb[i].upstrm_fifo->min_space); } @@ -699,7 +658,7 @@ return len; } -@@ -2291,9 +2293,11 @@ IFX_int32_t __init ifx_mps_init_module ( +@@ -2250,9 +2252,11 @@ IFX_int32_t __init ifx_mps_init_module ( return result; } @@ -712,7 +671,7 @@ /* enable mailbox interrupts */ ifx_mps_enable_mailbox_int (); /* init FW ready event */ -@@ -2421,9 +2425,11 @@ ifx_mps_cleanup_module (IFX_void_t) +@@ -2380,9 +2384,11 @@ ifx_mps_cleanup_module (IFX_void_t) /* disable mailbox interrupts */ ifx_mps_disable_mailbox_int (); diff --git a/package/kernel/lantiq/ltq-vmmc/patches/200-compat.patch b/package/kernel/lantiq/ltq-vmmc/patches/200-compat.patch index dd6451b52d7..b3ba5c22514 100644 --- a/package/kernel/lantiq/ltq-vmmc/patches/200-compat.patch +++ b/package/kernel/lantiq/ltq-vmmc/patches/200-compat.patch @@ -1,6 +1,6 @@ --- a/src/drv_vmmc_linux.c +++ b/src/drv_vmmc_linux.c -@@ -54,6 +54,8 @@ +@@ -49,6 +49,8 @@ #include "drv_vmmc_res.h" #endif /* (VMMC_CFG_FEATURES & VMMC_FEAT_HDLC) */ @@ -9,19 +9,17 @@ /* ============================= */ /* Local Macros & Definitions */ /* ============================= */ -@@ -862,7 +864,9 @@ void vmmc_module_exit(void) +@@ -857,7 +859,6 @@ void vmmc_module_exit(void) #ifdef MODULE MODULE_DESCRIPTION("VMMC(VoiceMacroMipsCore) device driver - www.lantiq.com"); MODULE_AUTHOR("Lantiq Deutschland GmbH"); -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,11,0)) - MODULE_SUPPORTED_DEVICE("DANUBE, TWINPASS, INCA-IP2, AR9, VR9"); -+#endif +-MODULE_SUPPORTED_DEVICE("DANUBE, TWINPASS, INCA-IP2, AR9, VR9"); MODULE_LICENSE("Dual BSD/GPL"); #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17)) --- a/src/mps/drv_mps_vmmc_linux.c +++ b/src/mps/drv_mps_vmmc_linux.c -@@ -80,11 +80,15 @@ +@@ -65,11 +65,15 @@ /* ============================= */ #define IFX_MPS_DEV_NAME "ifx_mps" @@ -37,7 +35,7 @@ /* ============================= */ /* Global variable definition */ /* ============================= */ -@@ -2257,7 +2261,7 @@ IFX_int32_t __init ifx_mps_init_module ( +@@ -2216,7 +2220,7 @@ IFX_int32_t __init ifx_mps_init_module ( ifx_mps_reset (); result = request_irq (INT_NUM_IM4_IRL18, #ifdef LINUX_2_6 @@ -46,7 +44,7 @@ #else /* */ (irqreturn_t (*)(int, IFX_void_t *, struct pt_regs *)) ifx_mps_ad0_irq, SA_INTERRUPT -@@ -2267,7 +2271,7 @@ IFX_int32_t __init ifx_mps_init_module ( +@@ -2226,7 +2230,7 @@ IFX_int32_t __init ifx_mps_init_module ( return result; result = request_irq (INT_NUM_IM4_IRL19, #ifdef LINUX_2_6 @@ -55,7 +53,7 @@ #else /* */ (irqreturn_t (*)(int, IFX_void_t *, struct pt_regs *)) ifx_mps_ad1_irq, SA_INTERRUPT -@@ -2282,7 +2286,7 @@ IFX_int32_t __init ifx_mps_init_module ( +@@ -2241,7 +2245,7 @@ IFX_int32_t __init ifx_mps_init_module ( sprintf (&voice_channel_int_name[i][0], "mps_mbx vc%d", i); result = request_irq (INT_NUM_IM4_IRL14 + i, #ifdef LINUX_2_6 diff --git a/package/kernel/lantiq/ltq-vmmc/patches/400-falcon.patch b/package/kernel/lantiq/ltq-vmmc/patches/400-falcon.patch index efd3f853ec7..19caae76647 100644 --- a/package/kernel/lantiq/ltq-vmmc/patches/400-falcon.patch +++ b/package/kernel/lantiq/ltq-vmmc/patches/400-falcon.patch @@ -154,7 +154,7 @@ #define IFX_MPS_PLATFORM_NAME "MIPS24KEc" --- a/src/mps/drv_mps_vmmc_linux.c +++ b/src/mps/drv_mps_vmmc_linux.c -@@ -2229,7 +2229,7 @@ IFX_int32_t __init ifx_mps_init_module ( +@@ -2188,7 +2188,7 @@ IFX_int32_t __init ifx_mps_init_module ( #if defined(CONFIG_MIPS) && !defined(CONFIG_MIPS_UNCACHED) #if defined(SYSTEM_DANUBE) bDoCacheOps = IFX_TRUE; /* on Danube always perform cache ops */ @@ -163,7 +163,7 @@ /* on AR9/VR9 cache is configured by BSP; here we check whether the D-cache is shared or partitioned; 1) in case of shared D-cache all cache operations are omitted; -@@ -2259,7 +2259,8 @@ IFX_int32_t __init ifx_mps_init_module ( +@@ -2218,7 +2218,8 @@ IFX_int32_t __init ifx_mps_init_module ( /* reset the device before initializing the device driver */ ifx_mps_reset (); @@ -173,7 +173,7 @@ #ifdef LINUX_2_6 ifx_mps_ad0_irq, 0x0 #else /* */ -@@ -2400,7 +2401,7 @@ IFX_int32_t __init ifx_mps_init_module ( +@@ -2359,7 +2360,7 @@ IFX_int32_t __init ifx_mps_init_module ( if (result = ifx_mps_init_gpt_danube ()) return result; #endif /*DANUBE*/ @@ -583,18 +583,18 @@ +#endif /* SYSTEM_FALCON */ --- a/src/mps/drv_mps_vmmc_common.c +++ b/src/mps/drv_mps_vmmc_common.c -@@ -66,6 +66,10 @@ static void inline bsp_mask_and_ack_irq( - # include - # include - #endif +@@ -108,6 +108,10 @@ extern IFX_uint32_t danube_get_cpu_ver ( + extern mps_mbx_dev *ifx_mps_get_device (mps_devices type); + + #ifdef LINUX_2_6 +#if defined(SYSTEM_FALCON) +#include +#include +#endif - #include "drv_mps_vmmc.h" - #include "drv_mps_vmmc_dbg.h" -@@ -1156,7 +1160,12 @@ IFX_uint32_t ifx_mps_init_structures (mp + #else /* */ + extern IFX_void_t mask_and_ack_danube_irq (IFX_uint32_t irq_nr); +@@ -1140,7 +1144,12 @@ IFX_uint32_t ifx_mps_init_structures (mp mailbox, * upstream and downstream direction. */ memset ( /* avoid to overwrite CPU boot registers */ @@ -607,7 +607,7 @@ 0, sizeof (mps_mbx_reg) - 2 * sizeof (mps_boot_cfg_reg)); MBX_Memory->MBX_UPSTR_CMD_BASE = -@@ -2651,7 +2660,6 @@ IFX_void_t ifx_mps_enable_mailbox_int () +@@ -2635,7 +2644,6 @@ IFX_void_t ifx_mps_enable_mailbox_int () #endif *IFX_MPS_AD0ENR = Ad0Reg.val; @@ -615,7 +615,7 @@ } /** -@@ -2669,6 +2677,7 @@ IFX_void_t ifx_mps_disable_mailbox_int ( +@@ -2653,6 +2661,7 @@ IFX_void_t ifx_mps_disable_mailbox_int ( Ad0Reg.fld.cu_mbx = 0; Ad0Reg.fld.du_mbx = 0; *IFX_MPS_AD0ENR = Ad0Reg.val; @@ -623,7 +623,7 @@ } /** -@@ -2766,11 +2775,13 @@ irqreturn_t ifx_mps_ad0_irq (IFX_int32_t +@@ -2750,11 +2759,13 @@ irqreturn_t ifx_mps_ad0_irq (IFX_int32_t /* handle only enabled interrupts */ MPS_Ad0StatusReg.val &= *IFX_MPS_AD0ENR; @@ -637,7 +637,7 @@ /* FW is up and ready to process commands */ if (MPS_Ad0StatusReg.fld.dl_end) { -@@ -2919,11 +2930,13 @@ irqreturn_t ifx_mps_ad1_irq (IFX_int32_t +@@ -2903,11 +2914,13 @@ irqreturn_t ifx_mps_ad1_irq (IFX_int32_t /* handle only enabled interrupts */ MPS_Ad1StatusReg.val &= *IFX_MPS_AD1ENR; @@ -651,7 +651,7 @@ pMPSDev->event.MPS_Ad1Reg.val = MPS_Ad1StatusReg.val; /* use callback function or queue wake up to notify about data reception */ -@@ -2977,11 +2990,13 @@ irqreturn_t ifx_mps_vc_irq (IFX_int32_t +@@ -2961,11 +2974,13 @@ irqreturn_t ifx_mps_vc_irq (IFX_int32_t IFX_MPS_CVC0SR[chan] = MPS_VCStatusReg.val; /* handle only enabled interrupts */ MPS_VCStatusReg.val &= IFX_MPS_VC0ENR[chan]; @@ -665,7 +665,7 @@ pMPSDev->event.MPS_VCStatReg[chan].val = MPS_VCStatusReg.val; #ifdef PRINT_ON_ERR_INTERRUPT -@@ -3126,6 +3141,7 @@ IFX_int32_t ifx_mps_get_fw_version (IFX_ +@@ -3110,6 +3125,7 @@ IFX_int32_t ifx_mps_get_fw_version (IFX_ */ IFX_return_t ifx_mps_init_gpt () { @@ -673,7 +673,7 @@ unsigned long flags; IFX_uint32_t timer_flags, timer, loops = 0; IFX_ulong_t count; -@@ -3134,7 +3150,11 @@ IFX_return_t ifx_mps_init_gpt () +@@ -3118,7 +3134,11 @@ IFX_return_t ifx_mps_init_gpt () #else /* Danube */ timer = TIMER1B; #endif /* SYSTEM_AR9 || SYSTEM_VR9 */ @@ -685,7 +685,7 @@ /* calibration loop - required to syncronize GPTC interrupt with falling edge of FSC clock */ timer_flags = -@@ -3179,7 +3199,7 @@ Probably already in use.\r\n", __FILE__, +@@ -3163,7 +3183,7 @@ Probably already in use.\r\n", __FILE__, #endif /* DEBUG */ IFXOS_UNLOCKINT (flags); @@ -694,7 +694,7 @@ return IFX_SUCCESS; } -@@ -3194,6 +3214,9 @@ Probably already in use.\r\n", __FILE__, +@@ -3178,6 +3198,9 @@ Probably already in use.\r\n", __FILE__, */ IFX_void_t ifx_mps_shutdown_gpt (IFX_void_t) { @@ -704,7 +704,7 @@ IFX_uint32_t timer; #if defined(SYSTEM_AR9) || defined(SYSTEM_VR9) timer = TIMER1A; -@@ -3202,6 +3225,7 @@ IFX_void_t ifx_mps_shutdown_gpt (IFX_voi +@@ -3186,6 +3209,7 @@ IFX_void_t ifx_mps_shutdown_gpt (IFX_voi #endif /* SYSTEM_AR9 || SYSTEM_VR9 */ ifx_gptu_timer_free (timer); @@ -714,9 +714,9 @@ /** --- a/src/mps/drv_mps_vmmc_device.h +++ b/src/mps/drv_mps_vmmc_device.h -@@ -22,7 +22,12 @@ - # include - # include +@@ -21,7 +21,12 @@ + #include + #include #define IFXMIPS_MPS_SRAM ((u32 *)(KSEG1 + 0x1F200000)) +#if defined(SYSTEM_FALCON) +#define IFXMIPS_MPS_BASE_ADDR (KSEG1 + 0x1D004000) @@ -727,7 +727,7 @@ #define IFXMIPS_MPS_CHIPID ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0344)) #define IFXMIPS_MPS_VC0ENR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0000)) #define IFXMIPS_MPS_RVC0SR ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0010)) -@@ -73,10 +78,11 @@ +@@ -68,10 +73,11 @@ /* MPS Common defines */ /* ============================= */ @@ -742,7 +742,7 @@ #define VCPU_BASEADDRESS 0xBF208000 /* 0xBF108000 */ /*---------------------------------------------------------------------------*/ #if !defined(CONFIG_LANTIQ) -@@ -118,7 +124,6 @@ +@@ -113,7 +119,6 @@ /*---------------------------------------------------------------------------*/ #ifdef CONFIG_MPS_EVENT_MBX @@ -750,7 +750,7 @@ #define MBX_CMD_FIFO_SIZE 64 /**< Size of command FIFO in bytes */ #define MBX_DATA_UPSTRM_FIFO_SIZE 64 #define MBX_DATA_DNSTRM_FIFO_SIZE 128 -@@ -294,6 +299,10 @@ typedef struct +@@ -289,6 +294,10 @@ typedef struct #ifdef CONFIG_MPS_EVENT_MBX typedef struct { @@ -761,7 +761,7 @@ volatile IFX_uint32_t *MBX_UPSTR_CMD_BASE; /**< Upstream Command FIFO Base Address */ volatile IFX_uint32_t MBX_UPSTR_CMD_SIZE; /**< Upstream Command FIFO size in byte */ volatile IFX_uint32_t *MBX_DNSTR_CMD_BASE; /**< Downstream Command FIFO Base Address */ -@@ -317,13 +326,19 @@ typedef struct +@@ -312,13 +321,19 @@ typedef struct volatile IFX_uint32_t MBX_UPSTR_EVENT_WRITE; /**< Upstream Event FIFO Write Index */ volatile IFX_uint32_t MBX_EVENT[MBX_EVENT_DATA_WORDS]; volatile IFX_uint32_t reserved[4]; @@ -781,7 +781,7 @@ volatile IFX_uint32_t *MBX_UPSTR_CMD_BASE; /**< Upstream Command FIFO Base Address */ volatile IFX_uint32_t MBX_UPSTR_CMD_SIZE; /**< Upstream Command FIFO size in byte */ volatile IFX_uint32_t *MBX_DNSTR_CMD_BASE; /**< Downstream Command FIFO Base Address */ -@@ -341,8 +356,10 @@ typedef struct +@@ -336,8 +351,10 @@ typedef struct volatile IFX_uint32_t MBX_DNSTR_DATA_READ; /**< Downstream Data FIFO Read Index */ volatile IFX_uint32_t MBX_DNSTR_DATA_WRITE; /**< Downstream Data FIFO Write Index */ volatile IFX_uint32_t MBX_DATA[MBX_DATA_WORDS]; @@ -845,23 +845,7 @@ --- a/src/drv_vmmc_init.c +++ b/src/drv_vmmc_init.c -@@ -52,15 +52,6 @@ - #include "ifx_pmu.h" - #endif /* PMU_SUPPORTED */ - --#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28)) --# define IFX_MPS_CAD0SR IFXMIPS_MPS_CAD0SR --# define IFX_MPS_CAD1SR IFXMIPS_MPS_CAD1SR --# define IFX_MPS_CVC0SR IFXMIPS_MPS_CVC0SR --# define IFX_MPS_CVC1SR IFXMIPS_MPS_CVC1SR --# define IFX_MPS_CVC2SR IFXMIPS_MPS_CVC2SR --# define IFX_MPS_CVC3SR IFXMIPS_MPS_CVC3SR --#endif -- - /* ============================= */ - /* Local Macros & Definitions */ - /* ============================= */ -@@ -820,7 +811,7 @@ static IFX_int32_t VMMC_TAPI_LL_FW_Init( +@@ -807,7 +807,7 @@ static IFX_int32_t VMMC_TAPI_LL_FW_Init( MIN_FW_HOTFIXSTEP}; IFX_uint8_t tmp1, tmp2; IFX_TAPI_RESOURCE nResource; @@ -870,7 +854,7 @@ IFX_uint8_t nChannels, nFXOChannels; #endif /*SYSTEM_AR9 || SYSTEM_VR9*/ IFX_int32_t ret = VMMC_statusOk; -@@ -874,7 +865,7 @@ static IFX_int32_t VMMC_TAPI_LL_FW_Init( +@@ -861,7 +861,7 @@ static IFX_int32_t VMMC_TAPI_LL_FW_Init( pDev->bSmartSlic = IFX_FALSE; pDev->bSlicSupportsIdleMode = IFX_FALSE; diff --git a/package/kernel/lantiq/ltq-vmmc/patches/602-fix-compilation-warning-int-conversion.patch b/package/kernel/lantiq/ltq-vmmc/patches/602-fix-compilation-warning-int-conversion.patch index f95407b3956..741a946c314 100644 --- a/package/kernel/lantiq/ltq-vmmc/patches/602-fix-compilation-warning-int-conversion.patch +++ b/package/kernel/lantiq/ltq-vmmc/patches/602-fix-compilation-warning-int-conversion.patch @@ -1,6 +1,6 @@ --- a/src/mps/drv_mps_vmmc_common.c +++ b/src/mps/drv_mps_vmmc_common.c -@@ -117,8 +117,8 @@ IFX_void_t ifx_mps_mbx_event_upstream (I +@@ -100,8 +100,8 @@ IFX_void_t ifx_mps_mbx_event_upstream (I #endif /* CONFIG_MPS_EVENT_MBX */ IFX_void_t *ifx_mps_fastbuf_malloc (IFX_size_t size, IFX_int32_t priority); IFX_void_t ifx_mps_fastbuf_free (const IFX_void_t * ptr); @@ -13,7 +13,7 @@ extern IFX_uint32_t danube_get_cpu_ver (IFX_void_t); --- a/src/mps/drv_mps_vmmc_device.h +++ b/src/mps/drv_mps_vmmc_device.h -@@ -216,8 +216,8 @@ typedef struct /**< mps buffer monitorin +@@ -211,8 +211,8 @@ typedef struct /**< mps buffer monitorin mps_buffer_state_e buf_state; IFX_void_t *(*malloc) (IFX_size_t size, IFX_int32_t priority); /**< Buffer alloc function (def. kmalloc) */ IFX_void_t (*free) (const IFX_void_t *ptr); /**< Buffer free function (def. kfree) */ diff --git a/package/kernel/lantiq/ltq-vmmc/patches/603-fix-signature.patch b/package/kernel/lantiq/ltq-vmmc/patches/603-fix-signature.patch index b99255692bd..dfcf6606a4e 100644 --- a/package/kernel/lantiq/ltq-vmmc/patches/603-fix-signature.patch +++ b/package/kernel/lantiq/ltq-vmmc/patches/603-fix-signature.patch @@ -1,6 +1,6 @@ --- a/src/drv_vmmc_init.c +++ b/src/drv_vmmc_init.c -@@ -202,11 +202,20 @@ IFX_int32_t VMMC_GetDevice (IFX_uint16_t +@@ -203,11 +203,20 @@ IFX_int32_t VMMC_GetDevice (IFX_uint16_t /** Wrapper for the voice buffer get function that sets the FW as owner. */ @@ -22,7 +22,7 @@ /** Wrapper for the voice buffer free all function freeing all buffers that -@@ -263,10 +272,8 @@ IFX_int32_t VMMC_ChipAccessInit(VMMC_DEV +@@ -264,10 +273,8 @@ IFX_int32_t VMMC_ChipAccessInit(VMMC_DEV /* Register the buffer handler. */ #ifdef USE_BUFFERPOOL diff --git a/package/kernel/lantiq/ltq-vmmc/patches/605-get-irqs-from-kernel-in-tree-vmmc-driver.patch b/package/kernel/lantiq/ltq-vmmc/patches/605-get-irqs-from-kernel-in-tree-vmmc-driver.patch index 0ebaef3b9d6..ddd4a58a249 100644 --- a/package/kernel/lantiq/ltq-vmmc/patches/605-get-irqs-from-kernel-in-tree-vmmc-driver.patch +++ b/package/kernel/lantiq/ltq-vmmc/patches/605-get-irqs-from-kernel-in-tree-vmmc-driver.patch @@ -1,6 +1,6 @@ --- a/src/mps/drv_mps_vmmc_linux.c +++ b/src/mps/drv_mps_vmmc_linux.c -@@ -104,6 +104,10 @@ extern irqreturn_t ifx_mps_vc_irq (IFX_i +@@ -89,6 +89,10 @@ extern irqreturn_t ifx_mps_vc_irq (IFX_i extern IFX_void_t ifx_mps_shutdown (IFX_void_t); extern IFX_int32_t ifx_mps_event_activation_poll (mps_devices type, MbxEventRegs_s * act); @@ -11,7 +11,7 @@ mps_mbx_dev *ifx_mps_get_device (mps_devices type); #ifdef CONFIG_PROC_FS -@@ -2260,7 +2264,7 @@ IFX_int32_t __init ifx_mps_init_module ( +@@ -2219,7 +2223,7 @@ IFX_int32_t __init ifx_mps_init_module ( /* reset the device before initializing the device driver */ ifx_mps_reset (); @@ -20,7 +20,7 @@ #ifdef LINUX_2_6 ifx_mps_ad0_irq, 0x0 #else /* */ -@@ -2270,7 +2274,7 @@ IFX_int32_t __init ifx_mps_init_module ( +@@ -2229,7 +2233,7 @@ IFX_int32_t __init ifx_mps_init_module ( , "mps_mbx ad0", &ifx_mps_dev); if (result) return result; @@ -29,7 +29,7 @@ #ifdef LINUX_2_6 ifx_mps_ad1_irq, 0x0 #else /* */ -@@ -2285,7 +2289,7 @@ IFX_int32_t __init ifx_mps_init_module ( +@@ -2244,7 +2248,7 @@ IFX_int32_t __init ifx_mps_init_module ( for (i = 0; i < 4; ++i) { sprintf (&voice_channel_int_name[i][0], "mps_mbx vc%d", i); @@ -38,7 +38,7 @@ #ifdef LINUX_2_6 ifx_mps_vc_irq, 0x0 #else /* */ -@@ -2446,13 +2450,13 @@ ifx_mps_cleanup_module (IFX_void_t) +@@ -2405,13 +2409,13 @@ ifx_mps_cleanup_module (IFX_void_t) ifx_mps_release_structures (&ifx_mps_dev); /* release all interrupts at the system */ @@ -57,7 +57,7 @@ #if CONFIG_MPS_HISTORY_SIZE > 0 --- a/src/mps/drv_mps_vmmc_common.c +++ b/src/mps/drv_mps_vmmc_common.c -@@ -134,6 +134,8 @@ extern IFX_void_t mask_and_ack_danube_ir +@@ -118,6 +118,8 @@ extern IFX_void_t mask_and_ack_danube_ir #endif /* */ @@ -66,7 +66,7 @@ extern void sys_hw_setup (void); extern IFXOS_event_t fw_ready_evt; -@@ -2979,7 +2981,7 @@ irqreturn_t ifx_mps_ad1_irq (IFX_int32_t +@@ -2963,7 +2965,7 @@ irqreturn_t ifx_mps_ad1_irq (IFX_int32_t */ irqreturn_t ifx_mps_vc_irq (IFX_int32_t irq, mps_comm_dev * pDev) { @@ -77,7 +77,7 @@ MbxEventRegs_s events; --- a/src/mps/drv_mps_vmmc_device.h +++ b/src/mps/drv_mps_vmmc_device.h -@@ -69,9 +69,6 @@ +@@ -64,9 +64,6 @@ # define IFX_MPS_CVC3SR IFXMIPS_MPS_CVC3SR # define IFX_MPS_SAD0SR IFXMIPS_MPS_SAD0SR /* interrupt vectors */ diff --git a/package/kernel/lantiq/ltq-vmmc/patches/606-fix-version-macro-definition-conflicts-on-6.12-kerne.patch b/package/kernel/lantiq/ltq-vmmc/patches/606-fix-version-macro-definition-conflicts-on-6.12-kerne.patch index f6ab6792ec7..a0641c15f24 100644 --- a/package/kernel/lantiq/ltq-vmmc/patches/606-fix-version-macro-definition-conflicts-on-6.12-kerne.patch +++ b/package/kernel/lantiq/ltq-vmmc/patches/606-fix-version-macro-definition-conflicts-on-6.12-kerne.patch @@ -32,7 +32,7 @@ Signed-off-by: Shiji Yang --- a/src/drv_vmmc_init.c +++ b/src/drv_vmmc_init.c -@@ -88,7 +88,7 @@ CREATE_TRACE_GROUP(VMMC); +@@ -89,7 +89,7 @@ CREATE_TRACE_GROUP(VMMC); /** what compatible driver version */ #define DRV_VMMC_WHAT_STR "@(#)Lantiq VMMC device driver, version " DRV_VMMC_VER_STR @@ -41,7 +41,7 @@ Signed-off-by: Shiji Yang #define MPS_CH_VALID(mpsCh) ((mpsCh >= 1 && mpsCh <= 7) ? 1 : 0) -@@ -927,17 +927,17 @@ static IFX_int32_t VMMC_TAPI_LL_FW_Init( +@@ -923,17 +923,17 @@ static IFX_int32_t VMMC_TAPI_LL_FW_Init( /* Maximum number of resources, is the maximum of: nALI, nPCM, nCOD, nSIG, nDECT, nLIN and nAudioCnt. */ @@ -65,7 +65,7 @@ Signed-off-by: Shiji Yang #endif /* (VMMC_CFG_FEATURES & VMMC_FEAT_AUDIO) */ if (pDev->caps.nMaxRes > VMMC_MAX_CH_NR) -@@ -977,7 +977,7 @@ static IFX_int32_t VMMC_TAPI_LL_FW_Init( +@@ -973,7 +973,7 @@ static IFX_int32_t VMMC_TAPI_LL_FW_Init( nResource.DTMFRCount = pDev->caps.nDTMFD; nResource.FSKGCount = pDev->caps.nCIDS; nResource.FSKRCount = pDev->caps.nCIDR; @@ -76,7 +76,7 @@ Signed-off-by: Shiji Yang --- a/src/drv_vmmc_init_cap.c +++ b/src/drv_vmmc_init_cap.c -@@ -39,7 +39,7 @@ +@@ -37,7 +37,7 @@ /* ============================= */ /* Local Macros & Definitions */ /* ============================= */ @@ -85,7 +85,7 @@ Signed-off-by: Shiji Yang /* ============================= */ /* Local function declaration */ -@@ -392,7 +392,7 @@ IFX_return_t VMMC_Get_FwCap(VMMC_DEVICE +@@ -390,7 +390,7 @@ IFX_return_t VMMC_Get_FwCap(VMMC_DEVICE /* Read the maximum length of the message that we can interpret but not more than the firmware can provide. */ /* BLEN is the length including the header that the fw reports. */ @@ -94,7 +94,7 @@ Signed-off-by: Shiji Yang /* Subtract the length of the header. */ capCmd.LENGTH -= CMD_HDR_CNT; /* Read capability once more - this time with maximum length. */ -@@ -479,7 +479,7 @@ IFX_return_t VMMC_Get_FwCap(VMMC_DEVICE +@@ -477,7 +477,7 @@ IFX_return_t VMMC_Get_FwCap(VMMC_DEVICE pDev->caps.FEAT = capCmd.FEAT; /* Number of UTG resources per channel (== SIG module), either 1 or 2 */ pDev->caps.nUtgPerCh = (capCmd.FEAT & EDSP_CAP_FEAT_UTGUD) ? 2 : 1; diff --git a/package/kernel/lantiq/ltq-vmmc/patches/608-fix-inline-is-not-at-beginning-of-declaration.patch b/package/kernel/lantiq/ltq-vmmc/patches/608-fix-inline-is-not-at-beginning-of-declaration.patch deleted file mode 100644 index 44443601828..00000000000 --- a/package/kernel/lantiq/ltq-vmmc/patches/608-fix-inline-is-not-at-beginning-of-declaration.patch +++ /dev/null @@ -1,26 +0,0 @@ -From: Shiji Yang -Date: Fri, 9 May 2025 01:43:41 +0800 -Subject: [PATCH] fix 'inline' is not at beginning of declaration - -Fix build warning on 6.12 kernel: - -/home/db/owrt/build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/drv_vmmc-1.9.0/src/mps/drv_mps_vmmc_common.c:58:1: error: 'inline' is not at beginning of declaration [-Werror=old-style-declaration] - 58 | static void inline bsp_mask_and_ack_irq(int x) - | ^~~~~~ - -Signed-off-by: Shiji Yang ---- - src/mps/drv_mps_vmmc_common.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/src/mps/drv_mps_vmmc_common.c -+++ b/src/mps/drv_mps_vmmc_common.c -@@ -55,7 +55,7 @@ - # define bsp_mask_and_ack_irq ltq_mask_and_ack_irq - #else - extern void ltq_mask_and_ack_irq(struct irq_data *d); --static void inline bsp_mask_and_ack_irq(int x) -+static inline void bsp_mask_and_ack_irq(int x) - { - struct irq_data d; - d.hwirq = x; diff --git a/package/kernel/lantiq/vrx518_ep/patches/100-compat.patch b/package/kernel/lantiq/vrx518_ep/patches/100-compat.patch index 3457779776d..3772cf9ac6b 100644 --- a/package/kernel/lantiq/vrx518_ep/patches/100-compat.patch +++ b/package/kernel/lantiq/vrx518_ep/patches/100-compat.patch @@ -39,22 +39,18 @@ break; } -@@ -466,8 +467,12 @@ static int dc_ep_msi_enable(struct pci_d +@@ -466,8 +467,8 @@ static int dc_ep_msi_enable(struct pci_d return -EIO; } - err = pci_enable_msi_exact(pdev, nvec); - if (err) { -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0)) -+ err = pci_alloc_irq_vectors(pdev, nvec, nvec, PCI_IRQ_MSI | PCI_IRQ_LEGACY); -+#else + err = pci_alloc_irq_vectors(pdev, nvec, nvec, PCI_IRQ_MSI | PCI_IRQ_INTX); -+#endif + if (err < 0) { dev_err(&pdev->dev, "%s: Failed to enable MSI interrupts error code: %d\n", __func__, err); -@@ -589,15 +594,15 @@ static int dc_ep_probe(struct pci_dev *p +@@ -589,15 +590,15 @@ static int dc_ep_probe(struct pci_dev *p /* Target structures have a limit of 32 bit DMA pointers. * DMA pointers can be wider than 32 bits by default on some systems. */ @@ -73,7 +69,7 @@ goto err_region; } -@@ -654,7 +659,7 @@ static int dc_ep_probe(struct pci_dev *p +@@ -654,7 +655,7 @@ static int dc_ep_probe(struct pci_dev *p goto err_iomap; spin_lock(&dc_ep_lock); @@ -82,7 +78,7 @@ spin_unlock(&dc_ep_lock); #ifndef CONFIG_OF -@@ -715,7 +720,7 @@ static void dc_ep_remove(struct pci_dev +@@ -715,7 +716,7 @@ static void dc_ep_remove(struct pci_dev dc_ep_icu_disable(priv); pci_iounmap(pdev, priv->mem); pci_release_region(pdev, DC_EP_BAR_NUM); diff --git a/package/kernel/lantiq/vrx518_ep/src/test/ep_test.c b/package/kernel/lantiq/vrx518_ep/src/test/ep_test.c index ab6139b73ee..9efbbac80b5 100644 --- a/package/kernel/lantiq/vrx518_ep/src/test/ep_test.c +++ b/package/kernel/lantiq/vrx518_ep/src/test/ep_test.c @@ -24,7 +24,6 @@ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #include #include -#include #include #include #include diff --git a/package/kernel/lantiq/vrx518_tc/patches/100-compat.patch b/package/kernel/lantiq/vrx518_tc/patches/100-compat.patch index 81e32369bae..5e2ee71c4ae 100644 --- a/package/kernel/lantiq/vrx518_tc/patches/100-compat.patch +++ b/package/kernel/lantiq/vrx518_tc/patches/100-compat.patch @@ -1,18 +1,16 @@ --- a/dcdp/atm_tc.c +++ b/dcdp/atm_tc.c -@@ -44,9 +44,9 @@ +@@ -44,9 +44,7 @@ #include #include #include "inc/dsl_tc.h" -#include -+// #include #include -#include -+// #include #include #include #include -@@ -730,20 +730,16 @@ static void atm_aca_init(struct atm_priv +@@ -730,20 +728,16 @@ static void atm_aca_init(struct atm_priv ACA_TXOUT_EN | ACA_RXIN_EN | ACA_RXOUT_EN, 1); } @@ -35,7 +33,7 @@ memset(tmbuf, 0, 64); snprintf(tmbuf, sizeof(tmbuf), "%ld-%d-%d %d:%d:%d", -@@ -753,7 +749,7 @@ static int print_datetime(char *buffer, +@@ -753,7 +747,7 @@ static int print_datetime(char *buffer, nowtm.tm_hour, nowtm.tm_min, nowtm.tm_sec); @@ -44,7 +42,7 @@ return 0; } -@@ -1313,7 +1309,7 @@ static int ppe_send(struct atm_vcc *vcc, +@@ -1313,7 +1307,7 @@ static int ppe_send(struct atm_vcc *vcc, /* assume LLC header + Ethernet ID: 6+2 */ if ((priv->conn[conn].mpoa_type == MPOA_TYPE_EOA_WO_FCS) || (priv->conn[conn].mpoa_type == MPOA_TYPE_EOA_W_FCS)) { @@ -53,27 +51,24 @@ goto CHECK_SHOWTIME_FAIL; } -@@ -1418,7 +1414,7 @@ int ppe_send_oam(struct atm_vcc *vcc, vo +@@ -1418,7 +1412,6 @@ int ppe_send_oam(struct atm_vcc *vcc, vo struct atm_priv *priv = g_atm_tc; struct sk_buff *skb; unsigned int conn; - dp_subif_t dp_id; -+// dp_subif_t dp_id; #ifdef OAM_FIX_GRX750 unsigned char *dest_cell; #endif -@@ -1465,8 +1461,8 @@ int ppe_send_oam(struct atm_vcc *vcc, vo +@@ -1465,8 +1458,6 @@ int ppe_send_oam(struct atm_vcc *vcc, vo priv->tc_priv->param.oam_prio = 0; qid = priv->conn[conn].prio_queue_map[priv->tc_priv->param.oam_prio]; vid = priv->conn[conn].subif_id; - dp_id.subif = (vid & (~0x7f)) | - ATM_DESC_SUBIF_ID(qid, mpoa_pt, mpoa_type); -+// dp_id.subif = (vid & (~0x7f)) | -+// ATM_DESC_SUBIF_ID(qid, mpoa_pt, mpoa_type); #ifdef OAM_FIX_GRX750 dest_cell = kmalloc(CELL_SIZE, GFP_KERNEL); if (dest_cell == NULL) { -@@ -1494,18 +1490,18 @@ int ppe_send_oam(struct atm_vcc *vcc, vo +@@ -1494,18 +1485,8 @@ int ppe_send_oam(struct atm_vcc *vcc, vo #else memcpy(skb->data, cell, CELL_SIZE); #endif @@ -86,23 +81,13 @@ - if (priv->tc_priv->tc_ops.send(NULL, - skb, dp_id.subif, ATM_OAM_PKT) == 0) { - #else -+// /* SET SUBIFID */ -+// skb->DW0 = (skb->DW0 & ~0x7FFF) | dp_id.subif; -+// skb->dev = priv->conn[conn].dev; -+// tc_dbg(priv->tc_priv, MSG_TX, "conn: %d, dev name: %s, qid: 0x%x len:%d\n", -+// conn, skb->dev->name, dp_id.subif, skb->len); -+// #ifdef OAM_FIX_GRX750 -+// if (priv->tc_priv->tc_ops.send(NULL, -+// skb, dp_id.subif, ATM_OAM_PKT) == 0) { -+// #else if (priv->tc_priv->tc_ops.send(NULL, skb, qid, ATM_OAM_PKT) == 0) { - #endif -+// #endif priv->stats.oam_tx_pkts++; priv->stats.oam_tx_bytes += skb->len; priv->conn[conn].stats.oam_tx_pkts++; -@@ -1604,7 +1600,7 @@ static void oam_push(struct atm_priv *pr +@@ -1604,7 +1585,7 @@ static void oam_push(struct atm_priv *pr conn = -1; /* invalid */ if (conn_valid(conn) && priv->conn[conn].vcc != NULL) { vcc = priv->conn[conn].vcc; @@ -111,7 +96,7 @@ tc_dbg(priv->tc_priv, MSG_OAM_RX, "conn=%d, vpi: %d, vci:%d\n", conn, header->vpi, header->vci); -@@ -2547,30 +2543,29 @@ static void ppe_atm_fw_hw_init(struct at +@@ -2547,30 +2528,29 @@ static void ppe_atm_fw_hw_init(struct at static int atm_dev_init(struct atm_priv *atm_priv, int ep_id) { int i, err; @@ -160,7 +145,7 @@ } //TODO : check for SoC PMAC, current fix #ifdef CONFIG_SOC_TYPE_XWAY -@@ -2985,7 +2980,8 @@ static unsigned int atm_get_pvc_id(struc +@@ -2985,7 +2965,8 @@ static unsigned int atm_get_pvc_id(struc return -EINVAL; } @@ -170,7 +155,7 @@ } static int atm_get_qid_by_vcc(struct net_device *dev, struct sk_buff *skb, -@@ -3292,7 +3288,7 @@ static void atm_push(struct net_device * +@@ -3292,7 +3273,7 @@ static void atm_push(struct net_device * += skb->len; } else priv->stats.aal5_rx_errors++; @@ -179,6 +164,15 @@ spin_unlock_bh(&priv->atm_lock); vcc->push(vcc, skb); +@@ -3701,7 +3682,7 @@ int get_dslwan_qid_with_vcc(struct atm_v + + int get_atm_qid_with_pkt(struct sk_buff *skb, void *arg, int is_atm_vcc) + { +- return xway_atm_get_qid_by_vcc(skb, skb, arg, 1); ++ return xway_atm_get_qid_by_vcc(skb->dev, skb, arg, 1); + } + + int get_mpoa_type(uint32_t dslwan_qid, uint32_t *mpoa_type) --- a/dcdp/inc/atm_tc.h +++ b/dcdp/inc/atm_tc.h @@ -449,7 +449,7 @@ struct atm_port { @@ -243,17 +237,15 @@ #include "inc/tc_main.h" #include "inc/reg_addr.h" -@@ -62,6 +62,9 @@ +@@ -62,6 +62,7 @@ #include "inc/fw/vrx518_addr_def.h" #include "inc/fw/vrx518_ppe_fw.h" -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0)) +#define PDE_DATA pde_data -+#endif static struct ptm_priv *g_ptm_priv; static struct ptm_ep_priv g_ep_priv[BOND_MAX]; -@@ -84,6 +87,7 @@ static int ptm_erb_addr_get(const unsign +@@ -84,6 +85,7 @@ static int ptm_erb_addr_get(const unsign unsigned int *data_addr, unsigned int *desc_addr); @@ -261,7 +253,7 @@ static inline void tc_ether_addr_copy(u8 *dst, const u8 *src) { #if defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) -@@ -98,6 +102,7 @@ static inline void tc_ether_addr_copy(u8 +@@ -98,6 +100,7 @@ static inline void tc_ether_addr_copy(u8 a[2] = b[2]; #endif } @@ -269,7 +261,7 @@ static inline int is_ptm_sl(struct ptm_ep_priv *priv) { -@@ -182,8 +187,8 @@ static int ptm_get_qid(struct net_device +@@ -182,8 +185,8 @@ static int ptm_get_qid(struct net_device return qid; } @@ -280,7 +272,7 @@ { struct ptm_priv *ptm_tc = netdev_priv(dev); -@@ -191,8 +196,6 @@ static struct rtnl_link_stats64 *ptm_get +@@ -191,8 +194,6 @@ static struct rtnl_link_stats64 *ptm_get memcpy(storage, &ptm_tc->stats64, sizeof(ptm_tc->stats64)); else storage->tx_errors += ptm_tc->stats64.tx_errors; @@ -289,7 +281,7 @@ } static int ptm_set_mac_address(struct net_device *dev, void *p) -@@ -204,12 +207,16 @@ static int ptm_set_mac_address(struct ne +@@ -204,12 +205,16 @@ static int ptm_set_mac_address(struct ne return -EBUSY; tc_info(ptm_tc->tc_priv, MSG_EVENT, "ptm mac address update!\n"); @@ -307,7 +299,7 @@ { struct ptm_priv *ptm_tc = netdev_priv(dev); -@@ -503,7 +510,7 @@ static int ptm_xmit(struct sk_buff *skb, +@@ -503,7 +508,7 @@ static int ptm_xmit(struct sk_buff *skb, if (!showtime_stat(ptm_tc->tc_priv)) goto PTM_XMIT_DROP; @@ -316,7 +308,7 @@ goto PTM_XMIT_DROP; dump_skb_info(ptm_tc->tc_priv, skb, (MSG_TX | MSG_TXDATA)); -@@ -632,11 +639,8 @@ static int ptm_dev_init(struct tc_priv * +@@ -632,11 +637,8 @@ static int ptm_dev_init(struct tc_priv * struct ptm_priv *ptm_tc; const char macaddr[ETH_ALEN] = {0xAC, 0x9A, 0x96, 0x11, 0x22, 0x33}; @@ -330,7 +322,7 @@ if (!dev) { tc_dbg(tc_priv, MSG_INIT, "Cannot alloc net device\n"); return -ENOMEM; -@@ -644,7 +648,11 @@ static int ptm_dev_init(struct tc_priv * +@@ -644,7 +646,11 @@ static int ptm_dev_init(struct tc_priv * ptm_tc = netdev_priv(dev); ptm_tc->dev = dev; ptm_tc->tc_priv = tc_priv; @@ -342,7 +334,7 @@ spin_lock_init(&ptm_tc->ptm_lock); memcpy(ptm_tc->outq_map, def_outq_map, sizeof(def_outq_map)); SET_NETDEV_DEV(ptm_tc->dev, tc_priv->ep_dev[id].dev); -@@ -2103,7 +2111,6 @@ static int ptm_showtime_exit(const unsig +@@ -2103,7 +2109,6 @@ static int ptm_showtime_exit(const unsig struct ptm_ep_priv *priv = tc_ep_priv(idx); u32 stop = ACA_TXIN_EN; struct dc_ep_dev *ep; @@ -445,18 +437,16 @@ #include #include #include "inc/tc_main.h" -@@ -35,6 +37,10 @@ +@@ -35,6 +37,8 @@ #include "inc/platform.h" #include "inc/dsl_tc.h" -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0)) +#define PDE_DATA pde_data -+#endif + #define ATM_HEADER_SIZE (ATM_CELL_SIZE - ATM_CELL_PAYLOAD) static char *dbg_flag_str[] = { "rx", -@@ -353,7 +359,7 @@ static ssize_t mem_proc_write(struct fil +@@ -353,7 +357,7 @@ static ssize_t mem_proc_write(struct fil } addr = set_val = repeat_cnt = 0; @@ -465,7 +455,7 @@ return -EFAULT; len = count < sizeof(str) ? count : sizeof(str) - 1; -@@ -450,13 +456,12 @@ static int proc_read_mem_seq_open(struct +@@ -450,13 +454,12 @@ static int proc_read_mem_seq_open(struct return single_open(file, proc_read_mem, NULL); } @@ -485,7 +475,7 @@ }; static ssize_t pp32_proc_write(struct file *file, const char __user *buf, -@@ -748,13 +753,12 @@ static int proc_read_pp32_seq_open(struc +@@ -748,13 +751,12 @@ static int proc_read_pp32_seq_open(struc return single_open(file, proc_read_pp32, PDE_DATA(inode)); } @@ -505,7 +495,7 @@ }; static int proc_read_tc_cfg(struct seq_file *seq, void *v) -@@ -865,13 +869,12 @@ static int proc_read_tc_cfg_seq_open(str +@@ -865,13 +867,12 @@ static int proc_read_tc_cfg_seq_open(str return single_open(file, proc_read_tc_cfg, PDE_DATA(inode)); } @@ -525,7 +515,7 @@ }; static ssize_t proc_write_dbg(struct file *file, const char __user *buf, -@@ -951,13 +954,12 @@ static int proc_read_dbg_seq_open(struct +@@ -951,13 +952,12 @@ static int proc_read_dbg_seq_open(struct return single_open(file, proc_read_dbg, PDE_DATA(inode)); } @@ -545,7 +535,7 @@ }; static ssize_t proc_write_tc_switch(struct file *file, const char __user *buf, -@@ -1018,11 +1020,11 @@ proc_tc_switch_help: +@@ -1018,11 +1018,11 @@ proc_tc_switch_help: return count; } @@ -561,7 +551,7 @@ static ssize_t proc_write_show_time(struct file *file, const char __user *buf, size_t count, loff_t *data) { -@@ -1077,10 +1079,9 @@ proc_show_time_help: +@@ -1077,10 +1077,9 @@ proc_show_time_help: return count; } @@ -575,7 +565,7 @@ }; static int proc_read_ver(struct seq_file *seq, void *v) -@@ -1128,12 +1129,11 @@ static int proc_read_ver_seq_open(struct +@@ -1128,12 +1127,11 @@ static int proc_read_ver_seq_open(struct return single_open(file, proc_read_ver, PDE_DATA(inode)); } @@ -593,7 +583,7 @@ }; static int proc_read_soc(struct seq_file *seq, void *v) -@@ -1142,20 +1142,18 @@ static int proc_read_soc(struct seq_file +@@ -1142,20 +1140,18 @@ static int proc_read_soc(struct seq_file tcpriv = (struct tc_priv *)seq->private; @@ -622,7 +612,7 @@ return 0; } -@@ -1165,15 +1163,13 @@ static int proc_read_soc_seq_open(struct +@@ -1165,15 +1161,13 @@ static int proc_read_soc_seq_open(struct return single_open(file, proc_read_soc, PDE_DATA(inode)); } @@ -643,7 +633,7 @@ static struct tc_proc_list tc_procs[] = { {TC_PROC_DIR, 0, NULL, 1}, {"cfg", 0644, &tc_cfg_proc_fops, 0}, -@@ -1241,13 +1237,12 @@ static int proc_read_ptm_wanmib_seq_open +@@ -1241,13 +1235,12 @@ static int proc_read_ptm_wanmib_seq_open return single_open(file, proc_read_ptm_wanmib, PDE_DATA(inode)); } @@ -663,7 +653,7 @@ }; static int proc_ptm_read_cfg(struct seq_file *seq, void *v) -@@ -1300,7 +1295,7 @@ static ssize_t ptm_cfg_proc_write(struct +@@ -1300,7 +1293,7 @@ static ssize_t ptm_cfg_proc_write(struct return -EINVAL; } @@ -672,7 +662,7 @@ return -EFAULT; len = count < sizeof(str) ? count : sizeof(str) - 1; -@@ -1343,13 +1338,12 @@ proc_ptm_cfg_help: +@@ -1343,13 +1336,12 @@ proc_ptm_cfg_help: } @@ -692,7 +682,7 @@ }; static ssize_t proc_ptm_write_prio(struct file *file, const char __user *buf, -@@ -1455,13 +1449,12 @@ static int proc_ptm_read_prio_seq_open(s +@@ -1455,13 +1447,12 @@ static int proc_ptm_read_prio_seq_open(s return single_open(file, proc_ptm_read_prio, PDE_DATA(inode)); } @@ -712,7 +702,7 @@ }; static int proc_ptm_read_bond_seq_open(struct inode *inode, struct file *file) -@@ -1469,12 +1462,11 @@ static int proc_ptm_read_bond_seq_open(s +@@ -1469,12 +1460,11 @@ static int proc_ptm_read_bond_seq_open(s return single_open(file, proc_ptm_read_bond, PDE_DATA(inode)); } @@ -730,7 +720,7 @@ }; static int proc_ptm_read_bondmib_seq_open(struct inode *inode, -@@ -1483,13 +1475,12 @@ static int proc_ptm_read_bondmib_seq_ope +@@ -1483,13 +1473,12 @@ static int proc_ptm_read_bondmib_seq_ope return single_open(file, proc_ptm_read_bondmib, PDE_DATA(inode)); } @@ -750,7 +740,7 @@ }; struct fwdbg_t { -@@ -1910,14 +1901,14 @@ static int proc_read_fwdbg_seq_open(stru +@@ -1910,14 +1899,14 @@ static int proc_read_fwdbg_seq_open(stru { return single_open(file, proc_read_fwdbg, NULL); } @@ -772,7 +762,7 @@ static struct tc_proc_list ptm_sl_procs[] = { {TC_PROC_PTM_DIR, 0, NULL, 1}, {"mem", 0644, &mem_proc_fops, 0}, -@@ -2077,7 +2068,7 @@ static ssize_t atm_cfg_proc_write(struct +@@ -2077,7 +2066,7 @@ static ssize_t atm_cfg_proc_write(struct priv = (struct atm_priv *)PDE_DATA(file_inode(file)); @@ -781,7 +771,7 @@ return -EFAULT; len = count < sizeof(str) ? count : sizeof(str) - 1; -@@ -2119,13 +2110,12 @@ proc_atm_cfg_help: +@@ -2119,13 +2108,12 @@ proc_atm_cfg_help: return count; } @@ -801,7 +791,7 @@ }; static ssize_t proc_write_atm_wanmib(struct file *file, const char __user *buf, -@@ -2173,13 +2163,12 @@ static int proc_read_atm_wanmib_seq_open +@@ -2173,13 +2161,12 @@ static int proc_read_atm_wanmib_seq_open @@ -821,7 +811,7 @@ }; static int proc_read_htu_seq_open(struct inode *inode, struct file *file) -@@ -2187,12 +2176,11 @@ static int proc_read_htu_seq_open(struct +@@ -2187,12 +2174,11 @@ static int proc_read_htu_seq_open(struct return single_open(file, proc_read_htu, PDE_DATA(inode)); } @@ -839,7 +829,7 @@ }; static int proc_read_queue_seq_open(struct inode *inode, struct file *file) -@@ -2200,12 +2188,11 @@ static int proc_read_queue_seq_open(stru +@@ -2200,12 +2186,11 @@ static int proc_read_queue_seq_open(stru return single_open(file, proc_read_queue, PDE_DATA(inode)); } @@ -857,7 +847,7 @@ }; static void set_q_prio(struct atm_priv *priv, -@@ -2428,13 +2415,12 @@ static const struct seq_operations pvc_m +@@ -2428,13 +2413,12 @@ static const struct seq_operations pvc_m .show = pvc_mib_seq_show, }; @@ -877,7 +867,7 @@ }; static int proc_read_pvc_mib_seq_open(struct inode *inode, struct file *file) -@@ -2447,12 +2433,11 @@ static int proc_read_pvc_mib_seq_open(st +@@ -2447,12 +2431,11 @@ static int proc_read_pvc_mib_seq_open(st return ret; } @@ -895,7 +885,7 @@ }; static ssize_t proc_write_cell(struct file *file, -@@ -2592,13 +2577,12 @@ static int proc_read_cell_seq_open(struc +@@ -2592,13 +2575,12 @@ static int proc_read_cell_seq_open(struc return single_open(file, proc_read_cell, NULL); } diff --git a/package/kernel/lantiq/vrx518_tc/patches/101-dcdp-atm_tc-drop-extra-qos-classes.patch b/package/kernel/lantiq/vrx518_tc/patches/101-dcdp-atm_tc-drop-extra-qos-classes.patch index 5c7b2465453..51e9012d114 100644 --- a/package/kernel/lantiq/vrx518_tc/patches/101-dcdp-atm_tc-drop-extra-qos-classes.patch +++ b/package/kernel/lantiq/vrx518_tc/patches/101-dcdp-atm_tc-drop-extra-qos-classes.patch @@ -13,7 +13,7 @@ Signed-off-by: Sergey Ryazanov -- --- a/dcdp/atm_tc.c +++ b/dcdp/atm_tc.c -@@ -463,34 +463,9 @@ static void set_qsb(struct atm_priv *pri +@@ -461,34 +461,9 @@ static void set_qsb(struct atm_priv *pri /* Weighted Fair Queueing Factor (WFQF) */ switch (qos->txtp.traffic_class) { case ATM_CBR: @@ -48,7 +48,7 @@ Signed-off-by: Sergey Ryazanov case ATM_UBR: default: q_parm_tbl.bit.wfqf = QSB_WFQ_UBR_BYPASS; -@@ -498,42 +473,9 @@ static void set_qsb(struct atm_priv *pri +@@ -496,42 +471,9 @@ static void set_qsb(struct atm_priv *pri } /* Sustained Cell Rate (SCR) Leaky Bucket Shaper VBR.0/VBR.1 */ @@ -94,7 +94,7 @@ Signed-off-by: Sergey Ryazanov /* Queue Parameter Table (QPT) */ tc_w32(QSB_QPT_SET_MASK, QSB_RTM); -@@ -1064,15 +1006,6 @@ static int ppe_open(struct atm_vcc *vcc) +@@ -1062,15 +1004,6 @@ static int ppe_open(struct atm_vcc *vcc) /* check bandwidth */ if ((vcc->qos.txtp.traffic_class == ATM_CBR && vcc->qos.txtp.max_pcr > @@ -110,7 +110,7 @@ Signed-off-by: Sergey Ryazanov (port->tx_max_cell_rate - port->tx_used_cell_rate))) { tc_dbg(priv->tc_priv, MSG_INIT, "exceed TX line rate\n"); return -EINVAL; -@@ -1128,15 +1061,8 @@ static int ppe_open(struct atm_vcc *vcc) +@@ -1126,15 +1059,8 @@ static int ppe_open(struct atm_vcc *vcc) /* reserve bandwidth */ switch (vcc->qos.txtp.traffic_class) { case ATM_CBR: @@ -126,7 +126,7 @@ Signed-off-by: Sergey Ryazanov } /* update atm_vcc structure */ -@@ -1222,15 +1148,8 @@ static void ppe_close(struct atm_vcc *vc +@@ -1220,15 +1146,8 @@ static void ppe_close(struct atm_vcc *vc /* release bandwidth */ switch (vcc->qos.txtp.traffic_class) { case ATM_CBR: diff --git a/package/kernel/lantiq/vrx518_tc/patches/200-swplat.patch b/package/kernel/lantiq/vrx518_tc/patches/200-swplat.patch index 930fa6632c3..9320a1535d5 100644 --- a/package/kernel/lantiq/vrx518_tc/patches/200-swplat.patch +++ b/package/kernel/lantiq/vrx518_tc/patches/200-swplat.patch @@ -3,7 +3,7 @@ This replaces it by a basic working implementation. --- a/dcdp/atm_tc.c +++ b/dcdp/atm_tc.c -@@ -545,7 +545,11 @@ static void atm_aca_init(struct atm_priv +@@ -543,7 +543,11 @@ static void atm_aca_init(struct atm_priv cfg = &priv->tc_priv->cfg; txin = ¶m.aca_txin; @@ -15,7 +15,7 @@ This replaces it by a basic working implementation. txin->hd_size_in_dw = cfg->txin.soc_desc_dwsz; txin->pd_desc_base = SB_XBAR_ADDR(__ACA_TX_IN_PD_LIST_BASE); txin->pd_desc_num = __ACA_TX_IN_PD_LIST_NUM; -@@ -567,7 +571,11 @@ static void atm_aca_init(struct atm_priv +@@ -565,7 +569,11 @@ static void atm_aca_init(struct atm_priv txin->soc_cmlt_cnt_addr); txout = ¶m.aca_txout; @@ -27,7 +27,7 @@ This replaces it by a basic working implementation. txout->hd_size_in_dw = cfg->txout.soc_desc_dwsz; txout->pd_desc_base = SB_XBAR_ADDR(__ACA_TX_OUT_PD_LIST_BASE); txout->pd_desc_num = __ACA_TX_OUT_PD_LIST_NUM; -@@ -589,7 +597,11 @@ static void atm_aca_init(struct atm_priv +@@ -587,7 +595,11 @@ static void atm_aca_init(struct atm_priv txout->soc_cmlt_cnt_addr); rxout = ¶m.aca_rxout; @@ -39,7 +39,7 @@ This replaces it by a basic working implementation. rxout->hd_size_in_dw = cfg->rxout.soc_desc_dwsz; rxout->pd_desc_base = SB_XBAR_ADDR(__ACA_RX_OUT_PD_LIST_BASE); rxout->pd_desc_num = __ACA_RX_OUT_PD_LIST_NUM; -@@ -611,7 +623,11 @@ static void atm_aca_init(struct atm_priv +@@ -609,7 +621,11 @@ static void atm_aca_init(struct atm_priv rxout->soc_cmlt_cnt_addr); rxin = ¶m.aca_rxin; @@ -51,7 +51,7 @@ This replaces it by a basic working implementation. rxin->hd_size_in_dw = cfg->rxin.soc_desc_dwsz; rxin->pd_desc_base = SB_XBAR_ADDR(__RX_IN_PD_DES_LIST_BASE); rxin->pd_desc_num = __ACA_RX_IN_PD_LIST_NUM; -@@ -1180,7 +1196,7 @@ static int ppe_ioctl(struct atm_dev *dev +@@ -1178,7 +1194,7 @@ static int ppe_ioctl(struct atm_dev *dev static int ppe_send(struct atm_vcc *vcc, struct sk_buff *skb) { int ret, qid, mpoa_pt, mpoa_type, vid; @@ -60,7 +60,7 @@ This replaces it by a basic working implementation. struct atm_priv *priv; if (!vcc) { -@@ -1246,12 +1262,14 @@ static int ppe_send(struct atm_vcc *vcc, +@@ -1244,12 +1260,14 @@ static int ppe_send(struct atm_vcc *vcc, tc_dbg(priv->tc_priv, MSG_TX, "vid: 0x%x, qid: 0x%x\n", vid, qid); @@ -79,7 +79,7 @@ This replaces it by a basic working implementation. tc_dbg(priv->tc_priv, MSG_TX, "ATM: TX fail\n"); --- a/dcdp/ptm_tc.c +++ b/dcdp/ptm_tc.c -@@ -506,6 +506,7 @@ static int ptm_xmit(struct sk_buff *skb, +@@ -504,6 +504,7 @@ static int ptm_xmit(struct sk_buff *skb, struct ptm_priv *ptm_tc = netdev_priv(dev); int qid; enum tc_pkt_type type; @@ -87,7 +87,7 @@ This replaces it by a basic working implementation. if (!showtime_stat(ptm_tc->tc_priv)) goto PTM_XMIT_DROP; -@@ -519,11 +520,13 @@ static int ptm_xmit(struct sk_buff *skb, +@@ -517,11 +518,13 @@ static int ptm_xmit(struct sk_buff *skb, type = ptm_tc->tc_priv->tc_mode == TC_PTM_BND_MODE ? PTM_BOND_PKT : PTM_SL_PKT; @@ -102,7 +102,7 @@ This replaces it by a basic working implementation. } return 0; -@@ -640,7 +643,7 @@ static int ptm_dev_init(struct tc_priv * +@@ -638,7 +641,7 @@ static int ptm_dev_init(struct tc_priv * const char macaddr[ETH_ALEN] = {0xAC, 0x9A, 0x96, 0x11, 0x22, 0x33}; @@ -111,7 +111,7 @@ This replaces it by a basic working implementation. if (!dev) { tc_dbg(tc_priv, MSG_INIT, "Cannot alloc net device\n"); return -ENOMEM; -@@ -2337,7 +2340,11 @@ static void ptm_aca_init(struct ptm_ep_p +@@ -2335,7 +2338,11 @@ static void ptm_aca_init(struct ptm_ep_p cfg = &priv->tc_priv->cfg; txin = ¶m.aca_txin; @@ -123,7 +123,7 @@ This replaces it by a basic working implementation. txin->hd_size_in_dw = cfg->txin.soc_desc_dwsz; txin->pd_desc_base = SB_XBAR_ADDR(__ACA_TX_IN_PD_LIST_BASE); txin->pd_desc_num = __ACA_TX_IN_PD_LIST_NUM; -@@ -2360,7 +2367,11 @@ static void ptm_aca_init(struct ptm_ep_p +@@ -2358,7 +2365,11 @@ static void ptm_aca_init(struct ptm_ep_p txin->soc_cmlt_cnt_addr); txout = ¶m.aca_txout; @@ -135,7 +135,7 @@ This replaces it by a basic working implementation. txout->hd_size_in_dw = cfg->txout.soc_desc_dwsz; if (priv->tc_priv->param.cdma_desc_loc == LOC_IN_FPI) txout->pd_desc_base = sb_r32(__TX_OUT_SHADOW_PTR) - phybase; -@@ -2386,7 +2397,11 @@ static void ptm_aca_init(struct ptm_ep_p +@@ -2384,7 +2395,11 @@ static void ptm_aca_init(struct ptm_ep_p txout->soc_cmlt_cnt_addr); rxout = ¶m.aca_rxout; @@ -147,7 +147,7 @@ This replaces it by a basic working implementation. rxout->hd_size_in_dw = cfg->rxout.soc_desc_dwsz; if (priv->tc_priv->param.cdma_desc_loc == LOC_IN_FPI) rxout->pd_desc_base = sb_r32(__RX_OUT_SHADOW_PTR) - phybase; -@@ -2412,7 +2427,11 @@ static void ptm_aca_init(struct ptm_ep_p +@@ -2410,7 +2425,11 @@ static void ptm_aca_init(struct ptm_ep_p rxout->soc_cmlt_cnt_addr); rxin = ¶m.aca_rxin; diff --git a/package/kernel/lantiq/vrx518_tc/patches/201-desc-length.patch b/package/kernel/lantiq/vrx518_tc/patches/201-desc-length.patch index 134f119f3c0..84a8714d346 100644 --- a/package/kernel/lantiq/vrx518_tc/patches/201-desc-length.patch +++ b/package/kernel/lantiq/vrx518_tc/patches/201-desc-length.patch @@ -54,7 +54,7 @@ significantly lower latencies when the line is saturated. struct cdma { --- a/dcdp/ptm_tc.c +++ b/dcdp/ptm_tc.c -@@ -78,7 +78,11 @@ static const u32 tx_kvec[] = { +@@ -76,7 +76,11 @@ static const u32 tx_kvec[] = { 0x30B1B233, 0xB43536B7, 0xB8393ABB, 0x3CBDBE3F, 0xC04142C3, 0x44C5C647, 0x48C9CA4B, 0xCC4D4ECF }; @@ -66,7 +66,7 @@ significantly lower latencies when the line is saturated. static const char ptm_drv_name[] = "PTM SL"; static const char ptm_bond_name[][IFNAMSIZ] = {"PTM US BOND", "PTM DS BOND"}; -@@ -1018,6 +1022,10 @@ static void us_fp_desq_cfg_ctxt_init(str +@@ -1016,6 +1020,10 @@ static void us_fp_desq_cfg_ctxt_init(str int i; u32 desc_addr; rx_descriptor_t desc; @@ -77,7 +77,7 @@ significantly lower latencies when the line is saturated. memset(&desq_cfg, 0, sizeof(desq_cfg)); /* Initialize US Fast-Path Descriptor Queue Config/Context */ -@@ -1025,7 +1033,11 @@ static void us_fp_desq_cfg_ctxt_init(str +@@ -1023,7 +1031,11 @@ static void us_fp_desq_cfg_ctxt_init(str desq_cfg.fast_path = 1; desq_cfg.mbox_int_en = 0; desq_cfg.des_sync_needed = 0; @@ -89,7 +89,7 @@ significantly lower latencies when the line is saturated. desq_cfg.des_base_addr = __US_FAST_PATH_DES_LIST_BASE; tc_mem_write(priv, fpi_addr(__US_FP_INQ_DES_CFG_CTXT), -@@ -1049,12 +1061,20 @@ static void us_qos_desq_cfg_ctxt_init(st +@@ -1047,12 +1059,20 @@ static void us_qos_desq_cfg_ctxt_init(st int offset, i; rx_descriptor_t desc; u32 phy_addr; @@ -110,7 +110,7 @@ significantly lower latencies when the line is saturated. offset = 0; for (i = 0; i < QOSQ_NUM; i++) { -@@ -1093,6 +1113,10 @@ static void us_outq_desq_cfg_ctxt_init(s +@@ -1091,6 +1111,10 @@ static void us_outq_desq_cfg_ctxt_init(s u32 phy_addr; int i; u32 offset; @@ -121,7 +121,7 @@ significantly lower latencies when the line is saturated. /* Setup OUTQ_QoS_CFG_CTXT */ /* NOTE: By default, Shaping & WFQ both are DISABLED!! */ -@@ -1121,7 +1145,11 @@ static void us_outq_desq_cfg_ctxt_init(s +@@ -1119,7 +1143,11 @@ static void us_outq_desq_cfg_ctxt_init(s desq_cfg.des_in_own_val = US_OUTQ_DES_OWN; desq_cfg.mbox_int_en = 0; desq_cfg.des_sync_needed = 0; @@ -134,7 +134,7 @@ significantly lower latencies when the line is saturated. /** * Only BC0 is used in VRX518 */ -@@ -1187,7 +1215,11 @@ static void us_qos_cfg_init(struct ptm_e +@@ -1185,7 +1213,11 @@ static void us_qos_cfg_init(struct ptm_e /* Set QoS NO DROP */ sb_w32(1, __QOSQ_NO_DROP); /* Enable Preemption function/Disable QoS by default */ @@ -146,7 +146,7 @@ significantly lower latencies when the line is saturated. /* By default, all qid mappint to non-preemption queue */ sb_w32(0x0, _QID2PREEMP_MAP); -@@ -1389,6 +1421,11 @@ static void ptm_local_desq_cfg_ctxt_init +@@ -1387,6 +1419,11 @@ static void ptm_local_desq_cfg_ctxt_init u32 dcnt, addr, pdbram_base; unsigned int us_des_alloc[] = { __US_TC_LOCAL_Q0_DES_LIST_NUM, __US_TC_LOCAL_Q1_DES_LIST_NUM}; @@ -158,7 +158,7 @@ significantly lower latencies when the line is saturated. /* Setup the Local DESQ Configuration/Context for UpStream Queues */ memset(&desq_cfg, 0, sizeof(desq_cfg)); -@@ -2334,6 +2371,10 @@ static void ptm_aca_init(struct ptm_ep_p +@@ -2332,6 +2369,10 @@ static void ptm_aca_init(struct ptm_ep_p u32 phybase = priv->ep->phy_membase; u32 start; u32 type; @@ -169,7 +169,7 @@ significantly lower latencies when the line is saturated. priv->tc_priv->tc_ops.soc_cfg_get(&priv->tc_priv->cfg, ptm_id(priv)); memset(¶m, 0, sizeof(param)); -@@ -2347,7 +2388,11 @@ static void ptm_aca_init(struct ptm_ep_p +@@ -2345,7 +2386,11 @@ static void ptm_aca_init(struct ptm_ep_p #endif txin->hd_size_in_dw = cfg->txin.soc_desc_dwsz; txin->pd_desc_base = SB_XBAR_ADDR(__ACA_TX_IN_PD_LIST_BASE); @@ -198,7 +198,7 @@ significantly lower latencies when the line is saturated. --- a/dcdp/tc_proc.c +++ b/dcdp/tc_proc.c -@@ -1118,6 +1118,9 @@ static int proc_read_ver(struct seq_file +@@ -1116,6 +1116,9 @@ static int proc_read_ver(struct seq_file (date >> 16) & 0xff, (date & 0xffff)); @@ -208,7 +208,7 @@ significantly lower latencies when the line is saturated. #ifdef FEATURE_POWER_DOWN seq_puts(seq, " + Support Power Down enhancement feature\n"); #endif -@@ -1170,6 +1173,113 @@ static const struct proc_ops tc_soc_proc +@@ -1168,6 +1171,113 @@ static const struct proc_ops tc_soc_proc .proc_release = single_release, }; @@ -322,7 +322,7 @@ significantly lower latencies when the line is saturated. static struct tc_proc_list tc_procs[] = { {TC_PROC_DIR, 0, NULL, 1}, {"cfg", 0644, &tc_cfg_proc_fops, 0}, -@@ -1178,6 +1288,9 @@ static struct tc_proc_list tc_procs[] = +@@ -1176,6 +1286,9 @@ static struct tc_proc_list tc_procs[] = {"showtime", 0200, &tc_show_time_proc_fops, 0}, {"ver", 0644, &tc_ver_proc_fops, 0}, {"soc", 0644, &tc_soc_proc_fops, 0}, @@ -332,7 +332,7 @@ significantly lower latencies when the line is saturated. }; int tc_proc_init(struct tc_priv *priv) -@@ -1337,7 +1450,6 @@ proc_ptm_cfg_help: +@@ -1335,7 +1448,6 @@ proc_ptm_cfg_help: return count; } diff --git a/package/kernel/lantiq/vrx518_tc/patches/202-napi.patch b/package/kernel/lantiq/vrx518_tc/patches/202-napi.patch index 75d18138c08..b0caf0b79b0 100644 --- a/package/kernel/lantiq/vrx518_tc/patches/202-napi.patch +++ b/package/kernel/lantiq/vrx518_tc/patches/202-napi.patch @@ -296,7 +296,7 @@ priv->tc_ops.umt_start = plat_umt_start; --- a/dcdp/atm_tc.c +++ b/dcdp/atm_tc.c -@@ -3569,7 +3569,7 @@ static void atm_aca_ring_config_init(str +@@ -3554,7 +3554,7 @@ static void atm_aca_ring_config_init(str static int atm_ring_init(struct atm_priv *priv) { atm_aca_ring_config_init(priv); @@ -305,7 +305,7 @@ } static int atm_init(struct tc_priv *tcpriv, u32 ep_id) -@@ -3939,7 +3939,7 @@ void atm_tc_unload(void) +@@ -3924,7 +3924,7 @@ void atm_tc_unload(void) /* unregister device */ if (priv->tc_priv->tc_ops.dev_unreg != NULL) priv->tc_priv->tc_ops.dev_unreg(NULL, @@ -334,7 +334,7 @@ int (*umt_init)(u32 umt_id, u32 umt_period, u32 umt_dst); --- a/dcdp/ptm_tc.c +++ b/dcdp/ptm_tc.c -@@ -146,7 +146,11 @@ static int ptm_open(struct net_device *d +@@ -144,7 +144,11 @@ static int ptm_open(struct net_device *d struct ptm_priv *ptm_tc = netdev_priv(dev); tc_info(ptm_tc->tc_priv, MSG_EVENT, "ptm open\n"); @@ -346,7 +346,7 @@ #ifdef CONFIG_SOC_TYPE_XWAY xet_phy_wan_port(7, NULL, 1, 1); if (ppa_hook_ppa_phys_port_add_fn) -@@ -163,7 +167,11 @@ static int ptm_stop(struct net_device *d +@@ -161,7 +165,11 @@ static int ptm_stop(struct net_device *d struct ptm_priv *ptm_tc = netdev_priv(dev); tc_info(ptm_tc->tc_priv, MSG_EVENT, "ptm stop\n"); @@ -358,7 +358,7 @@ #ifdef CONFIG_SOC_TYPE_XWAY if (ppa_drv_datapath_mac_entry_setting) ppa_drv_datapath_mac_entry_setting(dev->dev_addr, 0, 6, 10, 1, 2); -@@ -564,7 +572,7 @@ static void ptm_rx(struct net_device *de +@@ -562,7 +570,7 @@ static void ptm_rx(struct net_device *de ptm_tc->stats64.rx_packets++; ptm_tc->stats64.rx_bytes += skb->len; @@ -367,22 +367,17 @@ ptm_tc->stats64.rx_dropped++; return; -@@ -664,6 +672,14 @@ static int ptm_dev_init(struct tc_priv * +@@ -662,6 +670,9 @@ static int ptm_dev_init(struct tc_priv * memcpy(ptm_tc->outq_map, def_outq_map, sizeof(def_outq_map)); SET_NETDEV_DEV(ptm_tc->dev, tc_priv->ep_dev[id].dev); -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0)) + netif_napi_add(ptm_tc->dev, &ptm_tc->napi_rx, tc_priv->tc_ops.napi_rx); + netif_napi_add_tx(ptm_tc->dev, &ptm_tc->napi_tx, tc_priv->tc_ops.napi_tx); -+#else -+ netif_napi_add(ptm_tc->dev, &ptm_tc->napi_rx, tc_priv->tc_ops.napi_rx, NAPI_POLL_WEIGHT); -+ netif_tx_napi_add(ptm_tc->dev, &ptm_tc->napi_tx, tc_priv->tc_ops.napi_tx, NAPI_POLL_WEIGHT); + -+#endif err = register_netdev(ptm_tc->dev); if (err) goto err1; -@@ -2618,7 +2634,9 @@ static int ptm_ring_init(struct ptm_ep_p +@@ -2616,7 +2627,9 @@ static int ptm_ring_init(struct ptm_ep_p { ptm_aca_ring_config_init(priv, id, bonding); return priv->tc_priv->tc_ops.dev_reg(priv->ptm_tc->dev, @@ -393,7 +388,7 @@ } /** -@@ -2973,7 +2991,9 @@ void ptm_tc_unload(enum dsl_tc_mode tc_m +@@ -2971,7 +2984,9 @@ void ptm_tc_unload(enum dsl_tc_mode tc_m /* unregister device */ if (ptm_tc->tc_priv->tc_ops.dev_unreg != NULL) ptm_tc->tc_priv->tc_ops.dev_unreg(ptm_tc->dev, @@ -404,7 +399,7 @@ /* remove PTM callback function */ ptm_cb_setup(ptm_tc, 0); -@@ -2991,6 +3011,10 @@ void ptm_exit(void) +@@ -2989,6 +3004,10 @@ void ptm_exit(void) if (!priv) return; diff --git a/package/kernel/lantiq/vrx518_tc/patches/204-dcdp-atm_tc-fix-compilation-warning.patch b/package/kernel/lantiq/vrx518_tc/patches/204-dcdp-atm_tc-fix-compilation-warning.patch index 1b70a663cdd..bf39579a233 100644 --- a/package/kernel/lantiq/vrx518_tc/patches/204-dcdp-atm_tc-fix-compilation-warning.patch +++ b/package/kernel/lantiq/vrx518_tc/patches/204-dcdp-atm_tc-fix-compilation-warning.patch @@ -1,6 +1,6 @@ --- a/dcdp/atm_tc.c +++ b/dcdp/atm_tc.c -@@ -688,7 +688,8 @@ static void atm_aca_init(struct atm_priv +@@ -686,7 +686,8 @@ static void atm_aca_init(struct atm_priv ACA_TXOUT_EN | ACA_RXIN_EN | ACA_RXOUT_EN, 1); } @@ -10,7 +10,7 @@ { struct tm nowtm; char tmbuf[64]; -@@ -707,7 +708,8 @@ static int print_datetime(char *buffer, +@@ -705,7 +706,8 @@ static int print_datetime(char *buffer, nowtm.tm_hour, nowtm.tm_min, nowtm.tm_sec); @@ -20,7 +20,7 @@ return 0; } -@@ -909,7 +911,7 @@ void show_atm_pvc(struct seq_file *seq, +@@ -907,7 +909,7 @@ void show_atm_pvc(struct seq_file *seq, char buf[64]; seq_printf(seq, "\tNet device: %s\n", pvc->dev->name); diff --git a/package/kernel/lantiq/vrx518_tc/patches/205-dcdp-ptm_tc-dynamically-alloc-mib.patch b/package/kernel/lantiq/vrx518_tc/patches/205-dcdp-ptm_tc-dynamically-alloc-mib.patch index e239ba33466..0c86db299f1 100644 --- a/package/kernel/lantiq/vrx518_tc/patches/205-dcdp-ptm_tc-dynamically-alloc-mib.patch +++ b/package/kernel/lantiq/vrx518_tc/patches/205-dcdp-ptm_tc-dynamically-alloc-mib.patch @@ -1,6 +1,6 @@ --- a/dcdp/ptm_tc.c +++ b/dcdp/ptm_tc.c -@@ -307,15 +307,19 @@ static int ptm_tc_get_stats(struct ptm_e +@@ -305,15 +305,19 @@ static int ptm_tc_get_stats(struct ptm_e ) { struct rtnl_link_stats64 *stat; @@ -21,7 +21,7 @@ if (bonding) stats->tc_info = TC_PTM_BND_MODE; else -@@ -349,11 +353,11 @@ static int ptm_tc_get_stats(struct ptm_e +@@ -347,11 +351,11 @@ static int ptm_tc_get_stats(struct ptm_e ? cur_cnt - last_cnt : cur_cnt + ((unsigned int)(-1) - last_cnt); @@ -36,7 +36,7 @@ cur_cnt = tc_r32(GIF0_RX_CRC_ERR_CNT); last_cnt = priv->ptm_mib.rx_crc_err_pdu[0]; -@@ -367,7 +371,7 @@ static int ptm_tc_get_stats(struct ptm_e +@@ -365,7 +369,7 @@ static int ptm_tc_get_stats(struct ptm_e ? cur_cnt - last_cnt : cur_cnt + ((unsigned int)(-1) - last_cnt); @@ -45,7 +45,7 @@ cur_cnt = sb_r32(__US_TC_LOCAL_Q_CFG_CTXT_BASE + offsetof(desq_cfg_ctxt_t, deq_pkt_cnt) / 4); last_cnt = priv->ptm_mib.tx_total_pdu[0]; -@@ -385,90 +389,108 @@ static int ptm_tc_get_stats(struct ptm_e +@@ -383,90 +387,108 @@ static int ptm_tc_get_stats(struct ptm_e /* For bonding information */ if (bonding) { int i; diff --git a/package/kernel/lantiq/vrx518_tc/patches/206-dcdp-ptm_tc-allow-larger-mtu-to-support-rfc4638.patch b/package/kernel/lantiq/vrx518_tc/patches/206-dcdp-ptm_tc-allow-larger-mtu-to-support-rfc4638.patch index 54a21187ff8..c5fe442cbb2 100644 --- a/package/kernel/lantiq/vrx518_tc/patches/206-dcdp-ptm_tc-allow-larger-mtu-to-support-rfc4638.patch +++ b/package/kernel/lantiq/vrx518_tc/patches/206-dcdp-ptm_tc-allow-larger-mtu-to-support-rfc4638.patch @@ -24,7 +24,7 @@ Signed-off-by: Andrew MacIntyre --- a/dcdp/ptm_tc.c +++ b/dcdp/ptm_tc.c -@@ -666,6 +666,7 @@ static void ptm_setup(struct net_device +@@ -664,6 +664,7 @@ static void ptm_setup(struct net_device ether_setup(dev); dev->watchdog_timeo = 10 * HZ; dev->netdev_ops = &g_ptm_netdev_ops; diff --git a/package/kernel/lantiq/vrx518_tc/patches/207-dcdp-atm_tc-fix-crash-on-subif_reg-absence.patch b/package/kernel/lantiq/vrx518_tc/patches/207-dcdp-atm_tc-fix-crash-on-subif_reg-absence.patch index f268c0908cb..ad27e6216a0 100644 --- a/package/kernel/lantiq/vrx518_tc/patches/207-dcdp-atm_tc-fix-crash-on-subif_reg-absence.patch +++ b/package/kernel/lantiq/vrx518_tc/patches/207-dcdp-atm_tc-fix-crash-on-subif_reg-absence.patch @@ -23,7 +23,7 @@ Signed-off-by: Sergey Ryazanov --- --- a/dcdp/atm_tc.c +++ b/dcdp/atm_tc.c -@@ -1158,8 +1158,9 @@ static void ppe_close(struct atm_vcc *vc +@@ -1156,8 +1156,9 @@ static void ppe_close(struct atm_vcc *vc validate_oam_htu_entry(priv, 0); spin_unlock_bh(&priv->atm_lock); @@ -35,7 +35,7 @@ Signed-off-by: Sergey Ryazanov memset(conn, 0, sizeof(*conn)); -@@ -2710,24 +2711,26 @@ static void mpoa_setup_sync(struct atm_p +@@ -2695,24 +2696,26 @@ static void mpoa_setup_sync(struct atm_p struct wtx_queue_config_t tx_qcfg; struct uni_cell_header *cell_header; struct atm_vcc *vcc; diff --git a/package/kernel/lantiq/vrx518_tc/patches/208-dcdp-ptm_tc-fix-rx_len_adj.patch b/package/kernel/lantiq/vrx518_tc/patches/208-dcdp-ptm_tc-fix-rx_len_adj.patch index 855da162c3c..6b0e08a7b2e 100644 --- a/package/kernel/lantiq/vrx518_tc/patches/208-dcdp-ptm_tc-fix-rx_len_adj.patch +++ b/package/kernel/lantiq/vrx518_tc/patches/208-dcdp-ptm_tc-fix-rx_len_adj.patch @@ -3,7 +3,7 @@ path. --- a/dcdp/ptm_tc.c +++ b/dcdp/ptm_tc.c -@@ -923,7 +923,7 @@ static void ptm_fw_init(struct ptm_ep_pr +@@ -916,7 +916,7 @@ static void ptm_fw_init(struct ptm_ep_pr rx_gitf_cfg.rx_inserted_bytes_1h = 0; rx_gitf_cfg.rx_inserted_bytes_2l = 0; rx_gitf_cfg.rx_inserted_bytes_2h = 0; diff --git a/package/kernel/lantiq/vrx518_tc/patches/300-fix-missing-prototypes-warnings.patch b/package/kernel/lantiq/vrx518_tc/patches/300-fix-missing-prototypes-warnings.patch index 562e3497860..8af643c4e66 100644 --- a/package/kernel/lantiq/vrx518_tc/patches/300-fix-missing-prototypes-warnings.patch +++ b/package/kernel/lantiq/vrx518_tc/patches/300-fix-missing-prototypes-warnings.patch @@ -15,7 +15,7 @@ Signed-off-by: Shiji Yang --- a/dcdp/atm_tc.c +++ b/dcdp/atm_tc.c -@@ -279,7 +279,7 @@ unsigned int find_vpi(unsigned int vpi) +@@ -277,7 +277,7 @@ unsigned int find_vpi(unsigned int vpi) * success: 0 * failed: -1 */ @@ -46,7 +46,7 @@ Signed-off-by: Shiji Yang #include "../inc/tc_common.h" --- a/dcdp/tc_proc.c +++ b/dcdp/tc_proc.c -@@ -1945,7 +1945,7 @@ static void fwdbg_help(struct tc_comm *p +@@ -1943,7 +1943,7 @@ static void fwdbg_help(struct tc_comm *p if (!cmds[i].cmd) fwdbg_help(priv, NULL, 0, result); } @@ -55,7 +55,7 @@ Signed-off-by: Shiji Yang char *commands[], int num, char *result) { int i; -@@ -1964,7 +1964,7 @@ int fw_dbg_start(struct tc_comm *priv, +@@ -1962,7 +1962,7 @@ int fw_dbg_start(struct tc_comm *priv, return 0; }