Re: dkms-agrsm-2.1.80-2mdv2009.0.i586.rpm fails with kernel >= 2.6.29.X

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Antonio,

 Those sources are too old to work with the kernels >= 2.6.27

 You may want to have a look at the sources located at
http://linux.zsolttech.com/linmodem/agrsm/ and hack those with
 the patch I attach here. I used it to get the driver working
 with the 2.6.27-rc9 kernel.
 Note that the patched sources may build and still not work with
the recent kernels (28 and higher).
 
 I guess the HDA.c stuff in that driver is out of sync with
 the current ALSA developments in the 29 kernel anyway.

-- 
WBR, Nikolay Zhuravlev

Thus spake Antonio Olivares (olivares14031@xxxxxxxxx):

> Dear all,
> 
> Just an observation, dkms-agrsm-2.1.80-2mdv2009.0.i586 fails to build
> against updates-testing kernel 2.6.29.3-60.fc10.i686.PAE:
> 
> [root@localhost Download]# rpm -ivh dkms-agrsm-2.1.80-2mdv2009.0.i586.rpm
> warning: dkms-agrsm-2.1.80-2mdv2009.0.i586.rpm: Header V3 DSA
> signature: NOKEY, key ID 26752624
> Preparing...                ########################################### [100%]
>    1:dkms-agrsm             ########################################### [100%]
> 
> Creating symlink /var/lib/dkms/agrsm/2.1.80-2mdv2009.0/source ->
>                  /usr/src/agrsm-2.1.80-2mdv2009.0
> 
> DKMS: add Completed.
> 
> Kernel preparation unnecessary for this kernel.  Skipping...
> 
> Building module:
> cleaning build area....
> make KERNELRELEASE=2.6.29.3-60.fc10.i686.PAE -C
> /lib/modules/2.6.29.3-60.fc10.i686.PAE/build
> M=/var/lib/dkms/agrsm/2.1.80-2mdv2009.0/build....(bad exit status: 2)
> 
> Error! Bad return status for module build on kernel:
> 2.6.29.3-60.fc10.i686.PAE (i686)
> Consult the make.log in the build directory
> /var/lib/dkms/agrsm/2.1.80-2mdv2009.0/build/ for more information.
> 0
> 0
> 
> Error! Could not locate agrmodem.ko for module agrsm in the DKMS tree.
> You must run a dkms build for kernel 2.6.29.3-60.fc10.i686.PAE (i686) first.
> 
> [root@localhost Download]# cat
> /var/lib/dkms/agrsm/2.1.80-2mdv2009.0/build/make.log
> DKMS make.log for agrsm-2.1.80-2mdv2009.0 for kernel
> 2.6.29.3-60.fc10.i686.PAE (i686)
> Fri May 15 22:37:02 CDT 2009
> make: Entering directory `/usr/src/kernels/2.6.29.3-60.fc10.i686.PAE'
>   LD      /var/lib/dkms/agrsm/2.1.80-2mdv2009.0/build/built-in.o
>   CC [M]  /var/lib/dkms/agrsm/2.1.80-2mdv2009.0/build/agrsoftmodem.o
> /var/lib/dkms/agrsm/2.1.80-2mdv2009.0/build/agrsoftmodem.c: In
> function ‘x_request_region’:
> /var/lib/dkms/agrsm/2.1.80-2mdv2009.0/build/agrsoftmodem.c:261: error:
> too few arguments to function ‘__request_region’
> /var/lib/dkms/agrsm/2.1.80-2mdv2009.0/build/agrsoftmodem.c: In
> function ‘kill_proc_wrap’:
> /var/lib/dkms/agrsm/2.1.80-2mdv2009.0/build/agrsoftmodem.c:309: error:
> implicit declaration of function ‘kill_proc’
> /var/lib/dkms/agrsm/2.1.80-2mdv2009.0/build/agrsoftmodem.c: In
> function ‘agr_pci_find_device’:
> /var/lib/dkms/agrsm/2.1.80-2mdv2009.0/build/agrsoftmodem.c:360:
> warning: ignoring return value of ‘pci_enable_device’, declared with
> attribute warn_unused_result
> /var/lib/dkms/agrsm/2.1.80-2mdv2009.0/build/agrsoftmodem.c: In
> function ‘x_task_queue_init’:
> /var/lib/dkms/agrsm/2.1.80-2mdv2009.0/build/agrsoftmodem.c:440:
> warning: assignment from incompatible pointer type
> /var/lib/dkms/agrsm/2.1.80-2mdv2009.0/build/agrsoftmodem.c: In
> function ‘x_task_queue_init_usb’:
> /var/lib/dkms/agrsm/2.1.80-2mdv2009.0/build/agrsoftmodem.c:452:
> warning: assignment from incompatible pointer type
> /var/lib/dkms/agrsm/2.1.80-2mdv2009.0/build/agrsoftmodem.c: At top level:
> /var/lib/dkms/agrsm/2.1.80-2mdv2009.0/build/agrsoftmodem.c:479:
> warning: function declaration isn’t a prototype
> /var/lib/dkms/agrsm/2.1.80-2mdv2009.0/build/agrsoftmodem.c:501:
> warning: function declaration isn’t a prototype
> /var/lib/dkms/agrsm/2.1.80-2mdv2009.0/build/agrsoftmodem.c:511:
> warning: function declaration isn’t a prototype
> /var/lib/dkms/agrsm/2.1.80-2mdv2009.0/build/agrsoftmodem.c:512:
> warning: function declaration isn’t a prototype
> make[1]: *** [/var/lib/dkms/agrsm/2.1.80-2mdv2009.0/build/agrsoftmodem.o]
> Error 1
> make: *** [_module_/var/lib/dkms/agrsm/2.1.80-2mdv2009.0/build] Error 2
> make: Leaving directory `/usr/src/kernels/2.6.29.3-60.fc10.i686.PAE'
> [root@localhost Download]#
> 
> 
> Regards,
> 
> Antonio
diff -Naur tmp/agrsm-2.1.80-4mdv2009.0/agrsoftmodem.c agrsm-2.1.80-4mdv2009.0/agrsoftmodem.c
--- tmp/agrsm-2.1.80-4mdv2009.0/agrsoftmodem.c	2008-12-08 16:03:33.000000000 +0300
+++ agrsm-2.1.80-4mdv2009.0/agrsoftmodem.c	2009-04-17 03:41:39.000000000 +0400
@@ -132,6 +132,8 @@
 };
 MODULE_DEVICE_TABLE (usb, uss_table);
 
