[openwrt/openwrt] lantiq: ltq-adsl: Do not leak user space CFLAGS into kernel space

LEDE Commits lede-commits at lists.infradead.org
Sat Mar 3 04:00:46 PST 2018


hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.lede-project.org/4d90887496b43b1db9f48ccdc9fe823b5371e323

commit 4d90887496b43b1db9f48ccdc9fe823b5371e323
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sat Mar 3 01:38:50 2018 +0100

    lantiq: ltq-adsl: Do not leak user space CFLAGS into kernel space
    
    Do not leak the user space CFLAGS into the kernel space any more, this
    allows us to activate the MIPS16 build.
    
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/kernel/lantiq/ltq-adsl/Makefile            |   5 +-
 .../ltq-adsl/patches/020-not-leak-cflags.patch     |  32 ++++++
 .../lantiq/ltq-adsl/patches/100-dsl_compat.patch   | 109 ++++++++-------------
 .../lantiq/ltq-adsl/patches/120-platform.patch     |  14 ++-
 .../lantiq/ltq-adsl/patches/130-linux3.8.patch     |  38 +++----
 .../lantiq/ltq-adsl/patches/140-linux_3.18.patch   |   2 +-
 6 files changed, 96 insertions(+), 104 deletions(-)

diff --git a/package/kernel/lantiq/ltq-adsl/Makefile b/package/kernel/lantiq/ltq-adsl/Makefile
index b6f1c8a..e6817ef 100644
--- a/package/kernel/lantiq/ltq-adsl/Makefile
+++ b/package/kernel/lantiq/ltq-adsl/Makefile
@@ -10,14 +10,13 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=ltq-adsl
 PKG_VERSION:=3.24.4.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_SOURCE:=drv_dsl_cpe_api_danube-$(PKG_VERSION).tar.gz
 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/ltq-dsl-$(BUILD_VARIANT)/drv_dsl_cpe_api-$(PKG_VERSION)
 PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources/
 PKG_HASH:=eb2ed59715d3bf4e8a1460bbbe2f1660039e0a9f9d72afb1b2b16590094eb33c
 PKG_MAINTAINER:=John Crispin <john at phrozen.org>
 
-PKG_USE_MIPS16:=0
 PKG_CHECK_FORMAT_SECURITY:=0
 PKG_FIXUP:=autoreconf
 
@@ -83,8 +82,6 @@ CONFIGURE_ARGS += \
 EXTRA_CFLAGS += -DDEBUG
 endif
 
-EXTRA_CFLAGS = -fno-pic -mno-abicalls -mlong-calls -G 0
-
 define Build/InstallDev
 	$(INSTALL_DIR) $(1)/usr/include/adsl
 	$(CP) $(PKG_BUILD_DIR)/src/include/drv_dsl_cpe_*.h $(1)/usr/include/adsl/
diff --git a/package/kernel/lantiq/ltq-adsl/patches/020-not-leak-cflags.patch b/package/kernel/lantiq/ltq-adsl/patches/020-not-leak-cflags.patch
new file mode 100644
index 0000000..b3f20db
--- /dev/null
+++ b/package/kernel/lantiq/ltq-adsl/patches/020-not-leak-cflags.patch
@@ -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 at 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 at 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:
diff --git a/package/kernel/lantiq/ltq-adsl/patches/100-dsl_compat.patch b/package/kernel/lantiq/ltq-adsl/patches/100-dsl_compat.patch
index f2ed230..431ccb6 100644
--- a/package/kernel/lantiq/ltq-adsl/patches/100-dsl_compat.patch
+++ b/package/kernel/lantiq/ltq-adsl/patches/100-dsl_compat.patch
@@ -1,7 +1,5 @@
-Index: drv_dsl_cpe_api-3.24.4.4/src/include/drv_dsl_cpe_device_danube.h
-===================================================================
---- drv_dsl_cpe_api-3.24.4.4.orig/src/include/drv_dsl_cpe_device_danube.h	2009-05-12 20:02:16.000000000 +0200
-+++ drv_dsl_cpe_api-3.24.4.4/src/include/drv_dsl_cpe_device_danube.h	2012-11-29 19:47:21.060210322 +0100
+--- a/src/include/drv_dsl_cpe_device_danube.h
++++ b/src/include/drv_dsl_cpe_device_danube.h
 @@ -24,7 +24,7 @@
     #include "drv_dsl_cpe_simulator_danube.h"
  #else
