diff -Nru hsfmodem-7.80.02.06x86_64full.orig/diag/makefile hsfmodem-7.80.02.06x86_64full/diag/makefile --- hsfmodem-7.80.02.06x86_64full.orig/diag/makefile 2006-01-13 20:23:50.000000000 +0100 +++ hsfmodem-7.80.02.06x86_64full/diag/makefile 2009-11-29 10:29:03.000000000 +0100 @@ -10,7 +10,7 @@ include $(TOP)/config.mak -include $(TOP)/modules/imported/makeflags.mak -CFLAGS = -I$(TOP)/modules/imported/include -I$(TOP)/modules/include +CFLAGS += -I$(TOP)/modules/imported/include -I$(TOP)/modules/include CFLAGS += $(IMPORTED_FRAMEWORK_DEFS) $(IMPORTED_GENERAL_DEFS) CFLAGS += -DCNXTTARGET="\"$(CNXTTARGET)\"" @@ -41,13 +41,13 @@ $(MKDIR) -p $@ $(CNXTTARGET)diag: diag.o modemexpert.o - $(CC) -o $@ $^ + $(CC) ${LDFLAGS} -o $@ $^ $(CNXTTARGET)scr: scr.o - $(CC) -o $@ $^ + $(CC) ${CFLAGS} ${LDFLAGS} -o $@ $^ $(CNXTTARGET)dmp: dmp.o - $(CC) -o $@ $^ + $(CC) ${CFLAGS} ${LDFLAGS} -o $@ $^ clean: rm -f *.o $(ALL) diff -Nru hsfmodem-7.80.02.06full.orig/modules/GPL/oscompat.h hsfmodem-7.80.02.06full/modules/GPL/oscompat.h --- hsfmodem-7.80.02.06full.orig/modules/GPL/oscompat.h 2009-10-21 23:35:59.000000000 +0100 +++ hsfmodem-7.80.02.06full/modules/GPL/oscompat.h 2011-04-22 16:01:16.547997780 +0100 @@ -197,7 +197,9 @@ * interrupt. */ -#ifdef STATIC_TQUEUE_LOCK +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39) +static DEFINE_SPINLOCK(tqueue_lock); +#elif defined(STATIC_TQUEUE_LOCK) static spinlock_t tqueue_lock __attribute__((unused)) = SPIN_LOCK_UNLOCKED; #else extern spinlock_t tqueue_lock; diff -Nru hsfmodem-7.80.02.06full.orig/modules/GPL/serial_cnxt.c hsfmodem-7.80.02.06full/modules/GPL/serial_cnxt.c --- hsfmodem-7.80.02.06full.orig/modules/GPL/serial_cnxt.c 2009-10-21 23:35:59.000000000 +0100 +++ hsfmodem-7.80.02.06full/modules/GPL/serial_cnxt.c 2011-04-22 16:01:16.551997780 +0100 @@ -1063,7 +1063,11 @@ #ifndef FOUND_UART_REGISTER_PORT +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37) static DECLARE_MUTEX(cnxt_port_sem); +#else +static DEFINE_SEMAPHORE(cnxt_port_sem); +#endif /** * uart_register_port - register a serial port diff -Nru hsfmodem-7.80.02.06full.orig/modules/osdcp.c hsfmodem-7.80.02.06full/modules/osdcp.c --- hsfmodem-7.80.02.06full.orig/modules/osdcp.c 2007-05-07 21:31:57.000000000 +0100 +++ hsfmodem-7.80.02.06full/modules/osdcp.c 2011-04-22 16:01:16.551997780 +0100 @@ -28,7 +28,11 @@ #define DCP_SAMPLE_SIZE sizeof(INT16) static struct list_head dcp_instance_list = LIST_HEAD_INIT(dcp_instance_list); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39) +static DEFINE_SPINLOCK(dcp_lock); +#else static spinlock_t dcp_lock = SPIN_LOCK_UNLOCKED; +#endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,2) #ifdef FOUND_CLASS_SIMPLE static struct class_simple *dcp_class; diff -Nru hsfmodem-7.80.02.06full.orig/modules/osdiag.c hsfmodem-7.80.02.06full/modules/osdiag.c --- hsfmodem-7.80.02.06full.orig/modules/osdiag.c 2006-08-14 13:38:52.000000000 +0100 +++ hsfmodem-7.80.02.06full/modules/osdiag.c 2011-04-22 16:01:16.551997780 +0100 @@ -30,7 +30,11 @@ #define DIAG_NOTIFY_RINGBUF_ELEMENTS 100 static struct list_head diag_instance_list = LIST_HEAD_INIT(diag_instance_list); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39) +static DEFINE_SPINLOCK(diag_lock); +#else static spinlock_t diag_lock = SPIN_LOCK_UNLOCKED; +#endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,2) #ifdef FOUND_CLASS_SIMPLE static struct class_simple *diag_class; @@ -599,7 +603,9 @@ static struct file_operations diag_fops = { .owner = THIS_MODULE, +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36) .ioctl = diag_ioctl, +#endif .fasync = diag_fasync, .poll = diag_poll, .read = diag_read, diff -Nru hsfmodem-7.80.02.06full.orig/modules/osfloat.c hsfmodem-7.80.02.06full/modules/osfloat.c --- hsfmodem-7.80.02.06full.orig/modules/osfloat.c 2008-06-20 17:48:28.000000000 +0100 +++ hsfmodem-7.80.02.06full/modules/osfloat.c 2011-04-22 16:01:16.559997780 +0100 @@ -36,7 +36,11 @@ static fpstate_t fpstates[NFPSTATES]; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39) +static DEFINE_SPINLOCK(fpstates_lock); +#else static spinlock_t fpstates_lock __attribute__((unused)) = SPIN_LOCK_UNLOCKED; +#endif static inline void hsf_kernel_fpu_begin(fpstate_t *fpstate) diff -Nru hsfmodem-7.80.02.06full.orig/modules/osnvm.c hsfmodem-7.80.02.06full/modules/osnvm.c --- hsfmodem-7.80.02.06full.orig/modules/osnvm.c 2007-09-27 23:56:08.000000000 +0100 +++ hsfmodem-7.80.02.06full/modules/osnvm.c 2011-04-22 16:01:16.563997780 +0100 @@ -405,7 +405,11 @@ static LIST_HEAD(nvmelem_writelist); static LIST_HEAD(nvm_newinst_list); +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37) static DECLARE_MUTEX(nvmelem_writelist_sem); +#else +static DEFINE_SEMAPHORE(nvmelem_writelist_sem); +#endif /* nvmelem_writelist_sem must be held by caller */ static BOOL NVM_WriteListAppend(const char *pathname, PVOID pBuf, UINT32 dwSize, enum NVM_FORMAT nvmFormat) diff -Nru hsfmodem-7.80.02.06full.orig/modules/osservices.c hsfmodem-7.80.02.06full/modules/osservices.c --- hsfmodem-7.80.02.06full.orig/modules/osservices.c 2010-05-09 23:36:28.000000000 +0100 +++ hsfmodem-7.80.02.06full/modules/osservices.c 2011-04-22 18:05:11.199996262 +0100 @@ -48,7 +48,9 @@ #include #include #include +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) #include +#endif #include #include @@ -284,7 +286,12 @@ /********************************************************************/ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39) +static DEFINE_SEMAPHORE(current_sem); +static DEFINE_SPINLOCK(atomic_lock); +#else static spinlock_t atomic_lock __attribute__((unused)) = SPIN_LOCK_UNLOCKED; +#endif /**************************************************************************************** The OsAtomicCompareAndSwap function compares the value at the specified address with @@ -465,7 +472,11 @@ #endif #endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39) + down(¤t_sem); +#else lock_kernel(); +#endif #if ( LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) ) exit_mm(current); @@ -499,7 +510,11 @@ #endif } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39) + up(¤t_sem); +#else unlock_kernel(); +#endif #if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) ) flush_signals(current); /* must be called without spinlock */ diff -Nru hsfmodem-7.80.02.06x86_64full.orig/modules/Makefile hsfmodem-7.80.02.06x86_64full/modules/Makefile --- hsfmodem-7.80.02.06x86_64full.orig/modules/Makefile 2009-10-22 00:35:59.000000000 +0200 +++ hsfmodem-7.80.02.06x86_64full/modules/Makefile 2009-11-29 10:29:03.000000000 +0100 @@ -158,7 +158,7 @@ ifeq ($(ON_BUILD_SYSTEM)-$(CONFIG_SND_HDA_INTEL),no-) # On Ubuntu Gutsy (7.10), the HDA modules are not included in linux-image but in a seprarate package # and CONFIG_SND_HDA_INTEL is not enabled in the kernel .config file -CONFIG_SND_HDA_INTEL=$(shell modprobe -n snd-hda-intel > /dev/null 2>&1 && echo y || echo n) +# CONFIG_SND_HDA_INTEL=$(shell modprobe -n snd-hda-intel > /dev/null 2>&1 && echo y || echo n) endif MODULAR_HDA := $(shell test -e ${REAL_KERNELSRC}/include/sound/hda_codec.h && echo yes || echo no) diff -Nru hsfmodem-7.80.02.06x86_64full.orig/scripts/cnxtconfig.in hsfmodem-7.80.02.06x86_64full/scripts/cnxtconfig.in --- hsfmodem-7.80.02.06x86_64full.orig/scripts/cnxtconfig.in 2009-10-22 00:35:59.000000000 +0200 +++ hsfmodem-7.80.02.06x86_64full/scripts/cnxtconfig.in 2009-11-29 10:29:03.000000000 +0100 @@ -2027,9 +2027,9 @@ if [ -d /etc/udev/rules.d ]; then rm -f /etc/udev/rules.d/00-@CNXTTARGET@.rules if [ "@CNXTDRIVER@" = "dgc" ]; then - echo 'KERNEL=="ttyACM0", SYMLINK="modem"' > /etc/udev/rules.d/00-@CNXTTARGET@.rules + echo 'KERNEL=="ttyACM0", SYMLINK="modem", GROUP="dialout"' > /etc/udev/rules.d/99-@CNXTTARGET@.rules else - echo 'KERNEL=="ttyS@CNXTSERDEV@0", SYMLINK="modem"' > /etc/udev/rules.d/00-@CNXTTARGET@.rules + echo 'KERNEL=="ttyS@CNXTSERDEV@0", SYMLINK="modem", GROUP="dialout"' > /etc/udev/rules.d/99-@CNXTTARGET@.rules fi fi diff -Nru hsfmodem-7.80.02.06x86_64full.orig/scripts/rccnxt.in hsfmodem-7.80.02.06x86_64full/scripts/rccnxt.in --- hsfmodem-7.80.02.06x86_64full.orig/scripts/rccnxt.in 2004-11-22 22:59:29.000000000 +0100 +++ hsfmodem-7.80.02.06x86_64full/scripts/rccnxt.in 2009-11-29 10:29:03.000000000 +0100 @@ -1,63 +1,12 @@ -# -# chkconfig: 2345 09 91 -# description: @CNXTDRVDSC@ -# -### BEGIN INIT INFO -# Provides: @CNXTTARGET@ -# Should-Start: hotplug coldplug -# Required-Start: $local_fs -# Required-Stop: $network -# Default-Start: 3 5 -# Default-Stop: 0 1 2 6 -# Description: Start @CNXTDRVDSC@ -### END INIT INFO -if [ -e /etc/runlevels ]; then - begincmd="ebegin" - endcmd="eend" -else - begincmd="echo" - endcmd="/bin/true" -fi - - -start() -{ - ${begincmd} "Starting @CNXTDRVDSC@" +start() { + ebegin "Starting @CNXTDRVDSC@" @CNXTSBINDIR@/@CNXTTARGET@config --rcstart - ${endcmd} 0 + eend 0 } -stop() -{ - ${begincmd} "Stopping @CNXTDRVDSC@" +stop() { + ebegin "Stopping @CNXTDRVDSC@" @CNXTSBINDIR@/@CNXTTARGET@config --rcstop - ${endcmd} 0 + eend 0 } - -restart() -{ - stop - start -} - -if [ ! -e /etc/runlevels ]; then - case "$1" in - start) - start - ;; - stop) - stop - ;; - restart|force-reload|reload) - restart - ;; - status) - exit 3 - ;; - *) - echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}" - exit 1 - ;; - esac -fi