+#ifdef USB_MODEM
+#ifdef NONGPL
 static struct usb_driver uss_driver = { 
 //bala-dbg
 //	.owner		= THIS_MODULE, 
@@ -140,6 +142,8 @@
 	.disconnect 	= uss_disconnect, 
 	.id_table   	= uss_table, 
 };  
+#endif
+#endif
 
 struct usb_uss *dev = NULL;
 extern unsigned char IsCmdCompleted;
@@ -454,8 +458,7 @@
 	INIT_TQUEUE(x_tqueue, func, data);
 #else
 	struct work_struct *x_tqueue = (struct work_struct *) task_x;
-
-    INIT_WORK(x_tqueue, wrap_LXHardwareBottomHalf);
+    INIT_WORK(x_tqueue, (work_func_t)wrap_LXHardwareBottomHalf);
 #endif
 }
 
@@ -466,7 +469,7 @@
 	INIT_TQUEUE(x_tqueue, func, data);
 #else
 	struct work_struct *x_tqueue = (struct work_struct *) task_x;
-	INIT_WORK(x_tqueue, func);   
+	INIT_WORK(x_tqueue, (work_func_t)func);   
 #endif
 }
 
@@ -493,7 +496,7 @@
 #ifdef USB_MODEM
 
 #define to_uss_dev(d) container_of(d, struct usb_uss, kref)
