Re: FC4 Test build failure

"Linuxant support (Jonathan)" <[email protected]>
Newsgroups gmane.linux.drivers.modem.hsf
Organization Linuxant Inc.
Message-ID <[email protected]>
Hi,

we are aware of this build issue. To build the HSF driver under the 
Fedora Core 4 Test 1 kernel with the version 7.18.00.03full of the HSF 
driver, you will need the two patches I have attached to this post. 
These patches should be applied to the generic package in the TAR format.

Regards,


Jonathan
Technical specialist / Linuxant
www.linuxant.com
[email protected]


Dennis Gilmore wrote:
> hsfconfig  fails to build on FC4 test1,  Not sure if its  a gcc4 issue or just 
> a kernel change thats cause build to fail.  looks like kernel change.  also a 
> requirement for the rpm  onFC4 will be kernel-devel  as the headers needed to 
> build are now there
> 
> Dennis

_______________________________________________
hsflinux mailing list
[email protected]
https://www.linuxant.com/mailman/listinfo/hsflinux
hsf-7.18.00.03full-gcc4.0.patch (text/x-patch, 942 B)
diff -urN hsfmodem-7.18.00.03full/modules/osnvm.c hsfmodem-7.18.00.03full-gcc4.0/modules/osnvm.c
--- hsfmodem-7.18.00.03full/modules/osnvm.c	2004-12-14 02:44:18.000000000 -0500
+++ hsfmodem-7.18.00.03full-gcc4.0/modules/osnvm.c	2005-03-22 05:27:25.000000000 -0500
@@ -26,7 +26,7 @@
 
 #include <linux/pci.h>
 
-static int errno;
+int errno;
 
 #define caseretstr(x) case CFGMGR_##x: return #x
 
diff -urN hsfmodem-7.18.00.03full/modules/osservices.c hsfmodem-7.18.00.03full-gcc4.0/modules/osservices.c
--- hsfmodem-7.18.00.03full/modules/osservices.c	2004-12-31 05:33:26.000000000 -0500
+++ hsfmodem-7.18.00.03full-gcc4.0/modules/osservices.c	2005-03-22 05:24:40.000000000 -0500
@@ -32,7 +32,7 @@
 #endif
 
 #if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) )
-static spinlock_t tqueue_lock __attribute__((unused)) = SPIN_LOCK_UNLOCKED;
+spinlock_t tqueue_lock __attribute__((unused)) = SPIN_LOCK_UNLOCKED;
 #endif
 
 #ifdef for_each_process
hsf-7.18.00.03full-slotname.patch (text/x-patch, 3.5 KB)
diff -urN hsfmodem-7.18.00.03full/modules/GPL/oscompat.h hsfmodem-7.18.00.03full-slotname/modules/GPL/oscompat.h
--- hsfmodem-7.18.00.03full/modules/GPL/oscompat.h	2005-03-03 15:28:08.000000000 -0500
+++ hsfmodem-7.18.00.03full-slotname/modules/GPL/oscompat.h	2005-03-29 06:52:28.000000000 -0500
@@ -523,4 +523,10 @@
 }
 #endif
 
+#ifdef FOUND_PCI_DEV_SLOT_NAME
+#define PCI_SLOT_NAME(x)  (x)->slot_name
+#else
+#define PCI_SLOT_NAME(x)  (x)->dev.bus_id
+#endif
+
 #endif /* __OSCOMPAT_H */
diff -urN hsfmodem-7.18.00.03full/modules/Makefile hsfmodem-7.18.00.03full-slotname/modules/Makefile
--- hsfmodem-7.18.00.03full/modules/Makefile	2004-12-14 02:52:49.000000000 -0500
+++ hsfmodem-7.18.00.03full-slotname/modules/Makefile	2005-03-29 06:51:50.000000000 -0500
@@ -75,6 +75,10 @@
 
 CFLAGS+= -include $(CNXT_KERNELSRC)/include/linux/config.h
 CFLAGS+= $(MODVERFLAGS)
