Re: [BUG] hsfmodem-7.47.00.01: hangup, deadlock?

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

the protection is unlikely the source of the problem and the driver 
should not crash even if a program asks to use a modulation which is not 
available with no license installed.

I have attached to this post an experimental patch for the devfs problem 
you have mentioned. This patch is needed to be able to use the driver on 
2.6.18-rc1 or later kernels. It can be installed with the 'hsfconfig 
--patch <file.patch>' command in a root shell.

Regards,


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



Paul Drynoff wrote:
> On Tue, 11 Jul 2006 16:51:43 -0400
> "Linuxant support (Jonathan)" <[email protected]> wrote:
> 
>> Hi,
>>
>> modulations are protocols used to transfer data between modems. More 
>> information on that is available at:
>>
>> http://en.wikipedia.org/wiki/ITU_V-Series
>>
>> When a valid license is installed, all the modulations known to the 
>> driver are unlocked and most likely that a modulation with higher speed 
>> will be selected than the one selected with 14.4kbps max. while having 
>> no license installed.
>>
> 
> So your protection so weak that one of program that I used: wvdial or pppd,
> can broke it, but your driver has "last boundary" which check if all wrong
> and just hang up computer?
> 
> Will you provide more smart protection, so usage of FREE license become possible,
> or it is by design?
> 
>> So if the stability issue is related to the specific modulation 
>> currently used, installing a valid license is likely to solve the problem.
>>
> 
> Any way, I include hsfconfig --dump (see attachment).
> 
> Also I tried compile your drive with lockdep patch, but compilation failed,
> because of you use some functions from "devfs_fs_kernel.h", it was removed,
> also there is no field devfs_name in struct uart_driver. 
> 
> Have you plans support 2.6 without devfs?
> 
> _______________________________________________
> hsflinux mailing list
> [email protected]
> https://www.linuxant.com/mailman/listinfo/hsflinux

_______________________________________________
hsflinux mailing list
[email protected]
https://www.linuxant.com/mailman/listinfo/hsflinux
hsf-7.47.00.01-nodevfs.patch (text/x-patch, 5.9 KB)
diff -urN hsfmodem-7.47.00.01x86_64full/modules/GPL/oscompat.h hsfmodem-7.47.00.01x86_64full-nodevfs/modules/GPL/oscompat.h
--- hsfmodem-7.47.00.01x86_64full/modules/GPL/oscompat.h	2006-05-02 11:44:55.000000000 -0400
+++ hsfmodem-7.47.00.01x86_64full-nodevfs/modules/GPL/oscompat.h	2006-07-14 16:12:32.000000000 -0400
@@ -244,6 +244,10 @@
 
 #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) */
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) && !defined(FOUND_DEVFS)
+#define devfs_register_chrdev register_chrdev
+#endif
+
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,2)
 #include <linux/circ_buf.h>
 #else
diff -urN hsfmodem-7.47.00.01x86_64full/modules/GPL/serial_cnxt.c hsfmodem-7.47.00.01x86_64full-nodevfs/modules/GPL/serial_cnxt.c
--- hsfmodem-7.47.00.01x86_64full/modules/GPL/serial_cnxt.c	2006-02-07 11:30:11.000000000 -0500
+++ hsfmodem-7.47.00.01x86_64full-nodevfs/modules/GPL/serial_cnxt.c	2006-07-14 16:12:32.000000000 -0400
@@ -933,7 +933,9 @@
 	.port		=		cnxt_ports,
 #else
 	.driver_name	=		CNXTTARGET"serial",
+#ifdef FOUND_DEVFS
 	.devfs_name	=		"ttyS"CNXTSERDEV,
+#endif
 	.dev_name	=		"ttyS"CNXTSERDEV,
 #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) */
 	.minor		=		CNXTSERIALMINOR,
diff -urN hsfmodem-7.47.00.01x86_64full/modules/Makefile hsfmodem-7.47.00.01x86_64full-nodevfs/modules/Makefile
--- hsfmodem-7.47.00.01x86_64full/modules/Makefile	2006-04-10 17:19:49.000000000 -0400
+++ hsfmodem-7.47.00.01x86_64full-nodevfs/modules/Makefile	2006-07-14 16:12:32.000000000 -0400
@@ -91,8 +91,9 @@
 FOUND_TTY_NEW_API := $(shell grep -q 'tty_buffer_request_room' ${REAL_KERNELSRC}/include/linux/tty_flip.h 2>/dev/null && echo -DFOUND_TTY_NEW_API)
 FOUND_TOUCH_ATIME := $(shell grep -q 'touch_atime' ${REAL_KERNELSRC}/include/linux/fs.h 2>/dev/null && echo -DFOUND_TOUCH_ATIME)
 FOUND_KZALLOC := $(shell grep -q 'kzalloc' ${REAL_KERNELSRC}/include/linux/slab.h 2>/dev/null && echo -DFOUND_KZALLOC)
