Initial commit
This commit is contained in:
12
package/kernel/lantiq/ltq-vdsl/patches/001-fix-compile.patch
Normal file
12
package/kernel/lantiq/ltq-vdsl/patches/001-fix-compile.patch
Normal file
@@ -0,0 +1,12 @@
|
||||
--- a/src/include/drv_dsl_cpe_os_linux.h
|
||||
+++ b/src/include/drv_dsl_cpe_os_linux.h
|
||||
@@ -33,6 +33,9 @@
|
||||
#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))
|
||||
@@ -0,0 +1,32 @@
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -244,10 +244,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)
|
||||
@@ -257,7 +254,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
|
||||
@@ -311,7 +308,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:
|
||||
96
package/kernel/lantiq/ltq-vdsl/patches/100-compat.patch
Normal file
96
package/kernel/lantiq/ltq-vdsl/patches/100-compat.patch
Normal file
@@ -0,0 +1,96 @@
|
||||
--- a/src/Makefile.in
|
||||
+++ b/src/Makefile.in
|
||||
@@ -117,7 +117,7 @@ POST_UNINSTALL = :
|
||||
|
||||
# the headerfile of linux kernels 2.6.x contain to much arithmetic
|
||||
# with void pointers (which is allowed for gcc!)
|
||||
-@KERNEL_2_6_FALSE@am__append_6 = -Wpointer-arith
|
||||
+@KERNEL_2_6_FALSE@am__append_6 =
|
||||
subdir = src
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
--- a/src/common/drv_dsl_cpe_os_linux.c
|
||||
+++ b/src/common/drv_dsl_cpe_os_linux.c
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
#define DSL_INTERN
|
||||
|
||||
+#include <linux/device.h>
|
||||
#include "drv_dsl_cpe_api.h"
|
||||
#include "drv_dsl_cpe_api_ioctl.h"
|
||||
|
||||
@@ -249,14 +250,7 @@ static DSL_long_t DSL_DRV_Ioctls(DSL_DRV
|
||||
}
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
|
||||
- if (pFile->f_dentry != DSL_NULL)
|
||||
- {
|
||||
- pINode = pFile->f_dentry->d_inode;
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- pINode = DSL_NULL;
|
||||
- }
|
||||
+ pINode = file_inode(pFile);
|
||||
#endif
|
||||
|
||||
if (pINode == DSL_NULL)
|
||||
@@ -1203,6 +1197,9 @@ static void DSL_DRV_NlSendMsg(DSL_char_t
|
||||
}
|
||||
#endif
|
||||
|
||||
+static struct class *dsl_class;
|
||||
+static dev_t dsl_devt;
|
||||
+
|
||||
/* Entry point of driver */
|
||||
int __init DSL_ModuleInit(void)
|
||||
{
|
||||
@@ -1241,6 +1238,10 @@ int __init DSL_ModuleInit(void)
|
||||
|
||||
DSL_DRV_DevNodeInit();
|
||||
|
||||
+ dsl_class = class_create(THIS_MODULE, "dsl_cpe_api0");
|
||||
+ dsl_devt = MKDEV(DRV_DSL_CPE_API_DEV_MAJOR, 0);
|
||||
+ device_create(dsl_class, NULL, dsl_devt, NULL, "dsl_cpe_api0");
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1248,6 +1249,11 @@ void __exit DSL_ModuleCleanup(void)
|
||||
{
|
||||
printk("Module will be unloaded"DSL_DRV_CRLF);
|
||||
|
||||
+ device_destroy(dsl_class, dsl_devt);
|
||||
+ dsl_devt = NULL;
|
||||
+ class_destroy(dsl_class);
|
||||
+ dsl_class = NULL;
|
||||
+
|
||||
unregister_chrdev(nMajorNum, DRV_DSL_CPE_API_DEV_NAME);
|
||||
|
||||
DSL_DRV_Cleanup();
|
||||
--- a/src/device/drv_dsl_cpe_device_vrx.c
|
||||
+++ b/src/device/drv_dsl_cpe_device_vrx.c
|
||||
@@ -5337,6 +5337,7 @@ DSL_Error_t DSL_DRV_DEV_HybridTypeGet(
|
||||
#undef DSL_DBG_BLOCK
|
||||
#define DSL_DBG_BLOCK DSL_DBG_NOTIFICATIONS
|
||||
|
||||
+#if 0
|
||||
DSL_Error_t DSL_DRV_DEV_MeiTcLayerSignaling
|
||||
(
|
||||
DSL_Context_t *pContext,
|
||||
@@ -5384,6 +5385,15 @@ DSL_Error_t DSL_DRV_DEV_MeiTcLayerSignal
|
||||
|
||||
return nErrCode;
|
||||
}
|
||||
+#else
|
||||
+DSL_Error_t DSL_DRV_DEV_MeiTcLayerSignaling
|
||||
+(
|
||||
+ DSL_Context_t *pContext,
|
||||
+ DSL_TcLayerSelection_t nTcLayer)
|
||||
+{
|
||||
+ return DSL_SUCCESS;
|
||||
+}
|
||||
+#endif
|
||||
|
||||
DSL_Error_t DSL_DRV_DEV_MeiShowtimeSignaling
|
||||
(
|
||||
107
package/kernel/lantiq/ltq-vdsl/patches/110-semaphore-lock.patch
Normal file
107
package/kernel/lantiq/ltq-vdsl/patches/110-semaphore-lock.patch
Normal file
@@ -0,0 +1,107 @@
|
||||
--- a/src/include/drv_dsl_cpe_pm_core.h
|
||||
+++ b/src/include/drv_dsl_cpe_pm_core.h
|
||||
@@ -1510,9 +1510,9 @@ typedef struct
|
||||
/** Common PM module mutex*/
|
||||
DSL_DRV_Mutex_t pmMutex;
|
||||
/** PM module direction Near-End mutex*/
|
||||
- DSL_DRV_Mutex_t pmNeMutex;
|
||||
+ struct semaphore pmNeMutex;
|
||||
/** PM module direction Far-End mutex*/
|
||||
- DSL_DRV_Mutex_t pmFeMutex;
|
||||
+ struct semaphore pmFeMutex;
|
||||
/** PM module Near-End access mutex*/
|
||||
DSL_DRV_Mutex_t pmNeAccessMutex;
|
||||
/** PM module Far-End access mutex*/
|
||||
--- a/src/pm/drv_dsl_cpe_api_pm.c
|
||||
+++ b/src/pm/drv_dsl_cpe_api_pm.c
|
||||
@@ -220,9 +220,9 @@ DSL_Error_t DSL_DRV_PM_Start(
|
||||
/* init PM module common mutex */
|
||||
DSL_DRV_MUTEX_INIT(DSL_DRV_PM_CONTEXT(pContext)->pmMutex);
|
||||
/* init PM module direction Near-End mutex */
|
||||
- DSL_DRV_MUTEX_INIT(DSL_DRV_PM_CONTEXT(pContext)->pmNeMutex);
|
||||
+ sema_init(&(DSL_DRV_PM_CONTEXT(pContext)->pmNeMutex),1);
|
||||
/* init PM module direction Far-End mutex */
|
||||
- DSL_DRV_MUTEX_INIT(DSL_DRV_PM_CONTEXT(pContext)->pmFeMutex);
|
||||
+ sema_init(&(DSL_DRV_PM_CONTEXT(pContext)->pmFeMutex),1);
|
||||
/* init PM module Near-End access mutex */
|
||||
DSL_DRV_MUTEX_INIT(DSL_DRV_PM_CONTEXT(pContext)->pmNeAccessMutex);
|
||||
/* init PM module Far-End access mutex */
|
||||
@@ -592,7 +592,7 @@ DSL_Error_t DSL_DRV_PM_Stop(
|
||||
if( DSL_DRV_PM_CONTEXT(pContext)->pmThreadFe.bRun != DSL_TRUE )
|
||||
{
|
||||
DSL_DEBUG(DSL_DBG_WRN,
|
||||
- (pContext, SYS_DBG_WRN"DSL[%02d]: PM module Near-End thread already stopped"
|
||||
+ (pContext, SYS_DBG_WRN"DSL[%02d]: PM module Far-End thread already stopped"
|
||||
DSL_DRV_CRLF, DSL_DEV_NUM(pContext)));
|
||||
}
|
||||
else
|
||||
--- a/src/pm/drv_dsl_cpe_pm_core.c
|
||||
+++ b/src/pm/drv_dsl_cpe_pm_core.c
|
||||
@@ -1022,7 +1022,7 @@ DSL_Error_t DSL_DRV_PM_DirectionMutexCon
|
||||
{
|
||||
if( bLock )
|
||||
{
|
||||
- if( DSL_DRV_MUTEX_LOCK(DSL_DRV_PM_CONTEXT(pContext)->pmNeMutex) )
|
||||
+ if(down_interruptible(&(DSL_DRV_PM_CONTEXT(pContext)->pmNeMutex)))
|
||||
{
|
||||
DSL_DEBUG( DSL_DBG_ERR,
|
||||
(pContext, SYS_DBG_ERR"DSL[%02d]: ERROR - Couldn't lock PM NE mutex!"
|
||||
@@ -1034,14 +1034,14 @@ DSL_Error_t DSL_DRV_PM_DirectionMutexCon
|
||||
else
|
||||
{
|
||||
/* Unlock PM module NE Mutex*/
|
||||
- DSL_DRV_MUTEX_UNLOCK(DSL_DRV_PM_CONTEXT(pContext)->pmNeMutex);
|
||||
+ up(&(DSL_DRV_PM_CONTEXT(pContext)->pmNeMutex));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if( bLock )
|
||||
{
|
||||
- if( DSL_DRV_MUTEX_LOCK(DSL_DRV_PM_CONTEXT(pContext)->pmFeMutex) )
|
||||
+ if(down_interruptible(&(DSL_DRV_PM_CONTEXT(pContext)->pmFeMutex)))
|
||||
{
|
||||
DSL_DEBUG( DSL_DBG_ERR,
|
||||
(pContext, SYS_DBG_ERR"DSL[%02d]: ERROR - Couldn't lock PM FE mutex!"
|
||||
@@ -1053,7 +1053,7 @@ DSL_Error_t DSL_DRV_PM_DirectionMutexCon
|
||||
else
|
||||
{
|
||||
/* Unlock PM module FE Mutex*/
|
||||
- DSL_DRV_MUTEX_UNLOCK(DSL_DRV_PM_CONTEXT(pContext)->pmFeMutex);
|
||||
+ up(&(DSL_DRV_PM_CONTEXT(pContext)->pmFeMutex));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1139,7 +1139,7 @@ DSL_Error_t DSL_DRV_PM_Lock(DSL_Context_
|
||||
if( !(DSL_DRV_PM_CONTEXT(pContext)->bPmLock) )
|
||||
{
|
||||
/* Lock PM module Near-End Mutex*/
|
||||
- if( DSL_DRV_MUTEX_LOCK(DSL_DRV_PM_CONTEXT(pContext)->pmNeMutex) )
|
||||
+ if(down_interruptible(&(DSL_DRV_PM_CONTEXT(pContext)->pmNeMutex)))
|
||||
{
|
||||
DSL_DEBUG( DSL_DBG_ERR,
|
||||
(pContext, SYS_DBG_ERR"DSL[%02d]: ERROR - Couldn't lock PM NE mutex!"
|
||||
@@ -1148,8 +1148,8 @@ DSL_Error_t DSL_DRV_PM_Lock(DSL_Context_
|
||||
return DSL_ERR_SEMAPHORE_GET;
|
||||
}
|
||||
|
||||
- /* Lock PM module Near-End Mutex*/
|
||||
- if( DSL_DRV_MUTEX_LOCK(DSL_DRV_PM_CONTEXT(pContext)->pmFeMutex) )
|
||||
+ /* Lock PM module Far-End Mutex*/
|
||||
+ if( down_interruptible(&(DSL_DRV_PM_CONTEXT(pContext)->pmFeMutex)) )
|
||||
{
|
||||
DSL_DEBUG( DSL_DBG_ERR,
|
||||
(pContext, SYS_DBG_ERR"DSL[%02d]: ERROR - Couldn't lock PM FE mutex!"
|
||||
@@ -1193,10 +1193,10 @@ DSL_Error_t DSL_DRV_PM_UnLock(DSL_Contex
|
||||
if( DSL_DRV_PM_CONTEXT(pContext)->bPmLock )
|
||||
{
|
||||
/* Unlock PM module NE Mutex*/
|
||||
- DSL_DRV_MUTEX_UNLOCK(DSL_DRV_PM_CONTEXT(pContext)->pmNeMutex);
|
||||
+ up(&(DSL_DRV_PM_CONTEXT(pContext)->pmNeMutex));
|
||||
|
||||
/* Unlock PM module FE Mutex*/
|
||||
- DSL_DRV_MUTEX_UNLOCK(DSL_DRV_PM_CONTEXT(pContext)->pmFeMutex);
|
||||
+ up(&(DSL_DRV_PM_CONTEXT(pContext)->pmFeMutex));
|
||||
|
||||
/* Clear bPmLock flag*/
|
||||
DSL_DRV_PM_CONTEXT(pContext)->bPmLock = DSL_FALSE;
|
||||
Reference in New Issue
Block a user