]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
lantiq: remove old kernel fixes 22949/head
authorRosen Penev <rosenp@gmail.com>
Tue, 14 Apr 2026 03:22:54 +0000 (20:22 -0700)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 24 May 2026 22:55:12 +0000 (00:55 +0200)
No longer needed.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22949
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
79 files changed:
package/kernel/lantiq/ltq-adsl-mei/src/drv_mei_cpe.c
package/kernel/lantiq/ltq-adsl/patches/100-dsl_compat.patch
package/kernel/lantiq/ltq-adsl/patches/120-platform.patch
package/kernel/lantiq/ltq-adsl/patches/130-linux3.8.patch
package/kernel/lantiq/ltq-adsl/patches/140-linux_3.18.patch
package/kernel/lantiq/ltq-adsl/patches/150-linux_5.9.patch
package/kernel/lantiq/ltq-adsl/patches/400-kernel-6.1.patch
package/kernel/lantiq/ltq-atm/src/ifxmips_atm_amazon_se.c
package/kernel/lantiq/ltq-atm/src/ifxmips_atm_ar9.c
package/kernel/lantiq/ltq-atm/src/ifxmips_atm_danube.c
package/kernel/lantiq/ltq-atm/src/ifxmips_atm_vr9.c
package/kernel/lantiq/ltq-atm/src/ltq_atm.c
package/kernel/lantiq/ltq-deu/src/ifxmips_aes.c
package/kernel/lantiq/ltq-deu/src/ifxmips_arc4.c
package/kernel/lantiq/ltq-deu/src/ifxmips_des.c
package/kernel/lantiq/ltq-deu/src/ifxmips_deu.c
package/kernel/lantiq/ltq-deu/src/ifxmips_deu_ar9.h
package/kernel/lantiq/ltq-deu/src/ifxmips_deu_danube.h
package/kernel/lantiq/ltq-deu/src/ifxmips_deu_dma.h
package/kernel/lantiq/ltq-deu/src/ifxmips_deu_vr9.h
package/kernel/lantiq/ltq-deu/src/ifxmips_sha1.c
package/kernel/lantiq/ltq-deu/src/ifxmips_sha1_hmac.c
package/kernel/lantiq/ltq-ifxos/patches/100-compat.patch
package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c
package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.h
package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_amazon_se.c
package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_ar9.c
package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_danube.c
package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_test.c
package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c
package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.h
package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vr9.c
package/kernel/lantiq/ltq-tapi/patches/000-portability.patch
package/kernel/lantiq/ltq-tapi/patches/010-fix-compile.patch
package/kernel/lantiq/ltq-tapi/patches/100-ifxmips.patch
package/kernel/lantiq/ltq-tapi/patches/200-linux-37.patch
package/kernel/lantiq/ltq-tapi/patches/300-linux-310.patch
package/kernel/lantiq/ltq-tapi/patches/400-linux-415.patch
package/kernel/lantiq/ltq-tapi/patches/500-linux-509.patch
package/kernel/lantiq/ltq-tapi/patches/510-linux-515.patch [deleted file]
package/kernel/lantiq/ltq-tapi/patches/610-flush-only-local-workqueue.patch
package/kernel/lantiq/ltq-tapi/patches/611-ifxos-typedef-madness.diff
package/kernel/lantiq/ltq-tapi/patches/617-adapt-to-the-6.18-kernel-timer-API.patch
package/kernel/lantiq/ltq-vdsl-vr11/patches/130-support-kernel-6.6.patch
package/kernel/lantiq/ltq-vdsl-vr11/patches/301-fix-missing-prototypes-warnings.patch
package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/001-fix-compile.patch
package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/100-compat.patch
package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/101_no-date-time.patch
package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/300-fix-simple-compilation-warning.patch
package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/400-kernel-6.1.patch
package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/402-kernel-6.6-fixes.patch
package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/405-convert-platform-driver-.remove-to-.remove_new.patch
package/kernel/lantiq/ltq-vdsl-vr9/patches/001-fix-compile.patch
package/kernel/lantiq/ltq-vdsl-vr9/patches/100-compat.patch
package/kernel/lantiq/ltq-vdsl-vr9/patches/301-fix-compilation-warning-simple-fix.patch
package/kernel/lantiq/ltq-vdsl-vr9/patches/302-kernel-6.6-fixes.patch
package/kernel/lantiq/ltq-vdsl-vr9/patches/303-fix-missing-prototypes-warning.patch
package/kernel/lantiq/ltq-vmmc/patches/000-portability.patch
package/kernel/lantiq/ltq-vmmc/patches/100-target.patch
package/kernel/lantiq/ltq-vmmc/patches/200-compat.patch
package/kernel/lantiq/ltq-vmmc/patches/400-falcon.patch
package/kernel/lantiq/ltq-vmmc/patches/602-fix-compilation-warning-int-conversion.patch
package/kernel/lantiq/ltq-vmmc/patches/603-fix-signature.patch
package/kernel/lantiq/ltq-vmmc/patches/605-get-irqs-from-kernel-in-tree-vmmc-driver.patch
package/kernel/lantiq/ltq-vmmc/patches/606-fix-version-macro-definition-conflicts-on-6.12-kerne.patch
package/kernel/lantiq/ltq-vmmc/patches/608-fix-inline-is-not-at-beginning-of-declaration.patch [deleted file]
package/kernel/lantiq/vrx518_ep/patches/100-compat.patch
package/kernel/lantiq/vrx518_ep/src/test/ep_test.c
package/kernel/lantiq/vrx518_tc/patches/100-compat.patch
package/kernel/lantiq/vrx518_tc/patches/101-dcdp-atm_tc-drop-extra-qos-classes.patch
package/kernel/lantiq/vrx518_tc/patches/200-swplat.patch
package/kernel/lantiq/vrx518_tc/patches/201-desc-length.patch
package/kernel/lantiq/vrx518_tc/patches/202-napi.patch
package/kernel/lantiq/vrx518_tc/patches/204-dcdp-atm_tc-fix-compilation-warning.patch
package/kernel/lantiq/vrx518_tc/patches/205-dcdp-ptm_tc-dynamically-alloc-mib.patch
package/kernel/lantiq/vrx518_tc/patches/206-dcdp-ptm_tc-allow-larger-mtu-to-support-rfc4638.patch
package/kernel/lantiq/vrx518_tc/patches/207-dcdp-atm_tc-fix-crash-on-subif_reg-absence.patch
package/kernel/lantiq/vrx518_tc/patches/208-dcdp-ptm_tc-fix-rx_len_adj.patch
package/kernel/lantiq/vrx518_tc/patches/300-fix-missing-prototypes-warnings.patch

