Initial commit
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -253,10 +253,7 @@ else
|
||||
drv_dsl_cpe_api_common_mod_cflags =
|
||||
endif
|
||||
|
||||
-drv_dsl_cpe_api_common_cflags = -DLINUX -D__LINUX__ -D__KERNEL__ -DEXPORT_SYMTAB \
|
||||
- -pipe -Wall -Wformat -Wimplicit -Wunused -Wswitch -Wcomment -Winline \
|
||||
- -Wuninitialized -Wparentheses -Wsign-compare -Wreturn-type \
|
||||
- -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common
|
||||
+drv_dsl_cpe_api_common_cflags = -DLINUX -D__LINUX__ -D__KERNEL__ -DEXPORT_SYMTAB
|
||||
|
||||
if DSL_DBG_MAX_LEVEL_SET
|
||||
drv_dsl_cpe_api_common_cflags += -DDSL_DBG_MAX_LEVEL=$(DSL_DBG_MAX_LEVEL_PRE)
|
||||
@@ -266,7 +263,7 @@ endif
|
||||
drv_dsl_cpe_api_target_cflags = $(ADD_DRV_CFLAGS)
|
||||
|
||||
# compile cflags
|
||||
-drv_dsl_cpe_api_compile_cflags = $(EXTRA_DRV_CFLAGS)
|
||||
+drv_dsl_cpe_api_compile_cflags =
|
||||
|
||||
if !KERNEL_2_6
|
||||
# the headerfile of linux kernels 2.6.x contain to much arithmetic
|
||||
@@ -314,7 +311,7 @@ drv_dsl_cpe_api.ko: $(drv_dsl_cpe_api_SO
|
||||
@echo -e "# drv_dsl_cpe_api: Generated to build Linux 2.6.x kernel object" > $(PWD)/Kbuild
|
||||
@echo -e "obj-m := $(subst .ko,.o,$@)" >> $(PWD)/Kbuild
|
||||
@echo -e "$(subst .ko,,$@)-y := $(drv_dsl_cpe_api_OBJS)" >> $(PWD)/Kbuild
|
||||
- @echo -e "EXTRA_CFLAGS := $(CFLAGS) -DHAVE_CONFIG_H $(drv_dsl_cpe_api_CFLAGS) $(DSL_DRIVER_INCL_PATH) $(IFXOS_INCLUDE_PATH) -I@abs_srcdir@/include -I$(PWD)/include" >> $(PWD)/Kbuild
|
||||
+ @echo -e "EXTRA_CFLAGS := -DHAVE_CONFIG_H $(drv_dsl_cpe_api_CFLAGS) $(DSL_DRIVER_INCL_PATH) $(IFXOS_INCLUDE_PATH) -I@abs_srcdir@/include -I$(PWD)/include" >> $(PWD)/Kbuild
|
||||
$(MAKE) ARCH=@KERNEL_ARCH@ -C @KERNEL_BUILD_PATH@ O=@KERNEL_BUILD_PATH@ M=$(PWD) modules
|
||||
|
||||
clean-generic:
|
||||
1061
package/kernel/lantiq/ltq-adsl/patches/100-dsl_compat.patch
Normal file
1061
package/kernel/lantiq/ltq-adsl/patches/100-dsl_compat.patch
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,11 @@
|
||||
--- a/src/device/drv_dsl_cpe_device_danube.c
|
||||
+++ b/src/device/drv_dsl_cpe_device_danube.c
|
||||
@@ -4069,7 +4069,7 @@ static DSL_Error_t DSL_DRV_DANUBE_XTUSys
|
||||
|
||||
DSL_CTX_WRITE(pContext, nErrCode, xtseCurr, xtseCurr);
|
||||
|
||||
- for (nRetry = 0; nRetry < 20; nRetry++)
|
||||
+ for (nRetry = 0; nRetry < 20 && bStatusUpdated == DSL_FALSE; nRetry++)
|
||||
{
|
||||
/* Get STAT1 info*/
|
||||
nErrCode = DSL_DRV_DANUBE_CmvRead(pContext, DSL_CMV_GROUP_STAT,
|
||||
70
package/kernel/lantiq/ltq-adsl/patches/120-platform.patch
Normal file
70
package/kernel/lantiq/ltq-adsl/patches/120-platform.patch
Normal file
@@ -0,0 +1,70 @@
|
||||
--- a/src/common/drv_dsl_cpe_os_linux.c
|
||||
+++ b/src/common/drv_dsl_cpe_os_linux.c
|
||||
@@ -11,7 +11,7 @@
|
||||
#ifdef __LINUX__
|
||||
|
||||
#define DSL_INTERN
|
||||
-#include <linux/device.h>
|
||||
+#include <linux/of_platform.h>
|
||||
|
||||
#include "drv_dsl_cpe_api.h"
|
||||
#include "drv_dsl_cpe_api_ioctl.h"
|
||||
@@ -1070,7 +1070,7 @@ static void DSL_DRV_DebugInit(void)
|
||||
#endif
|
||||
|
||||
/* Entry point of driver */
|
||||
-int __init DSL_ModuleInit(void)
|
||||
+static int __devinit ltq_adsl_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct class *dsl_class;
|
||||
DSL_int_t i;
|
||||
@@ -1128,7 +1128,7 @@ int __init DSL_ModuleInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-void __exit DSL_ModuleCleanup(void)
|
||||
+static int __devexit ltq_adsl_remove(struct platform_device *pdev)
|
||||
{
|
||||
printk("Module will be unloaded"DSL_DRV_CRLF);
|
||||
|
||||
@@ -1143,7 +1143,7 @@ void __exit DSL_ModuleCleanup(void)
|
||||
(DSL_uint8_t**)&g_BndFpgaBase);
|
||||
#endif /* defined(INCLUDE_DSL_CPE_API_VINAX) && defined(INCLUDE_DSL_BONDING)*/
|
||||
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
#ifndef _lint
|
||||
@@ -1159,8 +1159,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*/
|
||||
|
||||
-module_init(DSL_ModuleInit);
|
||||
-module_exit(DSL_ModuleCleanup);
|
||||
+static const struct of_device_id ltq_adsl_match[] = {
|
||||
+#ifdef CONFIG_DANUBE
|
||||
+ { .compatible = "lantiq,adsl-danube"},
|
||||
+#elif defined CONFIG_AMAZON_SE
|
||||
+ { .compatible = "lantiq,adsl-ase"},
|
||||
+#elif defined CONFIG_AR9
|
||||
+ { .compatible = "lantiq,adsl-arx100"},
|
||||
+#endif
|
||||
+ {},
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(of, ltq_adsl_match);
|
||||
+
|
||||
+static struct platform_driver ltq_adsl_driver = {
|
||||
+ .probe = ltq_adsl_probe,
|
||||
+ .remove = __devexit_p(ltq_adsl_remove),
|
||||
+ .driver = {
|
||||
+ .name = "adsl",
|
||||
+ .of_match_table = ltq_adsl_match,
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+module_platform_driver(ltq_adsl_driver);
|
||||
+
|
||||
#endif /* #ifndef _lint*/
|
||||
|
||||
//EXPORT_SYMBOL(DSL_ModuleInit);
|
||||
137
package/kernel/lantiq/ltq-adsl/patches/130-linux3.8.patch
Normal file
137
package/kernel/lantiq/ltq-adsl/patches/130-linux3.8.patch
Normal file
@@ -0,0 +1,137 @@
|
||||
--- a/src/common/drv_dsl_cpe_os_linux.c
|
||||
+++ b/src/common/drv_dsl_cpe_os_linux.c
|
||||
@@ -11,6 +11,7 @@
|
||||
#ifdef __LINUX__
|
||||
|
||||
#define DSL_INTERN
|
||||
+#include <linux/kthread.h>
|
||||
#include <linux/of_platform.h>
|
||||
|
||||
#include "drv_dsl_cpe_api.h"
|
||||
@@ -39,7 +40,7 @@ static DSL_ssize_t DSL_DRV_Write(DSL_DRV
|
||||
static DSL_int_t DSL_DRV_Ioctls(DSL_DRV_inode_t * pINode, DSL_DRV_file_t * pFile,
|
||||
DSL_uint_t nCommand, unsigned long nArg);
|
||||
#else
|
||||
-static DSL_int_t DSL_DRV_Ioctls(DSL_DRV_file_t * pFile,
|
||||
+static long DSL_DRV_Ioctls(DSL_DRV_file_t * pFile,
|
||||
DSL_uint_t nCommand, unsigned long nArg);
|
||||
#endif
|
||||
static int DSL_DRV_Open(DSL_DRV_inode_t * ino, DSL_DRV_file_t * fil);
|
||||
@@ -183,7 +184,7 @@ static DSL_int_t DSL_DRV_Ioctls(DSL_DRV_
|
||||
DSL_uint_t nCommand,
|
||||
unsigned long nArg)
|
||||
#else
|
||||
-static DSL_int_t DSL_DRV_Ioctls(
|
||||
+static long DSL_DRV_Ioctls(
|
||||
DSL_DRV_file_t * pFile,
|
||||
DSL_uint_t nCommand,
|
||||
unsigned long nArg)
|
||||
@@ -520,9 +521,9 @@ DSL_void_t* DSL_IoctlMemCpyTo(
|
||||
- IFX_SUCCESS on success
|
||||
- IFX_ERROR on error
|
||||
*/
|
||||
-DSL_DRV_STATIC DSL_int32_t DSL_DRV_KernelThreadStartup(
|
||||
- DSL_DRV_ThreadCtrl_t *pThrCntrl)
|
||||
+static int DSL_DRV_KernelThreadStartup(void *data)
|
||||
{
|
||||
+ DSL_DRV_ThreadCtrl_t *pThrCntrl = (DSL_DRV_ThreadCtrl_t*) data;
|
||||
DSL_int32_t retVal = -1;
|
||||
#ifndef _lint
|
||||
|
||||
@@ -545,30 +546,6 @@ DSL_DRV_STATIC DSL_int32_t DSL_DRV_Kerne
|
||||
(DSL_NULL, "ENTER - Kernel Thread Startup <%s>" DSL_DRV_CRLF,
|
||||
pThrCntrl->thrParams.pName));
|
||||
|
||||
- /* do LINUX specific setup */
|
||||
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0))
|
||||
- daemonize();
|
||||
- reparent_to_init();
|
||||
-
|
||||
- /* lock the kernel. A new kernel thread starts without
|
||||
- the big kernel lock, regardless of the lock state
|
||||
- of the creator (the lock level is *not* inheritated)
|
||||
- */
|
||||
- lock_kernel();
|
||||
-
|
||||
- /* Don't care about any signals. */
|
||||
- siginitsetinv(¤t->blocked, 0);
|
||||
-
|
||||
- /* set name of this process */
|
||||
- strcpy(kthread->comm, pThrCntrl->thrParams.pName);
|
||||
-
|
||||
- /* let others run */
|
||||
- unlock_kernel();
|
||||
-#else
|
||||
- daemonize(pThrCntrl->thrParams.pName);
|
||||
-
|
||||
-#endif
|
||||
-
|
||||
/*DSL_DRV_ThreadPriorityModify(pThrCntrl->nPriority);*/
|
||||
|
||||
pThrCntrl->thrParams.bRunning = 1;
|
||||
@@ -638,9 +615,7 @@ DSL_int32_t DSL_DRV_ThreadInit(
|
||||
init_completion(&pThrCntrl->thrCompletion);
|
||||
|
||||
/* start kernel thread via the wrapper function */
|
||||
- pThrCntrl->pid = kernel_thread( (DSL_DRV_KERNEL_THREAD_StartRoutine)DSL_DRV_KernelThreadStartup,
|
||||
- (void *)pThrCntrl,
|
||||
- DSL_DRV_DRV_THREAD_OPTIONS);
|
||||
+ pThrCntrl->pid = kthread_run(DSL_DRV_KernelThreadStartup, (void *)pThrCntrl, pThrCntrl->thrParams.pName);
|
||||
|
||||
pThrCntrl->bValid = DSL_TRUE;
|
||||
|
||||
@@ -1070,12 +1045,12 @@ static void DSL_DRV_DebugInit(void)
|
||||
#endif
|
||||
|
||||
/* Entry point of driver */
|
||||
-static int __devinit ltq_adsl_probe(struct platform_device *pdev)
|
||||
+static int ltq_adsl_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct class *dsl_class;
|
||||
DSL_int_t i;
|
||||
|
||||
- printk(DSL_DRV_CRLF DSL_DRV_CRLF "Infineon CPE API Driver version: %s" DSL_DRV_CRLF,
|
||||
+ printk("Infineon CPE API Driver version: %s" DSL_DRV_CRLF,
|
||||
&(dsl_cpe_api_version[4]));
|
||||
|
||||
DSL_DRV_MemSet( ifxDevices, 0, sizeof(DSL_devCtx_t) * DSL_DRV_MAX_DEVICE_NUMBER );
|
||||
@@ -1128,7 +1103,7 @@ static int __devinit ltq_adsl_probe(stru
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int __devexit ltq_adsl_remove(struct platform_device *pdev)
|
||||
+static int ltq_adsl_remove(struct platform_device *pdev)
|
||||
{
|
||||
printk("Module will be unloaded"DSL_DRV_CRLF);
|
||||
|
||||
@@ -1173,7 +1148,7 @@ MODULE_DEVICE_TABLE(of, ltq_adsl_match);
|
||||
|
||||
static struct platform_driver ltq_adsl_driver = {
|
||||
.probe = ltq_adsl_probe,
|
||||
- .remove = __devexit_p(ltq_adsl_remove),
|
||||
+ .remove = ltq_adsl_remove,
|
||||
.driver = {
|
||||
.name = "adsl",
|
||||
.owner = THIS_MODULE,
|
||||
--- a/src/include/drv_dsl_cpe_os_lint_map.h
|
||||
+++ b/src/include/drv_dsl_cpe_os_lint_map.h
|
||||
@@ -247,7 +247,7 @@ typedef struct
|
||||
DSL_DRV_ThreadFunction_t pThrFct;
|
||||
|
||||
/** Kernel thread process ID */
|
||||
- DSL_int32_t pid;
|
||||
+ struct task_struct *pid;
|
||||
|
||||
/** requested kernel thread priority */
|
||||
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
|
||||
DSL_DRV_ThreadFunction_t pThrFct;
|
||||
|
||||
/** Kernel thread process ID */
|
||||
- DSL_int32_t pid;
|
||||
+ struct task_struct *pid;
|
||||
|
||||
/** requested kernel thread priority */
|
||||
DSL_int32_t nPriority;
|
||||
30
package/kernel/lantiq/ltq-adsl/patches/140-linux_3.18.patch
Normal file
30
package/kernel/lantiq/ltq-adsl/patches/140-linux_3.18.patch
Normal file
@@ -0,0 +1,30 @@
|
||||
--- 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
|
||||
#define DSL_DRV_MUTEX_LOCK(id) down_interruptible(&(id))
|
||||
#define DSL_DRV_MUTEX_UNLOCK(id) up(&(id))
|
||||
#endif
|
||||
+
|
||||
+static inline long
|
||||
+ugly_hack_sleep_on_timeout(wait_queue_head_t *q, long timeout)
|
||||
+{
|
||||
+ DEFINE_WAIT(wait);
|
||||
+
|
||||
+ prepare_to_wait(q, &wait, TASK_INTERRUPTIBLE);
|
||||
+ timeout = schedule_timeout(timeout);
|
||||
+ finish_wait(q, &wait);
|
||||
+
|
||||
+ return timeout;
|
||||
+}
|
||||
+
|
||||
#define DSL_DRV_INIT_WAKELIST(name,queue) init_waitqueue_head(&(queue))
|
||||
#define DSL_DRV_WAKEUP_WAKELIST(queue) wake_up_interruptible(&(queue))
|
||||
#define DSL_DRV_INIT_EVENT(name,ev) init_waitqueue_head(&(ev))
|
||||
/* wait for an event, timeout is measured in ms */
|
||||
-#define DSL_DRV_WAIT_EVENT_TIMEOUT(ev,t) interruptible_sleep_on_timeout(&(ev), (t) * HZ / 1000)
|
||||
-#define DSL_DRV_WAIT_EVENT(ev) interruptible_sleep_on(&(ev))
|
||||
+#define DSL_DRV_WAIT_EVENT_TIMEOUT(ev,t) ugly_hack_sleep_on_timeout(&(ev), (t) * HZ / 1000)
|
||||
+#define DSL_DRV_WAIT_EVENT(ev) ugly_hack_sleep_on_timeout(&(ev), MAX_SCHEDULE_TIMEOUT)
|
||||
#define DSL_DRV_WAKEUP_EVENT(ev) wake_up_interruptible(&(ev))
|
||||
#define DSL_DRV_TimeMSecGet() DSL_DRV_ElapsedTimeMSecGet(0)
|
||||
#define DSL_WAIT(ms) msleep(ms)
|
||||
14
package/kernel/lantiq/ltq-adsl/patches/150-linux_5.9.patch
Normal file
14
package/kernel/lantiq/ltq-adsl/patches/150-linux_5.9.patch
Normal file
@@ -0,0 +1,14 @@
|
||||
--- a/src/common/drv_dsl_cpe_os_linux.c
|
||||
+++ b/src/common/drv_dsl_cpe_os_linux.c
|
||||
@@ -417,7 +417,11 @@ 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);
|
||||
+#endif
|
||||
/* return vmalloc(nSize);*/
|
||||
}
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
--- a/src/include/drv_dsl_cpe_pm_core.h
|
||||
+++ b/src/include/drv_dsl_cpe_pm_core.h
|
||||
@@ -1525,9 +1525,9 @@ typedef struct
|
||||
DSL_boolean_t bShowtimeProcessingStart;
|
||||
/** Showtime reached flag*/
|
||||
DSL_boolean_t bShowtimeInvTrigger;
|
||||
- /** Current Showtime synchronization time to be used, (msec) */
|
||||
+ /** Current Showtime synchronization time to be used, (sec) */
|
||||
DSL_uint32_t nCurrShowtimeTime;
|
||||
- /** Showtime synchronization time to be used, (msec) */
|
||||
+ /** Showtime synchronization time to be used, (sec) */
|
||||
DSL_uint32_t nElapsedShowtimeTime;
|
||||
/** Actual Line state*/
|
||||
DSL_LineStateValue_t nLineState;
|
||||
--- a/src/pm/drv_dsl_cpe_api_pm.c
|
||||
+++ b/src/pm/drv_dsl_cpe_api_pm.c
|
||||
@@ -1445,7 +1445,7 @@ DSL_Error_t DSL_DRV_PM_ChannelCountersTo
|
||||
}
|
||||
|
||||
/* Fill Total Counters elapsed time*/
|
||||
- pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime/DSL_PM_MSEC;
|
||||
+ pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime;
|
||||
|
||||
pChCounters = DSL_DRV_PM_PTR_CHANNEL_COUNTERS_TOTAL(pCounters->nChannel,pCounters->nDirection);
|
||||
|
||||
@@ -1501,7 +1501,7 @@ DSL_Error_t DSL_DRV_PM_ChannelCountersEx
|
||||
}
|
||||
|
||||
/* Fill Total Counters elapsed time*/
|
||||
- pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime/DSL_PM_MSEC;
|
||||
+ pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime;
|
||||
|
||||
pChCounters = DSL_DRV_PM_PTR_CHANNEL_COUNTERS_TOTAL_EXT(pCounters->nChannel);
|
||||
|
||||
@@ -2418,7 +2418,7 @@ DSL_Error_t DSL_DRV_PM_DataPathCountersT
|
||||
}
|
||||
|
||||
/* Fill Total Counters elapsed time*/
|
||||
- pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime/DSL_PM_MSEC;
|
||||
+ pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime;
|
||||
|
||||
pDpCounters = DSL_DRV_PM_PTR_DATAPATH_COUNTERS_TOTAL(pCounters->nChannel,pCounters->nDirection);
|
||||
|
||||
@@ -3190,7 +3190,7 @@ DSL_Error_t DSL_DRV_PM_DataPathFailureCo
|
||||
}
|
||||
|
||||
/* Fill Total Counters elapsed time*/
|
||||
- pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime/DSL_PM_MSEC;
|
||||
+ pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime;
|
||||
|
||||
pDpCounters = DSL_DRV_PM_PTR_DATAPATH_FAILURE_COUNTERS_TOTAL(pCounters->nChannel,pCounters->nDirection);
|
||||
|
||||
@@ -3950,7 +3950,7 @@ DSL_Error_t DSL_DRV_PM_LineSecCountersTo
|
||||
}
|
||||
|
||||
/* Fill Total Counters elapsed time*/
|
||||
- pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime/DSL_PM_MSEC;
|
||||
+ pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime;
|
||||
|
||||
pLineCounters = DSL_DRV_PM_PTR_LINE_SEC_COUNTERS_TOTAL(pCounters->nDirection);
|
||||
|
||||
@@ -4602,7 +4602,7 @@ DSL_Error_t DSL_DRV_PM_LineInitCountersT
|
||||
}
|
||||
|
||||
/* Fill Total Counters elapsed time*/
|
||||
- pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime/DSL_PM_MSEC;
|
||||
+ pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime;
|
||||
|
||||
pLinitCounters = DSL_DRV_PM_PTR_LINE_INIT_COUNTERS_TOTAL();
|
||||
|
||||
@@ -5131,7 +5131,7 @@ DSL_Error_t DSL_DRV_PM_LineEventShowtime
|
||||
}
|
||||
|
||||
/* Fill Total Counters elapsed time*/
|
||||
- pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime/DSL_PM_MSEC;
|
||||
+ pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime;
|
||||
|
||||
pLfCounters = DSL_DRV_PM_PTR_LINE_EVENT_SHOWTIME_COUNTERS_TOTAL(pCounters->nDirection);
|
||||
|
||||
@@ -5670,7 +5670,7 @@ DSL_Error_t DSL_DRV_PM_ReTxCountersTotal
|
||||
}
|
||||
|
||||
/* Fill Total Counters elapsed time*/
|
||||
- pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime/DSL_PM_MSEC;
|
||||
+ pCounters->total.nElapsedTime = DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime;
|
||||
|
||||
pReTxCounters = DSL_DRV_PM_PTR_RETX_COUNTERS_TOTAL(pCounters->nDirection);
|
||||
|
||||
--- a/src/pm/drv_dsl_cpe_pm_core.c
|
||||
+++ b/src/pm/drv_dsl_cpe_pm_core.c
|
||||
@@ -61,6 +61,7 @@ static DSL_Error_t DSL_DRV_PM_SyncTimeUp
|
||||
{
|
||||
DSL_Error_t nErrCode = DSL_SUCCESS;
|
||||
DSL_uint32_t msecTimeFrame = DSL_PM_COUNTER_POLLING_CYCLE,
|
||||
+ secTimeFrame = DSL_PM_COUNTER_POLLING_CYCLE/DSL_PM_MSEC,
|
||||
nCurrMsTime = 0;
|
||||
#ifdef INCLUDE_DSL_CPE_PM_HISTORY
|
||||
DSL_uint32_t nCurrSysTime = 0, nPrevElapsedTime = 0;
|
||||
@@ -100,10 +101,13 @@ static DSL_Error_t DSL_DRV_PM_SyncTimeUp
|
||||
{
|
||||
/* Get elapsed time [msec] since the last entry*/
|
||||
msecTimeFrame = nCurrMsTime - DSL_DRV_PM_CONTEXT(pContext)->nLastMsTimeCheck;
|
||||
+
|
||||
+ /* Get elapsed time [sec] since the last entry*/
|
||||
+ secTimeFrame = (nCurrMsTime/DSL_PM_MSEC) - (DSL_DRV_PM_CONTEXT(pContext)->nLastMsTimeCheck/DSL_PM_MSEC);
|
||||
}
|
||||
|
||||
/* Get Total Elapsed Time Since the PM module startup*/
|
||||
- DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime += msecTimeFrame;
|
||||
+ DSL_DRV_PM_CONTEXT(pContext)->nPmTotalElapsedTime += secTimeFrame;
|
||||
|
||||
/* Set last time check to the current time*/
|
||||
DSL_DRV_PM_CONTEXT(pContext)->nLastMsTimeCheck = nCurrMsTime;
|
||||
@@ -141,7 +145,7 @@ static DSL_Error_t DSL_DRV_PM_SyncTimeUp
|
||||
else
|
||||
{
|
||||
/* Update current showtime elapsed time*/
|
||||
- DSL_DRV_PM_CONTEXT(pContext)->nCurrShowtimeTime += (msecTimeFrame/DSL_PM_MSEC);
|
||||
+ DSL_DRV_PM_CONTEXT(pContext)->nCurrShowtimeTime += secTimeFrame;
|
||||
DSL_DRV_PM_CONTEXT(pContext)->nElapsedShowtimeTime =
|
||||
DSL_DRV_PM_CONTEXT(pContext)->nCurrShowtimeTime;
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
--- a/src/pm/drv_dsl_cpe_pm_core.c
|
||||
+++ b/src/pm/drv_dsl_cpe_pm_core.c
|
||||
@@ -2274,16 +2274,18 @@ DSL_Error_t DSL_DRV_PM_CountersReset(
|
||||
}
|
||||
#endif /* #ifdef INCLUDE_DSL_CPE_PM_HISTORY*/
|
||||
|
||||
- if (ResetType == DSL_PM_RESET_HISTORY)
|
||||
- break;
|
||||
+ if (ResetType == DSL_PM_RESET_HISTORY)
|
||||
+ break;
|
||||
|
||||
+ fallthrough;
|
||||
case DSL_PM_RESET_TOTAL:
|
||||
#ifdef INCLUDE_DSL_CPE_PM_TOTAL_COUNTERS
|
||||
memset(EpData.pRecTotal, 0x0, EpData.nEpRecElementSize);
|
||||
#endif /* #ifdef INCLUDE_DSL_CPE_PM_TOTAL_COUNTERS*/
|
||||
- if (ResetType == DSL_PM_RESET_TOTAL)
|
||||
- break;
|
||||
+ if (ResetType == DSL_PM_RESET_TOTAL)
|
||||
+ break;
|
||||
|
||||
+ fallthrough;
|
||||
case DSL_PM_RESET_HISTORY_SHOWTIME:
|
||||
#ifdef INCLUDE_DSL_CPE_PM_SHOWTIME_COUNTERS
|
||||
nErrCode = DSL_DRV_PM_HistoryDelete(pContext, EpData.pHistShowtime );
|
||||
--- a/src/device/drv_dsl_cpe_device_danube.c
|
||||
+++ b/src/device/drv_dsl_cpe_device_danube.c
|
||||
@@ -3193,7 +3193,7 @@ DSL_Error_t DSL_DRV_DEV_AutobootHandleTr
|
||||
DSL_DEV_NUM(pContext)));
|
||||
}
|
||||
#endif /* INCLUDE_DSL_DELT*/
|
||||
- /* Pass through */
|
||||
+ fallthrough ;
|
||||
case DSL_LINESTATE_IDLE:
|
||||
#if defined(INCLUDE_DSL_PM) && defined(INCLUDE_DSL_CPE_PM_LINE_COUNTERS)
|
||||
if ( (pContext->bGotFullInit == DSL_TRUE) &&
|
||||
@@ -0,0 +1,65 @@
|
||||
--- a/src/g997/drv_dsl_cpe_api_g997_danube.c
|
||||
+++ b/src/g997/drv_dsl_cpe_api_g997_danube.c
|
||||
@@ -1984,41 +1984,53 @@ DSL_Error_t DSL_DRV_DEV_G997_DeltHlogGet
|
||||
{
|
||||
if (nDirection == DSL_DOWNSTREAM)
|
||||
{
|
||||
- DSL_G997_DeltHlogData_t HlogData;
|
||||
+ DSL_G997_DeltHlogData_t *HlogData;
|
||||
|
||||
- memset(&HlogData, 0x0, sizeof(DSL_G997_DeltHlogData_t));
|
||||
+ HlogData = kzalloc(sizeof(*HlogData), GFP_KERNEL);
|
||||
+ if (!HlogData)
|
||||
+ {
|
||||
+ DSL_DEBUG(DSL_DBG_ERR,
|
||||
+ (pContext, "DSL[%02d]: ERROR - Alloc HlogData failed!"DSL_DRV_CRLF,
|
||||
+ DSL_DEV_NUM(pContext)));
|
||||
+ return DSL_ERR_MEMORY;
|
||||
+ }
|
||||
+
|
||||
+ memset(HlogData, 0x0, sizeof(DSL_G997_DeltHlogData_t));
|
||||
|
||||
/* Get SHOWTIME Hlog values*/
|
||||
nErrCode = DSL_DRV_DANUBE_G997_DeltHlogGet(
|
||||
- pContext, nDirection, &HlogData);
|
||||
+ pContext, nDirection, HlogData);
|
||||
if (nErrCode != DSL_SUCCESS)
|
||||
{
|
||||
DSL_DEBUG(DSL_DBG_ERR,
|
||||
(pContext, "DSL[%02d]: ERROR - Showtime Hlog get failed!"DSL_DRV_CRLF,
|
||||
DSL_DEV_NUM(pContext)));
|
||||
+ kfree(HlogData);
|
||||
return nErrCode;
|
||||
}
|
||||
|
||||
/* if actual group size != 1, values should be spread */
|
||||
- if (HlogData.nGroupSize != 1)
|
||||
+ if (HlogData->nGroupSize != 1)
|
||||
{
|
||||
nErrCode = DSL_DRV_DANUBE_G997_DeltValuesSpread(
|
||||
- 0x1, HlogData.nGroupSize, HlogData.deltHlog.nNumData,
|
||||
- HlogData.deltHlog.nNSCData, pData->deltHlog.nNSCData);
|
||||
+ 0x1, HlogData->nGroupSize, HlogData->deltHlog.nNumData,
|
||||
+ HlogData->deltHlog.nNSCData, pData->deltHlog.nNSCData);
|
||||
|
||||
if (nErrCode == DSL_SUCCESS)
|
||||
{
|
||||
pData->deltHlog.nNumData =
|
||||
- (DSL_uint16_t)(HlogData.deltHlog.nNumData * HlogData.nGroupSize);
|
||||
+ (DSL_uint16_t)(HlogData->deltHlog.nNumData * HlogData->nGroupSize);
|
||||
pData->nGroupSize = 1;
|
||||
- pData->nMeasurementTime = HlogData.nMeasurementTime;
|
||||
+ pData->nMeasurementTime = HlogData->nMeasurementTime;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* No spread needed, copy data*/
|
||||
- memcpy(pData, &HlogData, sizeof(DSL_G997_DeltHlogData_t));
|
||||
+ memcpy(pData, HlogData, sizeof(DSL_G997_DeltHlogData_t));
|
||||
}
|
||||
+
|
||||
+ kfree(HlogData);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -0,0 +1,26 @@
|
||||
--- a/src/g997/drv_dsl_cpe_api_g997_danube.c
|
||||
+++ b/src/g997/drv_dsl_cpe_api_g997_danube.c
|
||||
@@ -2524,6 +2524,7 @@ DSL_Error_t DSL_DRV_DEV_G997_PowerManage
|
||||
else
|
||||
{
|
||||
/* read L3 request failure reason */
|
||||
+ DSL_uint8_t nErrCodeL3;
|
||||
nErrCode = DSL_DRV_DANUBE_CmvRead(pContext, DSL_CMV_GROUP_STAT,
|
||||
DSL_CMV_ADDRESS_STAT_L3_FAILURE_REASON, 0, 1, &nVal);
|
||||
DSL_DEBUG(DSL_DBG_MSG,
|
||||
@@ -2537,11 +2538,13 @@ DSL_Error_t DSL_DRV_DEV_G997_PowerManage
|
||||
nErrCode = DSL_ERR_MSG_EXCHANGE;
|
||||
break;
|
||||
}
|
||||
- if (((nVal >> 4) & 0x15) == 0x5)
|
||||
+
|
||||
+ nErrCodeL3 = (nVal >> 4) & 0x15;
|
||||
+ if (nErrCodeL3 == 0x5)
|
||||
{
|
||||
nErrCode = DSL_ERR_L3_NOT_IN_L0;
|
||||
}
|
||||
- else if (((nVal >> 4) & 0x15) == 0x9)
|
||||
+ else if (nErrCodeL3 == 0x9)
|
||||
{
|
||||
nErrCode = DSL_ERR_L3_TIMED_OUT;
|
||||
}
|
||||
14
package/kernel/lantiq/ltq-adsl/patches/400-kernel-6.1.patch
Normal file
14
package/kernel/lantiq/ltq-adsl/patches/400-kernel-6.1.patch
Normal file
@@ -0,0 +1,14 @@
|
||||
--- a/src/common/drv_dsl_cpe_os_linux.c
|
||||
+++ b/src/common/drv_dsl_cpe_os_linux.c
|
||||
@@ -556,7 +556,11 @@ 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
|
||||
+ kthread_complete_and_exit(&pThrCntrl->thrCompletion, (long)retVal);
|
||||
+#endif
|
||||
|
||||
DSL_DEBUG( DSL_DBG_MSG,
|
||||
(DSL_NULL, "EXIT - Kernel Thread Startup <%s>" DSL_DRV_CRLF,
|
||||
20
package/kernel/lantiq/ltq-adsl/patches/410-kernel-6.6.patch
Normal file
20
package/kernel/lantiq/ltq-adsl/patches/410-kernel-6.6.patch
Normal file
@@ -0,0 +1,20 @@
|
||||
--- a/src/pm/drv_dsl_cpe_api_pm_danube.c
|
||||
+++ b/src/pm/drv_dsl_cpe_api_pm_danube.c
|
||||
@@ -182,7 +182,7 @@ DSL_Error_t DSL_DRV_PM_DEV_ChannelCounte
|
||||
}
|
||||
else
|
||||
{
|
||||
- if (DSL_DRV_DANUBE_ActLatencyGet(pContext, nChannel, nDirection, &nLPath) >= DSL_SUCCESS)
|
||||
+ if (DSL_DRV_DANUBE_ActLatencyGet(pContext, nChannel, (DSL_AccessDir_t)nDirection, &nLPath) >= DSL_SUCCESS)
|
||||
{
|
||||
if (nLPath == DSL_LATENCY_IP_LP0) nIdx = 0;
|
||||
else nIdx = 1;
|
||||
@@ -345,7 +345,7 @@ DSL_Error_t DSL_DRV_PM_DEV_ChannelCounte
|
||||
|
||||
if ((!bAdsl1) && (DSL_CHANNELS_PER_LINE > 1))
|
||||
{
|
||||
- if (DSL_DRV_DANUBE_ActLatencyGet(pContext, nChannel, nDirection, &nLPath) >= DSL_SUCCESS)
|
||||
+ if (DSL_DRV_DANUBE_ActLatencyGet(pContext, nChannel, (DSL_AccessDir_t)nDirection, &nLPath) >= DSL_SUCCESS)
|
||||
{
|
||||
if (nLPath == DSL_LATENCY_IP_LP0) nIdx = 0;
|
||||
else nIdx = 1;
|
||||
Reference in New Issue
Block a user