@@ -11,10 +9,8 @@ Index: drv_dsl_cpe_api-3.24.4.4/src/include/drv_dsl_cpe_device_danube.h
  #endif /* defined(DSL_CPE_SIMULATOR_DRIVER) && defined(WIN32)*/
  
  #define DSL_MAX_LINE_NUMBER 1
-Index: drv_dsl_cpe_api-3.24.4.4/src/common/drv_dsl_cpe_os_linux.c
-===================================================================
---- drv_dsl_cpe_api-3.24.4.4.orig/src/common/drv_dsl_cpe_os_linux.c	2009-07-13 11:33:43.000000000 +0200
-+++ drv_dsl_cpe_api-3.24.4.4/src/common/drv_dsl_cpe_os_linux.c	2012-11-29 19:46:32.700209112 +0100
+--- a/src/common/drv_dsl_cpe_os_linux.c
++++ b/src/common/drv_dsl_cpe_os_linux.c
 @@ -11,6 +11,7 @@
  #ifdef __LINUX__
  
@@ -23,7 +19,7 @@ Index: drv_dsl_cpe_api-3.24.4.4/src/common/drv_dsl_cpe_os_linux.c
  
  #include "drv_dsl_cpe_api.h"
  #include "drv_dsl_cpe_api_ioctl.h"
-@@ -34,9 +35,13 @@
+@@ -34,9 +35,13 @@ static const char* dsl_cpe_api_version =
  static DSL_ssize_t DSL_DRV_Write(DSL_DRV_file_t *pFile, const DSL_char_t * pBuf,
                                   DSL_DRV_size_t nSize, DSL_DRV_offset_t * pLoff);
  
@@ -38,7 +34,7 @@ Index: drv_dsl_cpe_api-3.24.4.4/src/common/drv_dsl_cpe_os_linux.c
  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 @@
+@@ -72,7 +77,11 @@ static struct file_operations dslCpeApiO
     open:    DSL_DRV_Open,
     release: DSL_DRV_Release,
     write:   DSL_DRV_Write,
@@ -50,7 +46,7 @@ Index: drv_dsl_cpe_api-3.24.4.4/src/common/drv_dsl_cpe_os_linux.c
     poll:    DSL_DRV_Poll
  };
  #else
-@@ -168,10 +177,17 @@
+@@ -168,10 +177,17 @@ static DSL_ssize_t DSL_DRV_Write(DSL_DRV
     \return  Success or failure.
     \ingroup Internal
  */
@@ -68,7 +64,7 @@ Index: drv_dsl_cpe_api-3.24.4.4/src/common/drv_dsl_cpe_os_linux.c
  {
     DSL_int_t nErr=0;
     DSL_boolean_t bIsInKernel;
-@@ -216,16 +232,7 @@
+@@ -216,16 +232,7 @@ static DSL_int_t DSL_DRV_Ioctls(DSL_DRV_
           }
        }
     }
@@ -86,7 +82,7 @@ Index: drv_dsl_cpe_api-3.24.4.4/src/common/drv_dsl_cpe_os_linux.c
     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) ||
-@@ -1058,6 +1065,7 @@
+@@ -1058,6 +1065,7 @@ static void DSL_DRV_DebugInit(void)
  /* Entry point of driver */
  int __init DSL_ModuleInit(void)
  {
@@ -94,7 +90,7 @@ Index: drv_dsl_cpe_api-3.24.4.4/src/common/drv_dsl_cpe_os_linux.c
     DSL_int_t i;
  
     printk(DSL_DRV_CRLF DSL_DRV_CRLF "Infineon CPE API Driver version: %s" DSL_DRV_CRLF,
-@@ -1104,7 +1112,8 @@
+@@ -1104,7 +1112,8 @@ int __init DSL_ModuleInit(void)
     }
  
     DSL_DRV_DevNodeInit();
@@ -104,35 +100,44 @@ Index: drv_dsl_cpe_api-3.24.4.4/src/common/drv_dsl_cpe_os_linux.c
     return 0;
  }
  