index 8d3cbe7054f28e5a4bf86659a8e0c8870cd2618d..cce0999396670a5c189f748b267c98da1846eda4 100644 (file)
@@ -29,7 +29,6 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/mod_devicetable.h>
-#include <linux/version.h>
 #include <generated/utsrelease.h>
 #include <linux/types.h>
 #include <linux/fs.h>
@@ -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;
 }
index db02ebf4fdb237a3ec934b91561d2edcf6f5fa69..248fa94e0fe2cd436828fc714bfdbe602de12902 100644 (file)
  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_
           }
        }
     }
     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)
  {
     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
  
 -
 -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17))
 -   #include <linux/utsrelease.h>
-+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
-+#include <linux/utsrelease.h>
-+#else
+-#endif
 +#include <generated/utsrelease.h>
- #endif
  
  #include <linux/types.h>
-@@ -39,7 +39,8 @@
+ #include <linux/fs.h>
+@@ -39,7 +35,8 @@
  #include <linux/delay.h>
  #include <linux/poll.h>
  #include <asm/uaccess.h>
index 993efd3b2ae9a00594f4be753f93c870d5c215f2..14132588992ae4e9164a218045e28be76d41dd9b 100644 (file)
@@ -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*/
  
index ee4670d4037f024c5ddb3969ef301fcc8c41b48a..c842e968253b93ae24fb7e3324298af51c0eb393 100644 (file)
@@ -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;
  
     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 */
index 668732ff0756476344c2489dddba53c61642ca33..ac64ce7293d5f77cb7bf16806fd8e3fe04265db3 100644 (file)
@@ -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
index a29d453ac4751ffe8320178fb55e914dcb9c39be..8ad8fc58c0ab49e36b33234b949cd36a9f457b5d 100644 (file)
@@ -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);*/
  }
  
index 616812b448838e2822894a70c2617abb6d3ce92c..bc270fcd01286a80b445a8a95042d28961628714 100644 (file)
@@ -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,
index db40bbcaa62a08a442460c5e5e9fa8246df4518a..31bb1582e76f45969f8198bfa1e4a64a71a3da3f 100644 (file)
@@ -34,7 +34,6 @@
  */
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/version.h>
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/proc_fs.h>
index e9949d6af31e8ad8b69324a408687ca9aea7ab5b..2682d8b06d4e14353d85d3b66a013ca8145b8bec 100644 (file)
@@ -34,7 +34,6 @@
  */
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/version.h>
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/proc_fs.h>
index 81df6386fb9ca5d0b10aceaab0d615088c5df3d0..2d402cd6576a8eb0f8557eca9932b23f610a2c44 100644 (file)
@@ -34,7 +34,6 @@
  */
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/version.h>
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/proc_fs.h>
index f6602db921d5178d9290dfa94bb2af404d0efd1f..b702cbb45ff23bb576454fb941809f3b791591ec 100644 (file)
@@ -34,7 +34,6 @@
  */
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/version.h>
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/proc_fs.h>
index 609b521ad66ab3f5484c3934a33461457e08c02d..2143658a9fbd639f6ef39b880e6600cb6ba1a917 100644 (file)
@@ -29,7 +29,6 @@
 
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/version.h>
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/proc_fs.h>
@@ -42,7 +41,6 @@
 #include <linux/atm.h>
 #include <linux/clk.h>
 #include <linux/interrupt.h>