-fnatr void *xkmalloc(d) { return kmalloc(d, GFP_KERNEL); }
+fnatr void *xkmalloc(size_t d) { return kmalloc(d, GFP_KERNEL); }
 fnatr void *kmalloc_dev(void) {
 	dev = kmalloc(sizeof(struct usb_uss), GFP_KERNEL);
     	if(dev) memset(dev, 0x00, sizeof(struct usb_uss));
@@ -519,7 +522,7 @@
 fnatr void *get_iface_desc(void *p) 	{return  (((struct usb_interface *)p)->cur_altsetting);}
 fnatr int  get_num_endpoints(void *p) 	{return (((struct usb_host_interface *)p)->desc.bNumEndpoints);}
 fnatr void x_kref_put(void *p) 		{if (dev)  kref_put(&dev->kref, p); }
-fnatr void x_kref_init()		{kref_init(&dev->kref);}
+fnatr void x_kref_init(void)		{kref_init(&dev->kref);}
 fnatr int  IsDirIn(int addr) 		{return (addr & USB_DIR_IN);}
 fnatr int  IsBulkXfer(int attr) 	{return ((attr & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_BULK);}
 fnatr int  x_le16_to_cpu(int d) 	{return le16_to_cpu(d);}
@@ -529,14 +532,14 @@
 fnatr int  get_urb_status(void *p) 	{return (((struct urb *)p)->status);}
 fnatr void *get_urb_context(void *p) 	{return (((struct urb *)p)->context);}
 fnatr void *get_dev(void) 		{return dev;}
-fnatr void *x_usb_alloc_urb_kernel() 	{
+fnatr void *x_usb_alloc_urb_kernel(void) 	{
 	#ifdef NONGPL
 	return usb_alloc_urb(0, GFP_KERNEL);
 	#else 
 	return 0;
 	#endif
 }
-fnatr void *x_usb_alloc_urb_atomic() 	{
+fnatr void *x_usb_alloc_urb_atomic(void) 	{
 	#ifdef NONGPL
 	return usb_alloc_urb(0, GFP_ATOMIC);
 	#else
diff -Naur tmp/agrsm-2.1.80-4mdv2009.0/HDA.c agrsm-2.1.80-4mdv2009.0/HDA.c
--- tmp/agrsm-2.1.80-4mdv2009.0/HDA.c	2008-12-08 16:03:33.000000000 +0300
+++ agrsm-2.1.80-4mdv2009.0/HDA.c	2009-04-23 00:58:35.000000000 +0400
@@ -246,7 +246,7 @@
 temp = (unsigned long *) chip_temp->remap_addr;
 for (i=0; i<(0x1A0/4);)
 {
-	snd_printk(KERN_ERR"HDA register %04X %08X %08X %08X %08X\n",i*4,(unsigned int)temp[i],(unsigned int)temp[i+1],(unsigned int)temp[i+2],(unsigned int)temp[i+3]);
+	snd_printk(KERN_ERR"HDA register %04X %08lX %08lX %08lX %08lX\n",i*4,temp[i],temp[i+1],temp[i+2],temp[i+3]);
 	i = i+4;
 }
 }
@@ -357,6 +357,7 @@
 return rvalue;
 }
 
+#ifdef CONFIG_SND_HDA_POWER_SAVE
 void snd_hda_power_up(struct hda_codec *codec)
 {
   return;
@@ -366,6 +367,7 @@
 {
   return;
 }
+#endif
 
 /**
  * snd_hda_codec_write - send a single command without waiting for response
diff -Naur tmp/agrsm-2.1.80-4mdv2009.0/Makefile agrsm-2.1.80-4mdv2009.0/Makefile
--- tmp/agrsm-2.1.80-4mdv2009.0/Makefile	2008-06-05 16:43:34.000000000 +0400
+++ agrsm-2.1.80-4mdv2009.0/Makefile	2009-04-17 02:05:54.000000000 +0400
@@ -8,7 +8,8 @@
 #   - Modem Serail Interface driver module
 #
 # Usage:
-#   make install: to make and install the driver modules
+#   make module: to build the driver modules
+#   make install: to build and install the driver modules
 #   make uninstall: to uninstall the driver modules
 #
 # Revision History:
@@ -19,63 +20,41 @@
 KERNEL_DIR = /lib/modules/`uname -r`/build/
 #KERNEL_DIR = /usr/src/linux-`uname -r | sed -e 's,\-default,,'`/
 #KERNEL_DIR = /usr/src/linux-`uname -r | sed -e 's,\-.*,,'`/
-KERNEL_DIR1 = /usr/src/linux-`uname -r`/include
-KERNEL_DIR2 = /usr/src/linux-`uname -r | sed -e 's,\-.*,,'`/include
-KERNEL_DIR5 = /usr/src/linux-`uname -r | sed -e 's,\-.*,,'`/include/asm/mach-default
-KERNEL_DIR3 = /usr/src/linux-`uname -r | sed -e 's,\..*,,'`.`uname -r | sed -e 's,[^\.]*\.,,' -e 's,\..*,,'`/include
-KERNEL_DIR4 = /usr/src/linux-`uname -r | sed -e 's,\-.*,,'`.SuSE/include
-
-I_FLAGS =  -I$(KERNEL_DIR1) -I$(KERNEL_DIR2) -I$(KERNEL_DIR5) -I$(KERNEL_DIR3) -I$(KERNEL_DIR4)/include
-
-#C_FLAGS = -Wall -Wno-unused -O2 -fomit-frame-pointer -fno-strength-reduce  -pipe\
-#		-mcpu=i486 -falign-loops=2 -falign-jumps=2 -falign-functions=2 \
-#		-DMODULE -D__KERNEL__ -DLT_KER_24 -DLT_KER_26 -DKERNEL_DIR -DNO_EEPROM
-
-C_FLAGS = -Wall	-Wno-unused -O1 -fomit-frame-pointer -fno-strength-reduce -pipe \
-		-fno-gcse-after-reload \
-		-falign-loops=2 -falign-jumps=2 -falign-functions=2 \
-		-DMODULE -D__KERNEL__ -DLT_KER_24 -DLT_KER_26 -DNO_EEPROM $(I_FLAGS)
 
-EXTRA_CFLAGS += -Wall -DLT_KER_24 -DLT_KER_26 -DNO_EEPROM 
+EXTRA_CFLAGS += -Wall -DLT_KER_26
 
 EXTRA_LDFLAGS := -d
     
 help :
 	@echo ''
+	@echo 'Run "make module" to build Agere Systems Soft Modem.'
 	@echo 'Run "make install" to install Agere Systems Soft Modem on your system.'
 	@echo 'Run "make uninstall" to remove a previously installed modem.'
 	@echo ''
 
+obj-m := agrmodem.o agrserial.o
+
 agrmodem-objs := \
         agrsoftmodem.o agrmodemlib.o HDA.o
 
 agrserial-objs := \
 	serial26.o
 
-obj-m += agrmodem.o agrserial.o
-
 module:
 #	cp ../../build/Linux/dbg-agr-linux-fedora-6-0/bin/AGRSMDM_lib.o agrmodemlib.o
 
-	make -C $(KERNEL_DIR) SUBDIRS=$(PWD) modules
+	make -C $(KERNEL_DIR) M=$(PWD) modules
 
 $(obj)/agrmodemlib.o:
 	cp $(src)/agrmodemlib.o $(obj)/agrmodemlib.o
 
 clean:
-	rm -f *.a
-	rm -f *~
 	rm -f agrmodem.o
-	rm -f agrmodem.ko
-	rm -f agrmodem.mod.o
-	rm -f agrmodem.mod.c
 	rm -f agrserial.o
-	rm -f agrserial.ko
-	rm -f agrserial.mod.o
-	rm -f agrserial.mod.c
 	rm -f agrsoftmodem.o
 	rm -f serial26.o
 	rm -f HDA.o
+	rm -fr *.mod.c *.mod.o .*.cmd *.ko *~ .??* modules.order Module.symvers
 
 install:
 	./agrinst

[Index of Archives]     [Linux Media Development]     [Asterisk]     [DCCP]     [Netdev]     [X.org]     [Xfree86]     [Fedora Women]     [Linux USB]

  Powered by Linux