-Index: drv_dsl_cpe_api-3.24.4.4/src/include/drv_dsl_cpe_os_linux.h
-===================================================================
---- drv_dsl_cpe_api-3.24.4.4.orig/src/include/drv_dsl_cpe_os_linux.h	2009-07-03 17:04:51.000000000 +0200
-+++ drv_dsl_cpe_api-3.24.4.4/src/include/drv_dsl_cpe_os_linux.h	2012-11-29 19:47:23.092210377 +0100
-@@ -17,17 +17,17 @@
+--- a/src/include/drv_dsl_cpe_os_linux.h
++++ b/src/include/drv_dsl_cpe_os_linux.h
+@@ -16,18 +16,18 @@
+    extern "C" {
  #endif
  
- #include <asm/ioctl.h>
+-#include <asm/ioctl.h>
 -#include <linux/autoconf.h>
-+#include <generated/autoconf.h>
  #include <linux/module.h>
  #include <linux/kernel.h>
  #include <linux/init.h>
  #include <linux/ctype.h>
  #include <linux/version.h>
  #include <linux/spinlock.h>
--
 +#include <linux/sched.h>
  
- #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17))
+-
+-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17))
 -   #include <linux/utsrelease.h>
-+   #include <generated/utsrelease.h>
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
++#include <linux/utsrelease.h>
++#else
++#include <generated/utsrelease.h>
  #endif
  
  #include <linux/types.h>