-#include <linux/version.h>
 #ifdef CONFIG_XFRM
   #include <net/xfrm.h>
 #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
index 2bb2726be6454f9890b6156721d8205a1c25b6a2..69f266138d5a4f45fc37b18ecce8ee87389b6e5c 100644 (file)
@@ -45,7 +45,6 @@
 #include <linux/modeversions>
 #endif
 
-#include <linux/version.h>
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/proc_fs.h>
index d4848569d73b3394d7eafe0206986b9e75728da2..2ec92a927f0e12bff7236c98028b1d5e03bd3d44 100644 (file)
@@ -40,7 +40,6 @@
 */
 
 /* Project header */
-#include <linux/version.h>
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/types.h>
index 862419f7f75f92fdcc16bffd3d05abbc5bf58127..fb33a761d1f0e02dc6cc6f7c474d25380485cc5a 100644 (file)
@@ -40,7 +40,6 @@
 */
 
 /* Project Header Files */
-#include <linux/version.h>
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/types.h>
index fa981d720722c9cb6626a6548df00666bfadc3cc..99eb62c454b35ccf545caad073db7e3a208c6e99 100644 (file)
@@ -40,7 +40,6 @@
 */
 
 /* Project header */
-#include <linux/version.h>
 #if defined(CONFIG_MODVERSIONS)
 #define MODVERSIONS
 #include <linux/modversions.h>
index cf9745fc8603b5e161d6b66e1f51e4b8befaf688..41880a92254284fbb46dc0af21df9034cebe2d36 100644 (file)
@@ -42,7 +42,6 @@
 #define IFXMIPS_DEU_AR9_H
 
 /* Project Header Files */
-#include <linux/version.h>
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/types.h>
index 1a572073f979617c50eeb8ea918f108bef05f742..47ed325bdab37e6dc095caa1282ffbb1ef1a8be3 100644 (file)
@@ -41,7 +41,6 @@
 #define IFXMIPS_DEU_DANUBE_H
 
 /* Project Header Files */
-#include <linux/version.h>
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/types.h>
index 7a1b85f1d145acdadbc672137809ffe3be37139d..6ceaefd5de2b638ddc75d75bb2308c4cd899cd0b 100644 (file)
@@ -39,7 +39,6 @@
 #include <asm/byteorder.h>
 #include <linux/skbuff.h>
 #include <linux/netdevice.h>
-#include <linux/version.h>
 
 // must match the size of memory block allocated for g_dma_block and g_dma_block2
 #define DEU_MAX_PACKET_SIZE    (PAGE_SIZE >> 1)
index 06f0e8b8239fc4c7939fba808fc0bff33403eb1f..68f6669842934c07b3aa9d85b119895452a31648 100644 (file)
@@ -42,7 +42,6 @@
 #define IFXMIPS_DEU_VR9_H
 
 /* Project Header Files */
-#include <linux/version.h>
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/types.h>
index 2a87c1c55a83cc59889763d888a6f652e666d7f3..f74f66d5e05949bedab5e5036bc434ca07e976b5 100644 (file)
 #include <linux/module.h>
 #include <linux/mm.h>
 #include <linux/crypto.h>
-#include <linux/version.h>
-#if LINUX_VERSION_CODE < KERNEL_VERSION(5,11,0)
-#include <crypto/sha.h>
-#else
 #include <crypto/sha1.h>
-#endif
 #include <crypto/hash.h>
 #include <crypto/internal/hash.h>
 #include <linux/types.h>
index 3ab3966e57163398080a57205d901627add2fff2..da1a79453e58c25f3fc0ee1bd58cc2f3216c0e2e 100644 (file)
 #include <linux/mm.h>
 #include <linux/crypto.h>
 #include <crypto/internal/hash.h>
-#include <linux/version.h>
-#if LINUX_VERSION_CODE < KERNEL_VERSION(5,11,0)
-#include <crypto/sha.h>
-#else
 #include <crypto/sha1.h>
-#endif
 #include <linux/types.h>
 #include <linux/scatterlist.h>
 #include <asm/byteorder.h>
index a3f210487ea529798c3e861792eda600bd44bed4..f5f652c41250c9e19ac770c1b1de1168a3d404a2 100644 (file)
 --- 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 <linux/version.h>
- #include <linux/kernel.h>
- #ifdef MODULE
-    #include <linux/module.h>
-@@ -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,
index 48506d28ca653e5e17a91b4723cf241c33b24f71..e92a59001d92f9ba070efa95571727308525ee1f 100644 (file)
@@ -33,7 +33,6 @@
 /*
  *  Common Head File
  */
-#include <linux/version.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/types.h>
@@ -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;
 
