48e9d173d4bf47b2dfab7b59a0c92290ff187ee8
[openwrt/svn-archive/archive.git] / package / lqdsl / patches / 500-portability.patch
1 Index: drv_dsl_cpe_api-3.24.4.4/configure.in
2 ===================================================================
3 --- drv_dsl_cpe_api-3.24.4.4.orig/configure.in 2009-08-13 13:39:21.000000000 +0200
4 +++ drv_dsl_cpe_api-3.24.4.4/configure.in 2010-10-14 02:14:55.000000000 +0200
5 @@ -310,7 +310,7 @@
6 AC_ARG_ENABLE(kernelbuild,
7 AC_HELP_STRING(--enable-kernel-build=x,Set the target kernel build path),
8 [
9 - if test -e $enableval/include/linux/autoconf.h; then
10 + if test -e $enableval/include/linux/autoconf.h -o -e $enableval/include/generated/autoconf.h; then
11 AC_SUBST([KERNEL_BUILD_PATH],[$enableval])
12 else
13 AC_MSG_ERROR([The kernel build directory is not valid or not configured!])
14 @@ -333,12 +333,12 @@
15 echo Set the lib_ifxos include path $enableval
16 AC_SUBST([IFXOS_INCLUDE_PATH],[$enableval])
17 else
18 - echo -e Set the default lib_ifxos include path $DEFAULT_IFXOS_INCLUDE_PATH
19 + echo Set the default lib_ifxos include path $DEFAULT_IFXOS_INCLUDE_PATH
20 AC_SUBST([IFXOS_INCLUDE_PATH],[$DEFAULT_IFXOS_INCLUDE_PATH])
21 fi
22 ],
23 [
24 - echo -e Set the default lib_ifxos include path $DEFAULT_IFXOS_INCLUDE_PATH
25 + echo Set the default lib_ifxos include path $DEFAULT_IFXOS_INCLUDE_PATH
26 AC_SUBST([IFXOS_INCLUDE_PATH],[$DEFAULT_IFXOS_INCLUDE_PATH])
27 ]
28 )
29 @@ -1702,73 +1702,73 @@
30 AC_SUBST([DISTCHECK_CONFIGURE_PARAMS],[$CONFIGURE_OPTIONS])
31
32 AC_CONFIG_COMMANDS_PRE([
33 -echo -e "------------------------------------------------------------------------"
34 -echo -e " Configuration for drv_dsl_cpe_api:"
35 -echo -e " Configure model type: $DSL_CONFIG_MODEL_TYPE"
36 -echo -e " Source code location: $srcdir"
37 -echo -e " Compiler: $CC"
38 -echo -e " Compiler c-flags: $CFLAGS"
39 -echo -e " Extra compiler c-flags: $EXTRA_DRV_CFLAGS"
40 -echo -e " Host System Type: $host"
41 -echo -e " Install path: $prefix"
42 -echo -e " Linux kernel include path: $KERNEL_INCL_PATH"
43 -echo -e " Linux kernel build path: $KERNEL_BUILD_PATH"
44 -echo -e " Linux kernel architecture: $KERNEL_ARCH"
45 -echo -e " Include IFXOS: $INCLUDE_DSL_CPE_API_IFXOS_SUPPORT"
46 -echo -e " IFXOS include path: $IFXOS_INCLUDE_PATH"
47 -echo -e " Driver Include Path $DSL_DRIVER_INCL_PATH"
48 -echo -e " DSL device: $DSL_DEVICE_NAME"
49 -echo -e " Max device number: $DSL_DRV_MAX_DEVICE_NUMBER"
50 -echo -e " Channels per line: $DSL_CHANNELS_PER_LINE"
51 -echo -e " Build lib (only for kernel 2.6) $DSL_CPE_API_LIBRARY_BUILD_2_6"
52 -echo -e " DSL data led flash frequency: $DSL_DATA_LED_FLASH_FREQUENCY Hz"
53 -echo -e " Disable debug prints: $DSL_DEBUG_DISABLE"
54 -echo -e " Preselection of max. debug level: $DSL_DBG_MAX_LEVEL_SET"
55 -echo -e " Preselected max. debug level: $DSL_DBG_MAX_LEVEL_PRE"
56 -echo -e " Include deprecated functions: $INCLUDE_DEPRECATED"
57 -echo -e " Include Device Exception Codes: $INCLUDE_DEVICE_EXCEPTION_CODES"
58 -echo -e " Include FW request support: $INCLUDE_FW_REQUEST_SUPPORT"
59 -echo -e " Include ADSL trace buffer: $INCLUDE_DSL_CPE_TRACE_BUFFER"
60 -echo -e " Include ADSL MIB: $INCLUDE_DSL_ADSL_MIB"
61 -echo -e " Include ADSL LED: $INCLUDE_ADSL_LED"
62 -echo -e " Include CEOC: $INCLUDE_DSL_CEOC"
63 -echo -e " Include config get support: $INCLUDE_DSL_CONFIG_GET"
64 -echo -e " Include System i/f configuration: $INCLUDE_DSL_SYSTEM_INTERFACE"
65 -echo -e " Include Resource Statistics: $INCLUDE_DSL_RESOURCE_STATISTICS"
66 -echo -e " Include Framing Parameters: $INCLUDE_DSL_FRAMING_PARAMETERS"
67 -echo -e " Include G997 Line Inventory: $INCLUDE_DSL_G997_LINE_INVENTORY"
68 -echo -e " Include G997 Framing Parameters: $INCLUDE_DSL_G997_FRAMING_PARAMETERS"
69 -echo -e " Include G997 per tone data: $INCLUDE_DSL_G997_PER_TONE"
70 -echo -e " Include G997 status: $INCLUDE_DSL_G997_STATUS"
71 -echo -e " Include G997 alarm: $INCLUDE_DSL_G997_ALARM"
72 -echo -e " Include DSL Bonding: $INCLUDE_DSL_BONDING"
73 -echo -e " Include Misc Line Status $INCLUDE_DSL_CPE_MISC_LINE_STATUS"
74 -echo -e " Include DELT: $INCLUDE_DSL_DELT"
75 -echo -e " Include DELT data static storage: $DSL_CPE_STATIC_DELT_DATA"
76 -echo -e " Include PM: $INCLUDE_DSL_PM"
77 -echo -e " Include PM config: $INCLUDE_DSL_CPE_PM_CONFIG"
78 -echo -e " Include PM total: $INCLUDE_DSL_CPE_PM_TOTAL_COUNTERS"
79 -echo -e " Include PM history: $INCLUDE_DSL_CPE_PM_HISTORY"
80 -echo -e " Include PM showtime: $INCLUDE_DSL_CPE_PM_SHOWTIME_COUNTERS"
81 -echo -e " Include PM optional: $INCLUDE_DSL_CPE_PM_OPTIONAL_PARAMETERS"
82 -echo -e " Include PM line: $INCLUDE_DSL_CPE_PM_LINE_COUNTERS"
83 -echo -e " Include PM line event showtime: $INCLUDE_DSL_CPE_PM_LINE_EVENT_SHOWTIME_COUNTERS"
84 -echo -e " Include PM channel: $INCLUDE_DSL_CPE_PM_CHANNEL_COUNTERS"
85 -echo -e " Include PM channel extended: $INCLUDE_DSL_CPE_PM_CHANNEL_EXT_COUNTERS"
86 -echo -e " Include PM data path: $INCLUDE_DSL_CPE_PM_DATA_PATH_COUNTERS"
87 -echo -e " Include PM data path failure: $INCLUDE_DSL_CPE_PM_DATA_PATH_FAILURE_COUNTERS"
88 -echo -e " Include PM ReTx: $INCLUDE_DSL_CPE_PM_RETX_COUNTERS"
89 -echo -e " Include PM line threshold: $INCLUDE_DSL_CPE_PM_LINE_THRESHOLDS"
90 -echo -e " Include PM channel threshold: $INCLUDE_DSL_CPE_PM_CHANNEL_THRESHOLDS"
91 -echo -e " Include PM data path threshold: $INCLUDE_DSL_CPE_PM_DATA_PATH_THRESHOLDS"
92 -echo -e " Include PM ReTx threshold: $INCLUDE_DSL_CPE_PM_RETX_THRESHOLDS"
93 -echo -e " Include FW memory free support: $INCLUDE_DSL_FIRMWARE_MEMORY_FREE"
94 -echo -e "----------------------- deprectated ! ----------------------------------"
95 -echo -e " Include PM line failure: $INCLUDE_DSL_CPE_PM_LINE_FAILURE_COUNTERS"
96 -echo -e ""
97 -echo -e " Settings:"
98 -echo -e " Configure options: $CONFIGURE_OPTIONS"
99 -echo -e "------------------------------------------------------------------------"
100 +echo "------------------------------------------------------------------------"
101 +echo " Configuration for drv_dsl_cpe_api:"
102 +echo " Configure model type: $DSL_CONFIG_MODEL_TYPE"
103 +echo " Source code location: $srcdir"
104 +echo " Compiler: $CC"
105 +echo " Compiler c-flags: $CFLAGS"
106 +echo " Extra compiler c-flags: $EXTRA_DRV_CFLAGS"
107 +echo " Host System Type: $host"
108 +echo " Install path: $prefix"
109 +echo " Linux kernel include path: $KERNEL_INCL_PATH"
110 +echo " Linux kernel build path: $KERNEL_BUILD_PATH"
111 +echo " Linux kernel architecture: $KERNEL_ARCH"
112 +echo " Include IFXOS: $INCLUDE_DSL_CPE_API_IFXOS_SUPPORT"
113 +echo " IFXOS include path: $IFXOS_INCLUDE_PATH"
114 +echo " Driver Include Path $DSL_DRIVER_INCL_PATH"
115 +echo " DSL device: $DSL_DEVICE_NAME"
116 +echo " Max device number: $DSL_DRV_MAX_DEVICE_NUMBER"
117 +echo " Channels per line: $DSL_CHANNELS_PER_LINE"
118 +echo " Build lib (only for kernel 2.6) $DSL_CPE_API_LIBRARY_BUILD_2_6"
119 +echo " DSL data led flash frequency: $DSL_DATA_LED_FLASH_FREQUENCY Hz"
120 +echo " Disable debug prints: $DSL_DEBUG_DISABLE"
121 +echo " Preselection of max. debug level: $DSL_DBG_MAX_LEVEL_SET"
122 +echo " Preselected max. debug level: $DSL_DBG_MAX_LEVEL_PRE"
123 +echo " Include deprecated functions: $INCLUDE_DEPRECATED"
124 +echo " Include Device Exception Codes: $INCLUDE_DEVICE_EXCEPTION_CODES"
125 +echo " Include FW request support: $INCLUDE_FW_REQUEST_SUPPORT"
126 +echo " Include ADSL trace buffer: $INCLUDE_DSL_CPE_TRACE_BUFFER"
127 +echo " Include ADSL MIB: $INCLUDE_DSL_ADSL_MIB"
128 +echo " Include ADSL LED: $INCLUDE_ADSL_LED"
129 +echo " Include CEOC: $INCLUDE_DSL_CEOC"
130 +echo " Include config get support: $INCLUDE_DSL_CONFIG_GET"
131 +echo " Include System i/f configuration: $INCLUDE_DSL_SYSTEM_INTERFACE"
132 +echo " Include Resource Statistics: $INCLUDE_DSL_RESOURCE_STATISTICS"
133 +echo " Include Framing Parameters: $INCLUDE_DSL_FRAMING_PARAMETERS"
134 +echo " Include G997 Line Inventory: $INCLUDE_DSL_G997_LINE_INVENTORY"
135 +echo " Include G997 Framing Parameters: $INCLUDE_DSL_G997_FRAMING_PARAMETERS"
136 +echo " Include G997 per tone data: $INCLUDE_DSL_G997_PER_TONE"
137 +echo " Include G997 status: $INCLUDE_DSL_G997_STATUS"
138 +echo " Include G997 alarm: $INCLUDE_DSL_G997_ALARM"
139 +echo " Include DSL Bonding: $INCLUDE_DSL_BONDING"
140 +echo " Include Misc Line Status $INCLUDE_DSL_CPE_MISC_LINE_STATUS"
141 +echo " Include DELT: $INCLUDE_DSL_DELT"
142 +echo " Include DELT data static storage: $DSL_CPE_STATIC_DELT_DATA"
143 +echo " Include PM: $INCLUDE_DSL_PM"
144 +echo " Include PM config: $INCLUDE_DSL_CPE_PM_CONFIG"
145 +echo " Include PM total: $INCLUDE_DSL_CPE_PM_TOTAL_COUNTERS"
146 +echo " Include PM history: $INCLUDE_DSL_CPE_PM_HISTORY"
147 +echo " Include PM showtime: $INCLUDE_DSL_CPE_PM_SHOWTIME_COUNTERS"
148 +echo " Include PM optional: $INCLUDE_DSL_CPE_PM_OPTIONAL_PARAMETERS"
149 +echo " Include PM line: $INCLUDE_DSL_CPE_PM_LINE_COUNTERS"
150 +echo " Include PM line event showtime: $INCLUDE_DSL_CPE_PM_LINE_EVENT_SHOWTIME_COUNTERS"
151 +echo " Include PM channel: $INCLUDE_DSL_CPE_PM_CHANNEL_COUNTERS"
152 +echo " Include PM channel extended: $INCLUDE_DSL_CPE_PM_CHANNEL_EXT_COUNTERS"
153 +echo " Include PM data path: $INCLUDE_DSL_CPE_PM_DATA_PATH_COUNTERS"
154 +echo " Include PM data path failure: $INCLUDE_DSL_CPE_PM_DATA_PATH_FAILURE_COUNTERS"
155 +echo " Include PM ReTx: $INCLUDE_DSL_CPE_PM_RETX_COUNTERS"
156 +echo " Include PM line threshold: $INCLUDE_DSL_CPE_PM_LINE_THRESHOLDS"
157 +echo " Include PM channel threshold: $INCLUDE_DSL_CPE_PM_CHANNEL_THRESHOLDS"
158 +echo " Include PM data path threshold: $INCLUDE_DSL_CPE_PM_DATA_PATH_THRESHOLDS"
159 +echo " Include PM ReTx threshold: $INCLUDE_DSL_CPE_PM_RETX_THRESHOLDS"
160 +echo " Include FW memory free support: $INCLUDE_DSL_FIRMWARE_MEMORY_FREE"
161 +echo "----------------------- deprectated ! ----------------------------------"
162 +echo " Include PM line failure: $INCLUDE_DSL_CPE_PM_LINE_FAILURE_COUNTERS"
163 +echo ""
164 +echo " Settings:"
165 +echo " Configure options: $CONFIGURE_OPTIONS"
166 +echo "------------------------------------------------------------------------"
167 ])
168
169 AC_CONFIG_FILES([Makefile src/Makefile])
170 Index: drv_dsl_cpe_api-3.24.4.4/src/Makefile.am
171 ===================================================================
172 --- drv_dsl_cpe_api-3.24.4.4.orig/src/Makefile.am 2009-07-03 14:06:34.000000000 +0200
173 +++ drv_dsl_cpe_api-3.24.4.4/src/Makefile.am 2010-10-14 02:14:55.000000000 +0200
174 @@ -303,7 +303,7 @@
175 drv_dsl_cpe_api_OBJS = "$(subst .c,.o,$(filter %.c,$(drv_dsl_cpe_api_SOURCES)))"
176
177 drv_dsl_cpe_api.ko: $(drv_dsl_cpe_api_SOURCES)
178 - @echo -e "drv_dsl_cpe_api: Making Linux 2.6.x kernel object"
179 + @echo "drv_dsl_cpe_api: Making Linux 2.6.x kernel object"
180 if test ! -e common/drv_dsl_cpe_api.c ; then \
181 echo "copy source files (as links only!)"; \
182 for f in $(filter %.c,$(drv_dsl_cpe_api_SOURCES)); do \
183 @@ -311,10 +311,10 @@
184 cp -s $(addprefix @abs_srcdir@/,$$f) $(PWD)/`dirname $$f`/ ; \
185 done \
186 fi
187 - @echo -e "# drv_dsl_cpe_api: Generated to build Linux 2.6.x kernel object" > $(PWD)/Kbuild
188 - @echo -e "obj-m := $(subst .ko,.o,$@)" >> $(PWD)/Kbuild
189 - @echo -e "$(subst .ko,,$@)-y := $(drv_dsl_cpe_api_OBJS)" >> $(PWD)/Kbuild
190 - @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
191 + @echo "# drv_dsl_cpe_api: Generated to build Linux 2.6.x kernel object" > $(PWD)/Kbuild
192 + @echo "obj-m := $(subst .ko,.o,$@)" >> $(PWD)/Kbuild
193 + @echo "$(subst .ko,,$@)-y := $(drv_dsl_cpe_api_OBJS)" >> $(PWD)/Kbuild
194 + @echo "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
195 $(MAKE) ARCH=@KERNEL_ARCH@ -C @KERNEL_BUILD_PATH@ O=@KERNEL_BUILD_PATH@ M=$(PWD) modules
196
197 clean-generic:
198 Index: drv_dsl_cpe_api-3.24.4.4/src/include/drv_dsl_cpe_os_linux.h
199 ===================================================================
200 --- drv_dsl_cpe_api-3.24.4.4.orig/src/include/drv_dsl_cpe_os_linux.h 2010-10-14 02:14:55.000000000 +0200
201 +++ drv_dsl_cpe_api-3.24.4.4/src/include/drv_dsl_cpe_os_linux.h 2010-10-14 02:14:55.000000000 +0200
202 @@ -16,8 +16,6 @@
203 extern "C" {
204 #endif
205
206 -#include <asm/ioctl.h>
207 -#include <generated/autoconf.h>
208 #include <linux/module.h>
209 #include <linux/kernel.h>
210 #include <linux/init.h>
211 @@ -40,6 +38,7 @@
212 #include <linux/poll.h>
213 #include <asm/uaccess.h>
214 #include <linux/smp_lock.h>
215 +#include <asm/ioctl.h>
216
217 #ifdef INCLUDE_DSL_CPE_API_IFXOS_SUPPORT
218 /** IFXOS includes*/