-Index: drv_dsl_cpe_api-3.24.4.4/src/ifxmips_mei_interface.h
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ drv_dsl_cpe_api-3.24.4.4/src/ifxmips_mei_interface.h	2012-11-29 19:47:54.972211177 +0100
+@@ -39,7 +39,8 @@
+ #include <linux/delay.h>
+ #include <linux/poll.h>
+ #include <asm/uaccess.h>
+-#include <linux/smp_lock.h>
++//#include <linux/smp_lock.h>
++#include <asm/ioctl.h>
+ 
+ #ifdef INCLUDE_DSL_CPE_API_IFXOS_SUPPORT
+ /** IFXOS includes*/
+--- /dev/null
++++ b/src/ifxmips_mei_interface.h
 @@ -0,0 +1,702 @@
 +/******************************************************************************
 +
@@ -838,7 +843,7 @@ Index: drv_dsl_cpe_api-3.24.4.4/src/ifxmips_mei_interface.h
 +#endif //IFXMIPS_MEI_H
 --- a/configure.in
 +++ b/configure.in
-@@ -310,7 +310,7 @@
+@@ -310,7 +310,7 @@ dnl Set kernel build path
  AC_ARG_ENABLE(kernelbuild,
      AC_HELP_STRING(--enable-kernel-build=x,Set the target kernel build path),
      [
@@ -847,7 +852,7 @@ Index: drv_dsl_cpe_api-3.24.4.4/src/ifxmips_mei_interface.h
              AC_SUBST([KERNEL_BUILD_PATH],[$enableval])
          else
              AC_MSG_ERROR([The kernel build directory is not valid or not configured!])
-@@ -333,12 +333,12 @@
+@@ -333,12 +333,12 @@ AC_ARG_ENABLE(ifxos-include,
              echo Set the lib_ifxos include path $enableval
              AC_SUBST([IFXOS_INCLUDE_PATH],[$enableval])
          else
@@ -862,7 +867,7 @@ Index: drv_dsl_cpe_api-3.24.4.4/src/ifxmips_mei_interface.h
          AC_SUBST([IFXOS_INCLUDE_PATH],[$DEFAULT_IFXOS_INCLUDE_PATH])
      ]
  )
-@@ -1702,73 +1702,73 @@
+@@ -1702,73 +1702,73 @@ dnl Set the configure params for dist ch
  AC_SUBST([DISTCHECK_CONFIGURE_PARAMS],[$CONFIGURE_OPTIONS])
  
  AC_CONFIG_COMMANDS_PRE([
@@ -1005,7 +1010,7 @@ Index: drv_dsl_cpe_api-3.24.4.4/src/ifxmips_mei_interface.h
  AC_CONFIG_FILES([Makefile src/Makefile])
 --- a/src/Makefile.am
 +++ b/src/Makefile.am
-@@ -303,7 +303,7 @@
+@@ -300,7 +300,7 @@ if KERNEL_2_6
  drv_dsl_cpe_api_OBJS = "$(subst .c,.o,$(filter %.c,$(drv_dsl_cpe_api_SOURCES)))"
  
  drv_dsl_cpe_api.ko: $(drv_dsl_cpe_api_SOURCES)
@@ -1014,52 +1019,18 @@ Index: drv_dsl_cpe_api-3.24.4.4/src/ifxmips_mei_interface.h
  	if test ! -e common/drv_dsl_cpe_api.c ; then \
  		echo "copy source files (as links only!)"; \
  		for f in $(filter %.c,$(drv_dsl_cpe_api_SOURCES)); do \
-@@ -311,10 +311,10 @@
+@@ -308,10 +308,10 @@ drv_dsl_cpe_api.ko: $(drv_dsl_cpe_api_SO
  			cp -s $(addprefix @abs_srcdir@/,$$f) $(PWD)/`dirname $$f`/ ; \
  		done \
  	fi
 -	@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 at 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 at abs_srcdir@/include -I$(PWD)/include"	>> $(PWD)/Kbuild
 +	@echo "# drv_dsl_cpe_api: Generated to build Linux 2.6.x kernel object" > $(PWD)/Kbuild
 +	@echo "obj-m := $(subst .ko,.o,$@)"			>> $(PWD)/Kbuild
 +	@echo "$(subst .ko,,$@)-y := $(drv_dsl_cpe_api_OBJS)"	>> $(PWD)/Kbuild
-+	@echo "EXTRA_CFLAGS := $(CFLAGS) -DHAVE_CONFIG_H $(drv_dsl_cpe_api_CFLAGS) $(DSL_DRIVER_INCL_PATH) $(IFXOS_INCLUDE_PATH) -I at abs_srcdir@/include -I$(PWD)/include"	>> $(PWD)/Kbuild
++	@echo "EXTRA_CFLAGS := -DHAVE_CONFIG_H $(drv_dsl_cpe_api_CFLAGS) $(DSL_DRIVER_INCL_PATH) $(IFXOS_INCLUDE_PATH) -I at 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:
---- a/src/include/drv_dsl_cpe_os_linux.h
-+++ b/src/include/drv_dsl_cpe_os_linux.h
-@@ -16,8 +16,6 @@
-    extern "C" {
- #endif
- 
--#include <asm/ioctl.h>
--#include <generated/autoconf.h>
- #include <linux/module.h>
- #include <linux/kernel.h>
- #include <linux/init.h>
-@@ -26,8 +24,10 @@
- #include <linux/spinlock.h>
- #include <linux/sched.h>
- 
--#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17))
--   #include <generated/utsrelease.h>
-+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
-+#include <linux/utsrelease.h>
-+#else
-+#include <generated/utsrelease.h>
- #endif
- 
- #include <linux/types.h>
-@@ -39,7 +39,8 @@
- #include <linux/delay.h>
- #include <linux/poll.h>
- #include <asm/uaccess.h>
--#include <linux/smp_lock.h>
-+//#include <linux/smp_lock.h>
-+#include <asm/ioctl.h>
- 
- #ifdef INCLUDE_DSL_CPE_API_IFXOS_SUPPORT
- /** IFXOS includes*/
diff --git a/package/kernel/lantiq/ltq-adsl/patches/120-platform.patch b/package/kernel/lantiq/ltq-adsl/patches/120-platform.patch
index 48c7581..20c1ccf 100644
--- a/package/kernel/lantiq/ltq-adsl/patches/120-platform.patch
+++ b/package/kernel/lantiq/ltq-adsl/patches/120-platform.patch
@@ -1,7 +1,5 @@
-Index: drv_dsl_cpe_api-3.24.4.4/src/common/drv_dsl_cpe_os_linux.c
-===================================================================
---- drv_dsl_cpe_api-3.24.4.4.orig/src/common/drv_dsl_cpe_os_linux.c	2012-12-07 21:22:58.020256076 +0100
-+++ drv_dsl_cpe_api-3.24.4.4/src/common/drv_dsl_cpe_os_linux.c	2012-12-07 21:31:13.156268489 +0100
+--- a/src/common/drv_dsl_cpe_os_linux.c
++++ b/src/common/drv_dsl_cpe_os_linux.c
 @@ -12,6 +12,7 @@
  
  #define DSL_INTERN
@@ -10,7 +8,7 @@ Index: drv_dsl_cpe_api-3.24.4.4/src/common/drv_dsl_cpe_os_linux.c
  
  #include "drv_dsl_cpe_api.h"
  #include "drv_dsl_cpe_api_ioctl.h"
-@@ -1063,7 +1064,7 @@
+@@ -1063,7 +1064,7 @@ static void DSL_DRV_DebugInit(void)
  #endif
  
  /* Entry point of driver */