+
+FOUND_PCI_DEV_SLOT_NAME := $(shell grep -q 'slot_name' ${CNXT_KERNELSRC}/include/linux/pci.h 2> /dev/null && echo -DFOUND_PCI_DEV_SLOT_NAME)
+CFLAGS+= $(FOUND_PCI_DEV_SLOT_NAME)
+
 endif # KBUILD_SUPPORTED
 
 ## END OF CONFIGURATION SECTION
diff -urN hsfmodem-7.18.00.03full/modules/cnxthwpci_common.c hsfmodem-7.18.00.03full-slotname/modules/cnxthwpci_common.c
--- hsfmodem-7.18.00.03full/modules/cnxthwpci_common.c	2004-12-14 02:45:38.000000000 -0500
+++ hsfmodem-7.18.00.03full-slotname/modules/cnxthwpci_common.c	2005-03-29 06:49:25.000000000 -0500
@@ -35,7 +35,7 @@
 #endif
 
     if (pci_request_regions(pdev, (char*)(THIS_MODULE->name))) {
-	printk(KERN_ERR "%s: pci_request_regions(%s) failed\n", CNXTHWPCI_NAME, pdev->slot_name); 
+	printk(KERN_ERR "%s: pci_request_regions(%s) failed\n", CNXTHWPCI_NAME, PCI_SLOT_NAME(pdev)); 
 	return -ENODEV;
     }
 
@@ -54,7 +54,7 @@
     }
 
     if ( (r = pci_enable_device(pdev)) ) {
-	printk(KERN_ERR "%s: pci_enable_device(%s) failed (err=%d)\n", CNXTHWPCI_NAME, pdev->slot_name, r);
+	printk(KERN_ERR "%s: pci_enable_device(%s) failed (err=%d)\n", CNXTHWPCI_NAME, PCI_SLOT_NAME(pdev), r);
 	pci_release_regions(pdev);
 	return r;
     }
@@ -192,7 +192,7 @@
 
 	    if(pdev->driver) {
 		if(pdev->driver->name && !strcmp(pdev->driver->name, "serial")) {
-		    printk(KERN_WARNING"%s: %s driver grabbed our device (%s), reclaiming it..\n", CNXTHWPCI_NAME, pdev->driver->name, pdev->slot_name);
+		    printk(KERN_WARNING"%s: %s driver grabbed our device (%s), reclaiming it..\n", CNXTHWPCI_NAME, pdev->driver->name, PCI_SLOT_NAME(pdev));
 #if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) )
 		    {
 		    	struct device *dev = get_device(&pdev->dev);
diff -urN hsfmodem-7.18.00.03full/modules/osresour.c hsfmodem-7.18.00.03full-slotname/modules/osresour.c
--- hsfmodem-7.18.00.03full/modules/osresour.c	2004-12-14 02:44:21.000000000 -0500
+++ hsfmodem-7.18.00.03full-slotname/modules/osresour.c	2005-03-29 06:49:25.000000000 -0500
@@ -70,7 +70,7 @@
     }
 
     if(needed) {
-	printk(KERN_ERR "%s: %d resource(s) missing for device %s\n", __FUNCTION__, needed, pcidev->slot_name);
+	printk(KERN_ERR "%s: %d resource(s) missing for device %s\n", __FUNCTION__, needed, PCI_SLOT_NAME(pcidev));
 	return FALSE;
     }
 
@@ -123,7 +123,7 @@
     err = request_irq(pcidev->irq, (irqreturn_t (*)(int irq, void *devidp, struct pt_regs *))isr, SA_SHIRQ, devname, devid);
 #endif
     if (err) {
-	printk(KERN_ERR "%s: request_irq(dev=%s, irq=%d) failed err %d\n", __FUNCTION__, pcidev->slot_name, pcidev->irq, err);
+	printk(KERN_ERR "%s: request_irq(dev=%s, irq=%d) failed err %d\n", __FUNCTION__, PCI_SLOT_NAME(pcidev), pcidev->irq, err);
 	return FALSE;
     }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.