index dd8a2fddca7fba26ffd77e95fdd84aefd48f25ac..20b76357ed30ba23151e6e7ad3e9cc647172d37a 100644 (file)
@@ -27,7 +27,6 @@
 
 
 
-#include <linux/version.h>
 #include <linux/netdevice.h>
 #include <lantiq_ptm.h>
 #include "ifxmips_ptm_common.h"
index 541e3dc094b4ef3162efdb09495ecc72a0c7a54e..e5393d643d6efdc8edfc18d679d5bc90ba256895 100644 (file)
@@ -34,7 +34,6 @@
  */
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/version.h>
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/proc_fs.h>
index 65a71402842dac1accc0e42ec0cc371e338988a3..6a655cd0007e178d567d249ae64747bb56238220 100644 (file)
@@ -34,7 +34,6 @@
  */
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/version.h>
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/proc_fs.h>
index 8ddf6f82740b13414f55701284c19e6f8ce366e6..b9d5a7cd57eaca3f668c056e951ba704d57064aa 100644 (file)
@@ -34,7 +34,6 @@
  */
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/version.h>
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/proc_fs.h>
index 15d83527077c2c0fffe2991b9ad22422d8ef4bc7..76ec1cc76d1d6d9b2f05665df038c0153c7e4766 100644 (file)
@@ -36,7 +36,6 @@
  */
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/version.h>
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/proc_fs.h>
index e020d531fe6efebfb302b8944fd8225338780198..77876dce1cbf1025764bd0a6045270a26125ed65 100644 (file)
@@ -21,7 +21,6 @@
 ** 07 JUL 2009  Xu Liang        Init Version
 *******************************************************************************/
 
-#include <linux/version.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/types.h>
@@ -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");
 
index 19a86867be13d97a907ff44e390e1632677110d8..046b733f7de0054b7fd6f2449f30c3ed76685d5a 100644 (file)
@@ -24,7 +24,6 @@
 #ifndef IFXMIPS_PTM_VDSL_H
 #define IFXMIPS_PTM_VDSL_H
 
-#include <linux/version.h>
 #include <linux/netdevice.h>
 #include <lantiq_ptm.h>
 #include "ifxmips_ptm_common.h"
index 41a0bbbd9fed69d6bc75d5b7f2a1f511878ef7df..e7a346f12dac730bb6f855dfe78e22291951e49b 100644 (file)
@@ -34,7 +34,6 @@
  */
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/version.h>
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/proc_fs.h>
index 78fcbad668edf1572be00535c9e8556b30ef3ae5..f82fdf1a379bbca67f327d2c8d17491ad85e8627 100644 (file)
  #include <asm/io.h>
  
  #ifdef LINUX_2_6
-@@ -55,7 +56,11 @@
+@@ -55,7 +56,7 @@
     #include <linux/sched.h>
     #undef   CONFIG_DEVFS_FS
     #ifndef UTS_RELEASE
 -      #include "linux/utsrelease.h"
-+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
-+#   include <linux/utsrelease.h>
-+#else
-+#   include <generated/utsrelease.h>
-+#endif
++      #include <generated/utsrelease.h>
     #endif /* UTC_RELEASE */
  #else
     #include <linux/tqueue.h>
-@@ -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);
index 0407b38b6fdfd9154418137380c112d3d40070b2..db6b3b0877c60388a251f73928d30266453ba6c8 100644 (file)
@@ -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/workqueue.h>        /* LINUX 2.6 We need work_struct */
     #include <linux/device.h>
     #include <linux/sched.h>
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
 +   #include <linux/sched/signal.h>
 +   #include <uapi/linux/sched/types.h>
-+#endif
     #undef   CONFIG_DEVFS_FS
     #ifndef UTS_RELEASE
