#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>
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;
}
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
*/
{
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>
#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 */
{
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;
}
{
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)*/
}
#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*/
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
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
*/
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));
/*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 */
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 */
--- 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
--- 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);*/
}
--- 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,
*/
#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>
*/
#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>
*/
#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>
*/
#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>
#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>
#include <linux/atm.h>
#include <linux/clk.h>
#include <linux/interrupt.h>
-#include <linux/version.h>
#ifdef CONFIG_XFRM
#include <net/xfrm.h>
#endif
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
#include <linux/modeversions>
#endif
-#include <linux/version.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/proc_fs.h>
*/
/* Project header */
-#include <linux/version.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/types.h>
*/
/* Project Header Files */
-#include <linux/version.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/types.h>
*/
/* Project header */
-#include <linux/version.h>
#if defined(CONFIG_MODVERSIONS)
#define MODVERSIONS
#include <linux/modversions.h>
#define IFXMIPS_DEU_AR9_H
/* Project Header Files */
-#include <linux/version.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/types.h>
#define IFXMIPS_DEU_DANUBE_H
/* Project Header Files */
-#include <linux/version.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/types.h>
#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)
#define IFXMIPS_DEU_VR9_H
/* Project Header Files */
-#include <linux/version.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/types.h>
#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>
#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>
--- 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,
/*
* Common Head File
*/
-#include <linux/version.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/types.h>
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
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);
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;
-#include <linux/version.h>
#include <linux/netdevice.h>
#include <lantiq_ptm.h>
#include "ifxmips_ptm_common.h"
*/
#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>
*/
#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>
*/
#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>
*/
#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>
** 07 JUL 2009 Xu Liang Init Version
*******************************************************************************/
-#include <linux/version.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/types.h>
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);
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;
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);
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");
#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"
*/
#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>
#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);
--- 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*/
--- 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 */
--- 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 @@
--- 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 */
--- 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
--- 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);
+++ /dev/null
---- 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)
--- 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... */
--- 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));
}
#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 */
}
-@@ -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);
}
-@@ -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)
{
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)
{
}
#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)
{
#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 */
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 */
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 */
/* 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
--- 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
{
--- 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 */
{
DSL_int_t i;
-@@ -1457,7 +1457,7 @@ void DSL_ModuleCleanup(void)
+@@ -1453,7 +1453,7 @@ void DSL_ModuleCleanup(void)
return;
}
--- 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 );
--- 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)
{
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;
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 */
--- 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*/
#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,
--- 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))
#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);
-
--- 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))
--- 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))
#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);
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;
}
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);
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
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 */
{
DSL_int_t i;
-@@ -1262,7 +1262,7 @@ int __init DSL_ModuleInit(void)
+@@ -1246,7 +1246,7 @@ int __init DSL_ModuleInit(void)
return 0;
}
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));
--- 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 ();
--- 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) */
/* ============================= */
/* 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"
/* ============================= */
/* 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
#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
#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
#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;
--- 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);
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) */
--- 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.
*/
/**
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
--- 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);
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 ();
#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;
#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);
#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 */
#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 /* */
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)
{
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 */
--- 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
#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. */
#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;
--- 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 */
/* ============================= */
/* ============================= */
/* 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. */
/* 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;
+++ /dev/null
-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;
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.
*/
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);
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);
#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>
--- 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);
}
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);
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);
}
--
--- 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:
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 */
/* 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 >
(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:
}
/* 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:
--- a/dcdp/atm_tc.c
+++ b/dcdp/atm_tc.c
-@@ -545,7 +545,11 @@ static void atm_aca_init(struct atm_priv
+@@ -543,7 +543,11 @@ static void atm_aca_init(struct atm_priv
cfg = &priv->tc_priv->cfg;
txin = ¶m.aca_txin;
txin->hd_size_in_dw = cfg->txin.soc_desc_dwsz;
txin->pd_desc_base = SB_XBAR_ADDR(__ACA_TX_IN_PD_LIST_BASE);
txin->pd_desc_num = __ACA_TX_IN_PD_LIST_NUM;
-@@ -567,7 +571,11 @@ static void atm_aca_init(struct atm_priv
+@@ -565,7 +569,11 @@ static void atm_aca_init(struct atm_priv
txin->soc_cmlt_cnt_addr);
txout = ¶m.aca_txout;
txout->hd_size_in_dw = cfg->txout.soc_desc_dwsz;
txout->pd_desc_base = SB_XBAR_ADDR(__ACA_TX_OUT_PD_LIST_BASE);
txout->pd_desc_num = __ACA_TX_OUT_PD_LIST_NUM;
-@@ -589,7 +597,11 @@ static void atm_aca_init(struct atm_priv
+@@ -587,7 +595,11 @@ static void atm_aca_init(struct atm_priv
txout->soc_cmlt_cnt_addr);
rxout = ¶m.aca_rxout;
rxout->hd_size_in_dw = cfg->rxout.soc_desc_dwsz;
rxout->pd_desc_base = SB_XBAR_ADDR(__ACA_RX_OUT_PD_LIST_BASE);
rxout->pd_desc_num = __ACA_RX_OUT_PD_LIST_NUM;
-@@ -611,7 +623,11 @@ static void atm_aca_init(struct atm_priv
+@@ -609,7 +621,11 @@ static void atm_aca_init(struct atm_priv
rxout->soc_cmlt_cnt_addr);
rxin = ¶m.aca_rxin;
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;
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);
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;
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;
}
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};
if (!dev) {
tc_dbg(tc_priv, MSG_INIT, "Cannot alloc net device\n");
return -ENOMEM;
-@@ -2337,7 +2340,11 @@ static void ptm_aca_init(struct ptm_ep_p
+@@ -2335,7 +2338,11 @@ static void ptm_aca_init(struct ptm_ep_p
cfg = &priv->tc_priv->cfg;
txin = ¶m.aca_txin;
txin->hd_size_in_dw = cfg->txin.soc_desc_dwsz;
txin->pd_desc_base = SB_XBAR_ADDR(__ACA_TX_IN_PD_LIST_BASE);
txin->pd_desc_num = __ACA_TX_IN_PD_LIST_NUM;
-@@ -2360,7 +2367,11 @@ static void ptm_aca_init(struct ptm_ep_p
+@@ -2358,7 +2365,11 @@ static void ptm_aca_init(struct ptm_ep_p
txin->soc_cmlt_cnt_addr);
txout = ¶m.aca_txout;
txout->hd_size_in_dw = cfg->txout.soc_desc_dwsz;
if (priv->tc_priv->param.cdma_desc_loc == LOC_IN_FPI)
txout->pd_desc_base = sb_r32(__TX_OUT_SHADOW_PTR) - phybase;
-@@ -2386,7 +2397,11 @@ static void ptm_aca_init(struct ptm_ep_p
+@@ -2384,7 +2395,11 @@ static void ptm_aca_init(struct ptm_ep_p
txout->soc_cmlt_cnt_addr);
rxout = ¶m.aca_rxout;
rxout->hd_size_in_dw = cfg->rxout.soc_desc_dwsz;
if (priv->tc_priv->param.cdma_desc_loc == LOC_IN_FPI)
rxout->pd_desc_base = sb_r32(__RX_OUT_SHADOW_PTR) - phybase;
-@@ -2412,7 +2427,11 @@ static void ptm_aca_init(struct ptm_ep_p
+@@ -2410,7 +2425,11 @@ static void ptm_aca_init(struct ptm_ep_p
rxout->soc_cmlt_cnt_addr);
rxin = ¶m.aca_rxin;
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
};
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;
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;
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;
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;
/* 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;
/**
* 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 */
/* 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};
/* 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;
priv->tc_priv->tc_ops.soc_cfg_get(&priv->tc_priv->cfg, ptm_id(priv));
memset(¶m, 0, sizeof(param));
-@@ -2347,7 +2388,11 @@ static void ptm_aca_init(struct ptm_ep_p
+@@ -2345,7 +2386,11 @@ static void ptm_aca_init(struct ptm_ep_p
#endif
txin->hd_size_in_dw = cfg->txin.soc_desc_dwsz;
txin->pd_desc_base = SB_XBAR_ADDR(__ACA_TX_IN_PD_LIST_BASE);
--- 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));
#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,
};
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},
};
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;
}
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;
--- 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);
}
{
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);
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);
--- 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;
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);
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);
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;
--- 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;
---
--- 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);
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;
--- 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;
--- 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
*/
#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);
}
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;
}