From db56769b0a1c5b9bcc4506850de78ceeeb7f4334 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Tue, 29 Mar 2011 05:17:10 +0000 Subject: * several updates to the voice packages SVN-Revision: 26351 --- package/ltq-tapi/Makefile | 2 +- package/ltq-tapi/patches/000-portability.patch | 82 ++++++++++++++++++++++ package/ltq-tapi/patches/001-portability.patch | 94 -------------------------- package/ltq-tapi/patches/100-ifxmips.patch | 8 +-- package/ltq-tapi/patches/200-linux-37.patch | 65 ++++++++++++++++++ package/ltq-tapi/patches/linux-37.patch | 65 ------------------ 6 files changed, 152 insertions(+), 164 deletions(-) create mode 100644 package/ltq-tapi/patches/000-portability.patch delete mode 100644 package/ltq-tapi/patches/001-portability.patch create mode 100644 package/ltq-tapi/patches/200-linux-37.patch delete mode 100644 package/ltq-tapi/patches/linux-37.patch (limited to 'package/ltq-tapi') diff --git a/package/ltq-tapi/Makefile b/package/ltq-tapi/Makefile index 6c530ac877..ecaac2eeb4 100644 --- a/package/ltq-tapi/Makefile +++ b/package/ltq-tapi/Makefile @@ -22,7 +22,7 @@ define KernelPackage/ltq-tapi SUBMENU:=Voice over IP TITLE:=Lantiq TAPI subsystem URL:=http://www.lantiq.com/ - DEPENDS:=+kmod-ltq-ifxos @TARGET_lantiq_xway + DEPENDS:=+kmod-ltq-ifxos @TARGET_lantiq FILES:=$(PKG_BUILD_DIR)/src/drv_tapi.ko AUTOLOAD:=$(call AutoLoad,20,drv_tapi) MAINTAINER:=John Crispin diff --git a/package/ltq-tapi/patches/000-portability.patch b/package/ltq-tapi/patches/000-portability.patch new file mode 100644 index 0000000000..78fcbad668 --- /dev/null +++ b/package/ltq-tapi/patches/000-portability.patch @@ -0,0 +1,82 @@ +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -154,7 +154,7 @@ if KERNEL_2_6 + drv_tapi_OBJS = "$(subst .c,.o, $(drv_tapi_SOURCES))" + + drv_tapi.ko: $(drv_tapi_SOURCES) $(EXTRA_DIST) +- @echo -e "Making Linux 2.6.x kernel object" ++ @echo "Making Linux 2.6.x kernel object" + @for f in $(drv_tapi_SOURCES) ; do \ + if test ! -e $(PWD)/$$f; then \ + echo " LN $$f" ; \ +@@ -162,10 +162,10 @@ drv_tapi.ko: $(drv_tapi_SOURCES) $(EXTRA + ln -s @abs_srcdir@/$$f $(PWD)/$$f; \ + fi; \ + done; +- @echo -e "# drv_tapi: 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_tapi_OBJS)" >> $(PWD)/Kbuild +- @echo -e "EXTRA_CFLAGS := -DHAVE_CONFIG_H $(CFLAGS) $(drv_tapi_CFLAGS) $(INCLUDES)" >> $(PWD)/Kbuild ++ @echo "# drv_tapi: Generated to build Linux 2.6.x kernel object" > $(PWD)/Kbuild ++ @echo "obj-m := $(subst .ko,.o,$@)" >> $(PWD)/Kbuild ++ @echo "$(subst .ko,,$@)-y := $(drv_tapi_OBJS)" >> $(PWD)/Kbuild ++ @echo "EXTRA_CFLAGS := -DHAVE_CONFIG_H $(CFLAGS) $(drv_tapi_CFLAGS) $(INCLUDES)" >> $(PWD)/Kbuild + $(MAKE) ARCH=@KERNEL_ARCH@ -C @KERNEL_BUILD_PATH@ O=@KERNEL_BUILD_PATH@ M=$(PWD) modules + + clean-generic: +--- a/configure.in ++++ b/configure.in +@@ -128,7 +128,7 @@ dnl Set kernel build path + AC_ARG_ENABLE(kernelbuild, + AS_HELP_STRING(--enable-kernelbuild=x,Set the target kernel build path), + [ +- if test -r $enableval/include/linux/autoconf.h; then ++ if test -e $enableval/include/linux/autoconf.h -o -e $enableval/include/generated/autoconf.h; then + AC_SUBST([KERNEL_BUILD_PATH],[$enableval]) + else + AC_MSG_ERROR([The kernel build directory is not valid or not configured!]) +--- a/src/drv_tapi_linux.h ++++ b/src/drv_tapi_linux.h +@@ -24,6 +24,7 @@ + #include + #include /* in_interrupt() */ + #include /* mdelay - udelay */ ++#include /* work_struct */ + #include /* POLLIN, POLLOUT */ + + #include "ifx_types.h" /* ifx type definitions */ +--- a/src/drv_tapi_linux.c ++++ b/src/drv_tapi_linux.c +@@ -47,6 +47,7 @@ + #include + #include /* copy_from_user(), ... */ + #include ++#include /* lock_kernel() */ + #include + + #ifdef LINUX_2_6 +@@ -55,7 +56,11 @@ + #include + #undef CONFIG_DEVFS_FS + #ifndef UTS_RELEASE +- #include "linux/utsrelease.h" ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)) ++# include ++#else ++# include ++#endif + #endif /* UTC_RELEASE */ + #else + #include +@@ -3718,7 +3723,11 @@ 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 + /* release the big kernel lock */ + unlock_kernel(); + wait_for_completion (&pThrCntrl->thrCompletion); diff --git a/package/ltq-tapi/patches/001-portability.patch b/package/ltq-tapi/patches/001-portability.patch deleted file mode 100644 index 3e6b9cf82e..0000000000 --- a/package/ltq-tapi/patches/001-portability.patch +++ /dev/null @@ -1,94 +0,0 @@ ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -149,7 +149,7 @@ if KERNEL_2_6 - drv_tapi_OBJS = "$(subst .c,.o, $(drv_tapi_SOURCES))" - - drv_tapi.ko: $(drv_tapi_SOURCES) $(EXTRA_DIST) -- @echo -e "Making Linux 2.6.x kernel object" -+ @echo "Making Linux 2.6.x kernel object" - @for f in $(drv_tapi_SOURCES) ; do \ - if test ! -e $(PWD)/$$f; then \ - echo " LN $$f" ; \ -@@ -157,10 +157,10 @@ drv_tapi.ko: $(drv_tapi_SOURCES) $(EXTRA - ln -s @abs_srcdir@/$$f $(PWD)/$$f; \ - fi; \ - done; -- @echo -e "# drv_tapi: 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_tapi_OBJS)" >> $(PWD)/Kbuild -- @echo -e "EXTRA_CFLAGS := -DHAVE_CONFIG_H $(CFLAGS) $(drv_tapi_CFLAGS) $(INCLUDES)" >> $(PWD)/Kbuild -+ @echo "# drv_tapi: Generated to build Linux 2.6.x kernel object" > $(PWD)/Kbuild -+ @echo "obj-m := $(subst .ko,.o,$@)" >> $(PWD)/Kbuild -+ @echo "$(subst .ko,,$@)-y := $(drv_tapi_OBJS)" >> $(PWD)/Kbuild -+ @echo "EXTRA_CFLAGS := -DHAVE_CONFIG_H $(CFLAGS) $(drv_tapi_CFLAGS) $(INCLUDES)" >> $(PWD)/Kbuild - $(MAKE) ARCH=@KERNEL_ARCH@ -C @KERNEL_BUILD_PATH@ O=@KERNEL_BUILD_PATH@ M=$(PWD) modules - - clean-generic: ---- a/configure.in -+++ b/configure.in -@@ -128,7 +128,7 @@ dnl Set kernel build path - AC_ARG_ENABLE(kernelbuild, - AS_HELP_STRING(--enable-kernelbuild=x,Set the target kernel build path), - [ -- if test -r $enableval/include/linux/autoconf.h; then -+ if test -e $enableval/include/linux/autoconf.h -o -e $enableval/include/generated/autoconf.h; then - AC_SUBST([KERNEL_BUILD_PATH],[$enableval]) - else - AC_MSG_ERROR([The kernel build directory is not valid or not configured!]) ---- a/src/drv_tapi_linux.h -+++ b/src/drv_tapi_linux.h -@@ -24,6 +24,7 @@ - #include - #include /* in_interrupt() */ - #include /* mdelay - udelay */ -+#include /* work_struct */ - #include /* POLLIN, POLLOUT */ - - #include "ifx_types.h" /* ifx type definitions */ ---- a/src/drv_tapi_linux.c -+++ b/src/drv_tapi_linux.c -@@ -55,7 +55,7 @@ - #include - #undef CONFIG_DEVFS_FS - #ifndef UTS_RELEASE -- #include "linux/utsrelease.h" -+ #include - #endif /* UTC_RELEASE */ - #else - #include ---- a/src/drv_tapi_linux.c -+++ b/src/drv_tapi_linux.c -@@ -47,6 +47,7 @@ - #include - #include /* copy_from_user(), ... */ - #include -+#include /* lock_kernel() */ - #include - - #ifdef LINUX_2_6 -@@ -55,12 +56,11 @@ - #include - #undef CONFIG_DEVFS_FS - #ifndef UTS_RELEASE -- #include -+ #include - #endif /* UTC_RELEASE */ - #else - #include - #include -- #include /* lock_kernel() */ - #endif /* LINUX_2_6 */ - - #include "drv_tapi.h" -@@ -3600,7 +3600,11 @@ 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 - /* release the big kernel lock */ - unlock_kernel(); - wait_for_completion (&pThrCntrl->thrCompletion); diff --git a/package/ltq-tapi/patches/100-ifxmips.patch b/package/ltq-tapi/patches/100-ifxmips.patch index 13c59f622f..a9c0d8116b 100644 --- a/package/ltq-tapi/patches/100-ifxmips.patch +++ b/package/ltq-tapi/patches/100-ifxmips.patch @@ -1,6 +1,6 @@ --- a/src/drv_tapi_linux.c +++ b/src/drv_tapi_linux.c -@@ -544,7 +544,7 @@ static ssize_t ifx_tapi_write (struct fi +@@ -552,7 +552,7 @@ static ssize_t ifx_tapi_write (struct fi IFX_uint8_t *pData; IFX_size_t buf_size; #endif /* TAPI_PACKET */ @@ -69,9 +69,9 @@ /* ============================= */ --- a/src/lib/lib_bufferpool/lib_bufferpool.c +++ b/src/lib/lib_bufferpool/lib_bufferpool.c -@@ -80,24 +80,6 @@ - #include - #endif /* LINUX */ +@@ -85,24 +85,6 @@ + #include + #endif /*VXWORKS*/ - -/* ============================= */ diff --git a/package/ltq-tapi/patches/200-linux-37.patch b/package/ltq-tapi/patches/200-linux-37.patch new file mode 100644 index 0000000000..0eac62ff9a --- /dev/null +++ b/package/ltq-tapi/patches/200-linux-37.patch @@ -0,0 +1,65 @@ +--- a/src/drv_tapi_linux.c ++++ b/src/drv_tapi_linux.c +@@ -146,8 +146,13 @@ 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 long ifx_tapi_ioctl(struct file *filp, ++ unsigned int nCmd, unsigned long nArgument); ++#endif + static unsigned int ifx_tapi_poll (struct file *filp, poll_table *table); + + #ifdef CONFIG_PROC_FS +@@ -231,7 +236,11 @@ 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.unlocked_ioctl == IFX_NULL) ++#endif + { + #ifdef MODULE + tapi_fops.owner = THIS_MODULE; +@@ -239,7 +248,11 @@ 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.unlocked_ioctl = ifx_tapi_ioctl; ++#endif + tapi_fops.open = ifx_tapi_open; + tapi_fops.release = ifx_tapi_release; + } +@@ -894,8 +907,13 @@ 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 long ifx_tapi_ioctl(struct file *filp, ++ unsigned int nCmd, unsigned long nArg) ++#endif + { + TAPI_FD_PRIV_DATA_t *pTapiPriv; + IFX_TAPI_ioctlCtx_t ctx; +--- a/src/lib/lib_fifo/lib_fifo.c ++++ b/src/lib/lib_fifo/lib_fifo.c +@@ -41,7 +41,7 @@ + #ifdef LINUX + /* if linux/slab.h is not available, use the precessor linux/malloc.h */ + #include +-#elif VXWORKS ++#elif defined(VXWORKS) + #include + #endif /* LINUX */ + diff --git a/package/ltq-tapi/patches/linux-37.patch b/package/ltq-tapi/patches/linux-37.patch deleted file mode 100644 index 5d5ff7ed3e..0000000000 --- a/package/ltq-tapi/patches/linux-37.patch +++ /dev/null @@ -1,65 +0,0 @@ ---- a/src/drv_tapi_linux.c -+++ b/src/drv_tapi_linux.c -@@ -128,8 +128,13 @@ - 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 file *filp, -+ unsigned int nCmd, unsigned long nArgument); -+#endif - static unsigned int ifx_tapi_poll (struct file *filp, poll_table *table); - - #ifdef CONFIG_PROC_FS -@@ -213,7 +218,11 @@ - 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.unlocked_ioctl == IFX_NULL) -+#endif - { - #ifdef MODULE - tapi_fops.owner = THIS_MODULE; -@@ -221,7 +230,11 @@ - 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.unlocked_ioctl = ifx_tapi_ioctl; -+#endif - tapi_fops.open = ifx_tapi_open; - tapi_fops.release = ifx_tapi_release; - } -@@ -876,8 +889,13 @@ - - 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 file *filp, -+ unsigned int nCmd, unsigned long nArg) -+#endif - { - TAPI_FD_PRIV_DATA_t *pTapiPriv; - IFX_TAPI_ioctlCtx_t ctx; ---- a/src/lib/lib_fifo/lib_fifo.c -+++ b/src/lib/lib_fifo/lib_fifo.c -@@ -41,7 +41,7 @@ - #ifdef LINUX - /* if linux/slab.h is not available, use the precessor linux/malloc.h */ - #include --#elif VXWORKS -+#elif defined(VXWORKS) - #include - #endif /* LINUX */ - -- cgit v1.2.3