- #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
-@@ -184,7 +188,7 @@ MODULE_PARM_DESC(block_egress_tasklet, "
+       #include <generated/utsrelease.h>
+@@ -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*/
index f56587d0672915505dd683c5ce599df02b05ae0a..27c5a273c96e4a2b1872cb461001fac830dfc732 100644 (file)
@@ -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 */
index fd6133eec1950bc5c2a3c9f92fdfdbcf71a73cde..cdde8029c8847453e72adb6c6757be691f3d9bb4 100644 (file)
 --- a/src/drv_tapi_linux.c
 +++ b/src/drv_tapi_linux.c
-@@ -47,7 +47,9 @@
+@@ -47,7 +47,6 @@
  #include <linux/errno.h>
  #include <asm/uaccess.h>               /* copy_from_user(), ... */
  #include <asm/byteorder.h>
-+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
- #include <linux/smp_lock.h>         /* lock_kernel() */
-+#endif
+-#include <linux/smp_lock.h>         /* lock_kernel() */
  #include <asm/io.h>
  
  #ifdef LINUX_2_6
-@@ -69,7 +71,9 @@
+@@ -63,7 +62,6 @@
  #else
     #include <linux/tqueue.h>
     #include <linux/sched.h>
-+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
-    #include <linux/smp_lock.h>         /* lock_kernel() */
-+#endif
+-   #include <linux/smp_lock.h>         /* 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 @@
index 2da1719a1d41232833bbe2247764aff5978452f8..39deb8e5eefe6c485218d986da8cd082b461d913 100644 (file)
@@ -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 */
  
index cddb1b6553cd80573609bb7a2197d830b310b6d5..91552b472e8af368485f89d5821ecf85503e7a62 100644 (file)
@@ -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
index 07f61aa6326e56cefb14ab61d7a407bc7653270a..1253c1b8e46ae26da35cfe9bef4a2a822a26032a 100644 (file)
@@ -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 (file)
index ee20c6c..0000000
+++ /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)
index a56f04d10e056c2a70c343cb7d04b7e0fdadd260..14ca62d69218ccce0965d1fabf82210bac91c51f 100644 (file)
@@ -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... */
index a3cd2c49931cb759661ef64c0104eb7e64ac3c14..ccf7879422150c13611766ca02fd03ad15d5ed8b 100644 (file)
@@ -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)
     {
index 5c26f00221ef5a89c62916cc7cdd7912cfbfa65b..fa794562967f597d87b0a0328797b43819456143 100644 (file)
@@ -37,7 +37,7 @@ Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
  #endif
  #ifdef MODULE
  #include <linux/module.h>
-@@ -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 <yangshiji66@outlook.com>
  
     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 <yangshiji66@outlook.com>
     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 <yangshiji66@outlook.com>
           /* 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
index 4e127cd9072bb56bb893966201a12eecd1ad7b72..25bc50bf44c37579bad970a716aff32397f8c801 100644 (file)
@@ -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
index 609ebbc72e4833735c958cc887881732e5bfda1d..2cb8ce0b970f2f63e95c8203eda03d046a370fb3 100644 (file)
@@ -102,7 +102,7 @@ Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
  {
 --- 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 <yangshiji66@outlook.com>
  {
     DSL_int_t i;
  
-@@ -1457,7 +1457,7 @@ void DSL_ModuleCleanup(void)
+@@ -1453,7 +1453,7 @@ void DSL_ModuleCleanup(void)
     return;
  }
  
index 6d3e182ec48df32803b7fa8c539b5fdd9801fe23..31254f99563927e28c9497fdfccd0eabae70537f 100644 (file)
@@ -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 <linux/module.h>
  
  #include <linux/sched.h>
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
 +#include <linux/sched/signal.h>
-+#endif
  #include <linux/interrupt.h>
  #include <linux/version.h>
  #include <linux/crc32.h>
-@@ -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 );
  
  
index e061e68934639837bd98559c8498eea93f918d25..223004c61898f7fb2770ec09dc0897a1dceac32f 100644 (file)
@@ -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 <linux/poll.h>
  #include <linux/types.h>
  
  
     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);
     }
  
  
     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 );
  #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));
     }
  
  
  #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))
  
     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;
  
  
              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 */
  
     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 */
index 9785bfc4c18b1972b05d1f91f40ebedddd76621e..a409d878584ebd87396a78a589a8e747b24296e4 100644 (file)
@@ -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]);
  }
  
  /**
-@@ -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*/
  
index c1d3aa8b411ba29c59fb09b7b71410df53c1c563..f2b06545dfd66d06568ca53c6140282245360dcf 100644 (file)
@@ -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,
index a1efdb7b481e7206c761c9ba94b28a877b032053..b70a5cb9d037e092cd7e65f460c7811bac882deb 100644 (file)
@@ -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))
index 8df0a31e7ea8a4e469413f9d57d4ec442acda12c..3c34830db782f67c4c304b452dd8e67eaa9d4231 100644 (file)
  #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);
index 186fdbaeb7dcb32317b86788c30bafb318cca280..85793a50506dedc38813c210ce7a1d6676a89360 100644 (file)
@@ -15,7 +15,7 @@ Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
 
 --- 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))
index 1355a1a79158d4ffd5cad78ed169dd76daa3a41e..6c828fe370beedfc82d27bb76519928c43184824 100644 (file)
@@ -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 <linux/sched.h>
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0))
 +#include <linux/sched/signal.h>
-+#endif
  
  #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
     #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17))