@@ -19,7 +17,7 @@ Index: drv_dsl_cpe_api-3.24.4.4/src/common/drv_dsl_cpe_os_linux.c
  {
     struct class *dsl_class;
     DSL_int_t i;
-@@ -1117,7 +1118,7 @@
+@@ -1117,7 +1118,7 @@ int __init DSL_ModuleInit(void)
     return 0;
  }
  
@@ -28,7 +26,7 @@ Index: drv_dsl_cpe_api-3.24.4.4/src/common/drv_dsl_cpe_os_linux.c
  {
     printk("Module will be unloaded"DSL_DRV_CRLF);
  
-@@ -1132,7 +1133,7 @@
+@@ -1132,7 +1133,7 @@ void __exit DSL_ModuleCleanup(void)
                 (DSL_uint8_t**)&g_BndFpgaBase);
  #endif /* defined(INCLUDE_DSL_CPE_API_VINAX) && defined(INCLUDE_DSL_BONDING)*/
  
@@ -37,7 +35,7 @@ Index: drv_dsl_cpe_api-3.24.4.4/src/common/drv_dsl_cpe_os_linux.c
  }
  
  #ifndef _lint
-@@ -1148,8 +1149,30 @@
+@@ -1148,8 +1149,30 @@ module_param(debug_level, byte, 0);
  MODULE_PARM_DESC(debug_level, "set to get more (1) or fewer (4) debug outputs");
  #endif /* #ifndef DSL_DEBUG_DISABLE*/
  
diff --git a/package/kernel/lantiq/ltq-adsl/patches/130-linux3.8.patch b/package/kernel/lantiq/ltq-adsl/patches/130-linux3.8.patch
index bf758e0..3e2d8dc 100644
--- a/package/kernel/lantiq/ltq-adsl/patches/130-linux3.8.patch
+++ b/package/kernel/lantiq/ltq-adsl/patches/130-linux3.8.patch
@@ -1,7 +1,5 @@
-Index: drv_dsl_cpe_api-3.24.4.4/src/common/drv_dsl_cpe_os_linux.c
-===================================================================
---- drv_dsl_cpe_api-3.24.4.4.orig/src/common/drv_dsl_cpe_os_linux.c	2013-03-14 11:44:50.318326078 +0100
-+++ drv_dsl_cpe_api-3.24.4.4/src/common/drv_dsl_cpe_os_linux.c	2013-03-14 11:46:08.562329425 +0100
+--- a/src/common/drv_dsl_cpe_os_linux.c
++++ b/src/common/drv_dsl_cpe_os_linux.c
 @@ -11,6 +11,7 @@
  #ifdef __LINUX__
  
@@ -10,7 +8,7 @@ Index: drv_dsl_cpe_api-3.24.4.4/src/common/drv_dsl_cpe_os_linux.c
  #include <linux/device.h>
  #include <linux/platform_device.h>
  
-@@ -40,7 +41,7 @@
+@@ -40,7 +41,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
@@ -19,7 +17,7 @@ Index: drv_dsl_cpe_api-3.24.4.4/src/common/drv_dsl_cpe_os_linux.c
                           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 @@
+@@ -184,7 +185,7 @@ static DSL_int_t DSL_DRV_Ioctls(DSL_DRV_
     DSL_uint_t nCommand,
     unsigned long nArg)
  #else
@@ -28,7 +26,7 @@ Index: drv_dsl_cpe_api-3.24.4.4/src/common/drv_dsl_cpe_os_linux.c
     DSL_DRV_file_t * pFile,
     DSL_uint_t nCommand,
     unsigned long nArg)
-@@ -521,9 +522,9 @@
+@@ -521,9 +522,9 @@ DSL_void_t* DSL_IoctlMemCpyTo(
     - IFX_SUCCESS on success
     - IFX_ERROR on error
  */
@@ -40,7 +38,7 @@ Index: drv_dsl_cpe_api-3.24.4.4/src/common/drv_dsl_cpe_os_linux.c
     DSL_int32_t retVal          = -1;
  #ifndef _lint
  
-@@ -546,30 +547,6 @@
+@@ -546,30 +547,6 @@ DSL_DRV_STATIC DSL_int32_t DSL_DRV_Kerne
        (DSL_NULL, "ENTER - Kernel Thread Startup <%s>" DSL_DRV_CRLF,
          pThrCntrl->thrParams.pName));
  