-
-CFLAGS+= $(FOUND_CLASS_SIMPLE) $(FOUND_UART_REGISTER_PORT) $(FOUND_TTY_START_STOP) $(FOUND_CLASS_DEVICE_PARENT) $(FOUND_MODULE_PARAM) $(FOUND_PM_MESSAGE_T) $(FOUND_PM_MESSAGE_STRUCT) $(FOUND_PCI_CHOOSE_STATE) $(FOUND_LINUX_SUSPEND) $(FOUND_USB_DRIVER_OWNER) $(FOUND_PCI_REGISTER_DRIVER) $(FOUND_TTY_NEW_API) $(FOUND_TOUCH_ATIME) $(FOUND_KZALLOC)
+FOUND_DEVFS := $(shell [ -e "${REAL_KERNELSRC}/include/linux/devfs_fs_kernel.h" ] && echo -DFOUND_DEVFS)
+  
+CFLAGS+= $(FOUND_CLASS_SIMPLE) $(FOUND_UART_REGISTER_PORT) $(FOUND_TTY_START_STOP) $(FOUND_CLASS_DEVICE_PARENT) $(FOUND_MODULE_PARAM) $(FOUND_PM_MESSAGE_T) $(FOUND_PM_MESSAGE_STRUCT) $(FOUND_PCI_CHOOSE_STATE) $(FOUND_LINUX_SUSPEND) $(FOUND_USB_DRIVER_OWNER) $(FOUND_PCI_REGISTER_DRIVER) $(FOUND_TTY_NEW_API) $(FOUND_TOUCH_ATIME) $(FOUND_KZALLOC) $(FOUND_DEVFS)
 
 else
 KO= o
diff -urN hsfmodem-7.47.00.01x86_64full/modules/osdcp.c hsfmodem-7.47.00.01x86_64full-nodevfs/modules/osdcp.c
--- hsfmodem-7.47.00.01x86_64full/modules/osdcp.c	2006-01-27 07:49:32.000000000 -0500
+++ hsfmodem-7.47.00.01x86_64full-nodevfs/modules/osdcp.c	2006-07-14 16:12:32.000000000 -0400
@@ -13,7 +13,9 @@
 #include "osmemory.h"
 
 #include <linux/poll.h>
+#ifdef FOUND_DEVFS
 #include <linux/devfs_fs_kernel.h>
+#endif
 #include <linux/kmod.h>
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,2)
 #include <linux/device.h>
@@ -355,11 +357,13 @@
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
     devfs_unregister(pDcp->devfs_handle);
 #else
+#ifdef FOUND_DEVFS
     {
 	char buf[32];
 	snprintf(buf, sizeof(buf), CNXTTARGET"dcp%d", pDcp->pDevNode->hwInstNum);
 	devfs_remove(buf);
     }
+#endif
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,2)
     if (!IS_ERR(dcp_class))
         CLASS_DEVICE_DESTROY(dcp_class, MKDEV(dcpmajor, pDcp->pDevNode->hwInstNum));
@@ -415,10 +419,11 @@
 	CLASS_DEVICE_CREATE(dcp_class, MKDEV(dcpmajor, pDcp->pDevNode->hwInstNum), pDcp->pDevNode->hwDevLink, CNXTTARGET"dcp%d", pDcp->pDevNode->hwInstNum);
 	}
 #endif
-
+#ifdef FOUND_DEVFS
     devfs_mk_cdev(MKDEV(dcpmajor, pDcp->pDevNode->hwInstNum),
 		  S_IFCHR | S_IRUSR | S_IWUSR, buf);
 #endif
+#endif
 
     call_dcp_daemon(pDcp->pDevNode->hwInstNum, "start");
     return (HANDLE)pDcp;
diff -urN hsfmodem-7.47.00.01x86_64full/modules/osdiag.c hsfmodem-7.47.00.01x86_64full-nodevfs/modules/osdiag.c
--- hsfmodem-7.47.00.01x86_64full/modules/osdiag.c	2006-05-02 11:42:51.000000000 -0400
+++ hsfmodem-7.47.00.01x86_64full-nodevfs/modules/osdiag.c	2006-07-14 16:12:32.000000000 -0400
@@ -19,7 +19,9 @@
 #include "osdiag_dev.h"
 
 #include <linux/poll.h>
+#ifdef FOUND_DEVFS
 #include <linux/devfs_fs_kernel.h>
+#endif
 #include <linux/kmod.h>
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,2)
 #include <linux/device.h>
@@ -674,9 +676,10 @@
 	    CLASS_DEVICE_CREATE(diag_class, MKDEV(diagmajor, pDiag->hwInstNum), hwDevLink, CNXTTARGET"diag%d", pDiag->hwInstNum);
 	}
 #endif
-
+#ifdef FOUND_DEVFS
 	devfs_mk_cdev(MKDEV(diagmajor, pDiag->hwInstNum), S_IFCHR | S_IRUSR | S_IWUSR, buf);
 #endif
+#endif
     }
 
     return pDiag;
@@ -769,11 +772,13 @@
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
     devfs_unregister(pDiag->devfs_handle);
 #else
+#ifdef FOUND_DEVFS
     {
 	char buf[32];
 	snprintf(buf, sizeof(buf), CNXTTARGET"diag%d", pDiag->hwInstNum);
 	devfs_remove(buf);
     }
+#endif
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,2)
     if (!IS_ERR(diag_class))
 	CLASS_DEVICE_DESTROY(diag_class, MKDEV(diagmajor, pDiag->hwInstNum));
@@ -843,7 +848,9 @@
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
     devfs_unregister(dmp_devfs_handle);
 #else
+#ifdef FOUND_DEVFS
     devfs_remove(CNXTTARGET"diagdmp");
+#endif
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,2)
     if (!IS_ERR(diag_class))
 	CLASS_DEVICE_DESTROY(diag_class, MKDEV(diagmajor, CNXTDIAGDMPMINOR));
@@ -899,8 +906,10 @@
 	CLASS_DEVICE_CREATE(diag_class, MKDEV(diagmajor, CNXTDIAGDMPMINOR), NULL, CNXTTARGET"diagdmp");
     }
 #endif
+#ifdef FOUND_DEVFS
     devfs_mk_cdev(MKDEV(diagmajor, CNXTDIAGDMPMINOR), S_IFCHR | S_IRUSR | S_IWUSR, CNXTTARGET"diagdmp");
 #endif
+#endif
 #endif /* DMP || DMP_RETAIL */
 
     return 0;
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.