index 7670fe6a00e736e3fb85eb6de8ba4687b0a65ed5..c372ee0e971f8e0e0844b6962c993ef64f2c2d7f 100644 (file)
  #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
  
  /* 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);
  
index 3a5e4acd7427f31e06616b5e171108a91e39199c..7756b054098979a9bb813911e328a104b4a5432a 100644 (file)
@@ -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);
index 3bf9cefc53dada3996034876ee7aa3b8d856a36b..9d83a65c75cbf4bb6c1cde10005895a57b2400cf 100644 (file)
@@ -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
index 013dffcb878acc3cd70f20c16edba34d7f4370b9..7b2e49c865c84f4514f331231175ab5db3c8198a 100644 (file)
@@ -70,7 +70,7 @@ Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
     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 <yangshiji66@outlook.com>
  {
     DSL_int_t i;
  
-@@ -1262,7 +1262,7 @@ int __init DSL_ModuleInit(void)
+@@ -1246,7 +1246,7 @@ int __init DSL_ModuleInit(void)
     return 0;
  }
  
index a9dd957792f5bdc63c6356a267a62b0b26cd4933..6a82ac8a3f539933635435d8eb2a618023bbd499 100644 (file)
@@ -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 <linux/proc_fs.h>
  #include <linux/wait.h>
  #include <linux/vmalloc.h>
  #ifdef LINUX_2_6
  #include <linux/version.h>
  #ifndef UTS_RELEASE
-+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
-+#include <linux/autoconf.h>
- #include <linux/utsrelease.h>
-+#else
+-#include <linux/utsrelease.h>
 +#include <generated/autoconf.h>
 +#include <generated/utsrelease.h>
-+#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 <linux/version.h>
+@@ -23,7 +23,7 @@
  #ifdef CONFIG_DEBUG_MINI_BOOT
  #define IKOS_MINI_BOOT
  #endif /* */
-+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
- #include <linux/autoconf.h>
-+#ifndef UTS_RELEASE
-+#include <linux/utsrelease.h>
-+#endif
-+#else
+-#include <linux/autoconf.h>
 +#include <generated/autoconf.h>
-+#ifndef UTS_RELEASE
-+#include <generated/utsrelease.h>
-+#endif
-+#endif
  #include <linux/module.h>
  #include <linux/init.h>
  #include <linux/poll.h>
-@@ -34,7 +45,13 @@
+@@ -34,7 +34,9 @@
  #include <linux/delay.h>
  #include <linux/interrupt.h>
  #ifdef LINUX_2_6
+-#include <linux/utsrelease.h>
 +#ifndef UTS_RELEASE
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33)
- #include <linux/utsrelease.h>
-+#else
 +#include <generated/utsrelease.h>
-+#endif
 +#endif /* UTC_RELEASE */
  #else /* */
  #include <linux/uts.h>
  #include <linux/moduleparam.h>
-@@ -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 <linux/autoconf.h>
-+#else
+-#include <linux/autoconf.h>
 +#include <generated/autoconf.h>
-+#endif
  #include <linux/interrupt.h>
  #include <linux/delay.h>
  
-@@ -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 <linux/autoconf.h>
-+#else
+-#include <linux/autoconf.h>
 +#include <generated/autoconf.h>
-+#endif
  
  /* lib_ifxos headers */
  #include "ifx_types.h"
     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 <linux/fs.h>
  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));
index 340a3d55c86d63f64c2d670c51a3950a12315751..def17fe687b34058beefc32810512f6a30c0036e 100644 (file)
@@ -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                */
  #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)
     {
        {
 --- 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      */
  
  #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 <asm/ifx/ifx_regs.h>
 -#include <asm/ifx/ifx_gptu.h>
-+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28))
-+#  include <lantiq.h>
-+#  include <linux/irq.h>
-+#  include <lantiq_timer.h>
++#include <lantiq.h>
++#include <linux/irq.h>
++#include <lantiq_timer.h>
 +
-+#  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 <asm/ifx/ifx_regs.h>
-+#  include <asm/ifx/ifx_gptu.h>
-+#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 /* */
  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)
  {
     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)
  {
     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)
  {
  
     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)
  {
  
     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));
        {
           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)
  {
  
     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;
  
     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));
     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. */
     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;
  
     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;
     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));
     }
     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;
     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) &&
              {
                 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) &&
              {
                 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;
  
     /* 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;
  
     /* 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;
  }
  
  /**
-@@ -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)
  {
     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)
  {
     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 /* */
     /* 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
        }
     }
  
     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];
     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 ()
  {
     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 */
  #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 <asm/ifx/ifx_regs.h>
 -#include <asm/ifx/ifx_gpio.h>
 -#include <asm/ifx/common_routines.h>
-+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28))
-+#  include <lantiq.h>
-+#  include <linux/irq.h>
-+#  include <lantiq_timer.h>
-+#  include <linux/dma-mapping.h>
++#include <lantiq.h>
++#include <linux/irq.h>
++#include <lantiq_timer.h>
++#include <linux/dma-mapping.h>
 +
 +
 +#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 <asm/ifx/ifx_regs.h>