@@ -71,7 +69,7 @@ Index: drv_dsl_cpe_api-3.24.4.4/src/common/drv_dsl_cpe_os_linux.c
     /*DSL_DRV_ThreadPriorityModify(pThrCntrl->nPriority);*/
  
     pThrCntrl->thrParams.bRunning = 1;
-@@ -639,9 +616,7 @@
+@@ -639,9 +616,7 @@ DSL_int32_t DSL_DRV_ThreadInit(
           init_completion(&pThrCntrl->thrCompletion);
  
           /* start kernel thread via the wrapper function */
@@ -82,7 +80,7 @@ Index: drv_dsl_cpe_api-3.24.4.4/src/common/drv_dsl_cpe_os_linux.c
  
           pThrCntrl->bValid = DSL_TRUE;
  
-@@ -1064,12 +1039,12 @@
+@@ -1064,12 +1039,12 @@ static void DSL_DRV_DebugInit(void)
  #endif
  
  /* Entry point of driver */
@@ -97,7 +95,7 @@ Index: drv_dsl_cpe_api-3.24.4.4/src/common/drv_dsl_cpe_os_linux.c
        &(dsl_cpe_api_version[4]));
  
     DSL_DRV_MemSet( ifxDevices, 0, sizeof(DSL_devCtx_t) * DSL_DRV_MAX_DEVICE_NUMBER );
-@@ -1118,7 +1093,7 @@
+@@ -1118,7 +1093,7 @@ static int __devinit ltq_adsl_probe(stru
     return 0;
  }
  
@@ -106,7 +104,7 @@ Index: drv_dsl_cpe_api-3.24.4.4/src/common/drv_dsl_cpe_os_linux.c
  {
     printk("Module will be unloaded"DSL_DRV_CRLF);
  
-@@ -1163,7 +1138,7 @@
+@@ -1163,7 +1138,7 @@ MODULE_DEVICE_TABLE(of, ltq_adsl_match);
  
  static struct platform_driver ltq_adsl_driver = {
  	.probe = ltq_adsl_probe,
@@ -115,11 +113,9 @@ Index: drv_dsl_cpe_api-3.24.4.4/src/common/drv_dsl_cpe_os_linux.c
  	.driver = {
  		.name = "adsl",
  		.owner = THIS_MODULE,
-Index: drv_dsl_cpe_api-3.24.4.4/src/include/drv_dsl_cpe_os_lint_map.h
-===================================================================
---- drv_dsl_cpe_api-3.24.4.4.orig/src/include/drv_dsl_cpe_os_lint_map.h	2009-02-24 21:44:54.000000000 +0100
-+++ drv_dsl_cpe_api-3.24.4.4/src/include/drv_dsl_cpe_os_lint_map.h	2013-03-14 11:44:50.330326079 +0100
-@@ -247,7 +247,7 @@
+--- 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 */
@@ -128,11 +124,9 @@ Index: drv_dsl_cpe_api-3.24.4.4/src/include/drv_dsl_cpe_os_lint_map.h
  
     /** requested kernel thread priority */
     DSL_int32_t             nPriority;
-Index: drv_dsl_cpe_api-3.24.4.4/src/include/drv_dsl_cpe_os_linux.h
-===================================================================
---- drv_dsl_cpe_api-3.24.4.4.orig/src/include/drv_dsl_cpe_os_linux.h	2013-03-14 11:44:50.298326077 +0100
-+++ drv_dsl_cpe_api-3.24.4.4/src/include/drv_dsl_cpe_os_linux.h	2013-03-14 11:44:50.330326079 +0100
-@@ -288,7 +288,7 @@
+--- 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 */
diff --git a/package/kernel/lantiq/ltq-adsl/patches/140-linux_3.18.patch b/package/kernel/lantiq/ltq-adsl/patches/140-linux_3.18.patch
index 1d1e566..668732f 100644
--- a/package/kernel/lantiq/ltq-adsl/patches/140-linux_3.18.patch
+++ b/package/kernel/lantiq/ltq-adsl/patches/140-linux_3.18.patch
@@ -1,6 +1,6 @@
 --- a/src/include/drv_dsl_cpe_os_linux.h
 +++ b/src/include/drv_dsl_cpe_os_linux.h
-@@ -214,12 +214,25 @@ static inline int dsl_mutex_lock(struct 
+@@ -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



More information about the lede-commits mailing list