-+#  include <asm/ifx_vpe.h>
-+#  include <asm/ifx/ifx_gpio.h>
-+#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;
 +{
 +      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 */
     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;
     }
  
     /* 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()
  {
     /* 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 <asm/ifx/ifx_regs.h>
 -#include <asm/ifx_vpe.h>
-+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,28))
-+#  include <lantiq.h>
-+#  include <linux/irq.h>
-+#  include <lantiq_soc.h>
-+#  include <linux/gpio.h>
++#include <lantiq.h>
++#include <linux/irq.h>
++#include <lantiq_soc.h>
++#include <linux/gpio.h>
 +#define IFXMIPS_MPS_SRAM              ((u32 *)(KSEG1 + 0x1F200000))
 +#define IFXMIPS_MPS_BASE_ADDR         (KSEG1 + 0x1F107000)
 +#define IFXMIPS_MPS_CHIPID            ((u32 *)(IFXMIPS_MPS_BASE_ADDR + 0x0344))
 +#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 <asm/ifx/ifx_regs.h>
-+#  include <asm/ifx_vpe.h>
-+#endif
 +/* MPS register */
 +#  define IFX_MPS_AD0ENR      IFXMIPS_MPS_AD0ENR
 +#  define IFX_MPS_AD1ENR      IFXMIPS_MPS_AD1ENR
  
  /* ============================= */
  /* MPS Common defines            */
-@@ -26,32 +76,28 @@
+@@ -26,32 +71,28 @@
  #define MPS_BASEADDRESS 0xBF107000
  #define MPS_RAD0SR      MPS_BASEADDRESS + 0x0004
  
  /*---------------------------------------------------------------------------*/
  
  /*---------------------------------------------------------------------------*/
-@@ -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
  {
 --- 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 <linux/moduleparam.h>
  #endif /* */
  
  
  /* 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:
           {
  
              /* 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:
           {
  
              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);
     }
     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;
     }
  
     /* 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 ();
  
index dd6451b52d746d55272f68f9f056608e34eacc4d..b3ba5c2251411ae9cfa2b824157cc6ae87822e77 100644 (file)
@@ -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
index efd3f853ec73a0d0e1aebfca1731b4501f7a7bb4..19caae76647c3bcd15f53919aa4db5ecddd7f5dc 100644 (file)
  #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 */
     /* 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 ();
  #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*/
 +#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 <asm/ifx/ifx_regs.h>
- #  include <asm/ifx/ifx_gptu.h>
- #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 <sys1_reg.h>
 +#include <sysctrl.h>
 +#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 */
             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;
  }
  
  /**
-@@ -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;
  }
  
  /**
-@@ -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;
  
     /* 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;
  
     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];
  
     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 ()
  {
     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 */
     /* 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);
     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)
  {
     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);
  /**
 --- a/src/mps/drv_mps_vmmc_device.h
 +++ b/src/mps/drv_mps_vmmc_device.h
-@@ -22,7 +22,12 @@
- #  include <lantiq_soc.h>
- #  include <linux/gpio.h>
+@@ -21,7 +21,12 @@
+ #include <lantiq_soc.h>
+ #include <linux/gpio.h>
  #define IFXMIPS_MPS_SRAM              ((u32 *)(KSEG1 + 0x1F200000))
 +#if defined(SYSTEM_FALCON)
 +#define IFXMIPS_MPS_BASE_ADDR         (KSEG1 + 0x1D004000)
  #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            */
  /* ============================= */
  
  #define VCPU_BASEADDRESS 0xBF208000     /* 0xBF108000 */
  /*---------------------------------------------------------------------------*/
  #if !defined(CONFIG_LANTIQ)
-@@ -118,7 +124,6 @@
+@@ -113,7 +119,6 @@
  /*---------------------------------------------------------------------------*/
  
  #ifdef CONFIG_MPS_EVENT_MBX
  #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
  {
     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];
     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];
  
 --- 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;
     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;
  
index f95407b39560082fad599e7d62a9ea4afe449807..741a946c314d4acfed8c90f3a8510bff3a9893f2 100644 (file)
@@ -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) */
index b99255692bda7e9799af62eca06de1c188fb8825..dfcf6606a4ea9e9ebd8cff07dd1e7be5b56b576c 100644 (file)
@@ -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
index 0ebaef3b9d68f1a00cd1b3fd5fd033dbc3112517..ddd4a58a249c538f7ddc24ade9e1c55551086c5c 100644 (file)
@@ -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 */
index f6ab6792ec713506d78cbbd5806b1a556d582087..a0641c15f24de653c95022ae716afbba56abea8b 100644 (file)
@@ -32,7 +32,7 @@ Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
 
 --- 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 <yangshiji66@outlook.com>
  
  #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 <yangshiji66@outlook.com>
  #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 <yangshiji66@outlook.com>
  
 --- 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 <yangshiji66@outlook.com>
  
  /* ============================= */
  /* 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 <yangshiji66@outlook.com>
        /* 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 (file)
index 4444360..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-From: Shiji Yang <yangshiji66@outlook.com>
-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 <yangshiji66@outlook.com>
----
- 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;
index 3457779776d9f5f74c266ff849fd5a9a59f9eb36..3772cf9ac6b35a6bd3a55e6882b1ce85d1fb06a5 100644 (file)
                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);
index ab6139b73eee9ae32421c6a7127121819a717075..9efbbac80b54d76f82106b7c5bc3d5fb83acca21 100644 (file)
@@ -24,7 +24,6 @@
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/version.h>
 #include <linux/init.h>
 #include <linux/types.h>
 #include <linux/interrupt.h>
index 81e32369baefccc177a27dc0c8c3b604ee8dfcc9..5e2ee71c4ae8f4a3a7d4db3f5c7eff47f5b0c012 100644 (file)
@@ -1,18 +1,16 @@
 --- a/dcdp/atm_tc.c
 +++ b/dcdp/atm_tc.c
-@@ -44,9 +44,9 @@
+@@ -44,9 +44,7 @@
  #include <linux/atmioc.h>
  #include <linux/skbuff.h>
  #include "inc/dsl_tc.h"
 -#include <net/datapath_proc_api.h>
-+// #include <net/datapath_proc_api.h>
  #include <linux/atm.h>
 -#include <net/datapath_api.h>
-+// #include <net/datapath_api.h>
  #include <net/dc_ep.h>
  #include<linux/sched.h>
  #include<linux/kthread.h>
-@@ -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)) {
                    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
 -      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;
  
                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;
        }
        //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;
        }
  
  }
  
  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++;
                        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 {
  
  #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);
  
  
  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
  }
  
  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;
  }
  
  {
        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;
  }
  
  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");
  {
        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;
  
                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};
        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;
        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;
  #include <net/genetlink.h>
  #include <linux/time.h>
  #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;
  
                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);
  }
  
  };
  
  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));
  }
  
  };
  
  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));
  }
  
  };
  
  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));
  }
  
  };
  
  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;
  }
  
  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;
  }
  
  };
  
  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));
  }
  
  };
  
  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;
  
  
        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));
  }
  
  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));
  }
  
  };
  
  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;
        }
  
                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:
  }
  
  
  };
  
  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));
  }
  
  };
  
  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));
  }
  
  };
  
  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));
  }
  
  };
  
  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);
  }
  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));
  
                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;
  }
  
  };
  
  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
  
  
  
  };
  
  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));
  }
  
  };
  
  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));
  }
  
  };
  
  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,
  };
  
  };
  
  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;
  }
  
  };
  
  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);
  }
  
index 5c7b24654538e5d86d09fd011af513b69ee9198f..51e9012d114317331faf8872e7b513d7a8646d7b 100644 (file)
@@ -13,7 +13,7 @@ Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
 --
 --- 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 <ryazanov.s.a@gmail.com>
        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 <ryazanov.s.a@gmail.com>
  
        /* 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 <ryazanov.s.a@gmail.com>
                        (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 <ryazanov.s.a@gmail.com>
        }
  
        /* 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:
index 930fa6632c373f4ca646927a957337dcce6ca971..9320a1535d58dbffd9a166387b0f2d158ad489f5 100644 (file)
@@ -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 = &param.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 = &param.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 = &param.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 = &param.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 = &param.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 = &param.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 = &param.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 = &param.aca_rxin;
index 134f119f3c05fd07bf44a6cf4945f2b40362d29f..84a8714d34641e6abbe48c383fce7707d79ae187 100644 (file)
@@ -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(&param, 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;
  }
  
index 75d18138c0803ccba46340c2667b13312994f4b4..b0caf0b79b0d18c148676bdf6dc070c4872928ee 100644 (file)
        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);
  }
  
  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,
        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");
  #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");
  #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;
  
                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,
  }
  
  /**
-@@ -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,
  
        /* 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;
index 1b70a663cdd54a5f84ef142facd91e8d22fde8e5..bf39579a233498702465e8e4c5e9a3084bf18c6c 100644 (file)
@@ -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);
index e239ba33466c39bfd615858a71a2d75ebc373a8e..0c86db299f1a4b039d0116ccc9169bc7c6c9ef5b 100644 (file)
@@ -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;
index 54a21187ff838f3aa06e8cf0933057b33bdb4d87..c5fe442cbb2ffd62816163642f3553852ea90a29 100644 (file)
@@ -24,7 +24,7 @@ Signed-off-by: Andrew MacIntyre <andymac@pcug.org.au>
 
 --- 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;
index f268c0908cb28aa8c3cfa9363237046f59feefd8..ad27e6216a0726bbc07907b23fc07aaf3beca2ae 100644 (file)
@@ -23,7 +23,7 @@ Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
 ---
 --- 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 <ryazanov.s.a@gmail.com>
                                
        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;
index 855da162c3c71719147c209ce9f211cf8fd40821..6b0e08a7b2ed1f448e82fd91edb2e4299fd8d9df 100644 (file)
@@ -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;
index 562e349786049d50d421ed1554b9c3664edd97b8..8af643c4e66403f9d98f03224255a00867b2b65c 100644 (file)
@@ -15,7 +15,7 @@ Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
 
 --- 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 <yangshiji66@outlook.com>
  #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 <yangshiji66@outlook.com>
        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;
  }