kern/74609: allowing cdma modems to work at full speed

Divacky Roman xdivac02 at stud.fit.vutbr.cz
Thu Dec 2 01:30:18 PST 2004


>Number:         74609
>Category:       kern
>Synopsis:       allowing cdma modems to work at full speed
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Dec 02 09:30:17 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Divacky Roman
>Release:        FreeBSD 6.0-CURRENT i386
>Organization:
home
>Environment:
FreeBSD queeg500 5.3-RELEASE FreeBSD 5.3-RELEASE #13: Wed Nov 17 17:58:28 CET
2004     rdivacky at queeg500:/usr/obj/usr/src/sys/QUEEG  i386


	
>Description:
	umodem driver has hardcoded value of packetsize, this prevents cdma
	modems (for example) to work at full speed. my patch implements packet
	size as a tunable hence allowing user to set it and this achieve higher
	speeds.
>How-To-Repeat:
	apply this patch and set
	hw.usb.umodem.ibufsize="1024"
	hw.usb.umodem.obufsize="1024"
	in your /boot/loader.conf and see your cdma modem work at full speed

>Fix:
--- sys/dev/usb/umodem.c	Fri Sep 17 13:53:45 2004
+++ sys/dev/usb/umodem.c	Wed Dec  1 18:57:17 2004
@@ -106,9 +106,9 @@
 
 #include "usbdevs.h"
 
+SYSCTL_NODE(_hw_usb, OID_AUTO, umodem, CTLFLAG_RW, 0, "USB umodem");
 #ifdef USB_DEBUG
 int	umodemdebug = 0;
-SYSCTL_NODE(_hw_usb, OID_AUTO, umodem, CTLFLAG_RW, 0, "USB umodem");
 SYSCTL_INT(_hw_usb_umodem, OID_AUTO, debug, CTLFLAG_RW,
 	   &umodemdebug, 0, "umodem debug level");
 #define DPRINTFN(n, x)	if (umodemdebug > (n)) logprintf x
@@ -132,8 +132,16 @@
  * If some really high speed devices should use this driver they
  * may need to be increased, but this is good enough for normal modems.
  */
-#define UMODEMIBUFSIZE 64
-#define UMODEMOBUFSIZE 256
+int	umodemibufsize = 64;
+int	umodemobufsize = 256;
+TUNABLE_INT("hw.usb.umodem.ibufsize", &umodemibufsize);
+TUNABLE_INT("hw.usb.umodem.obufsize", &umodemobufsize);
+SYSCTL_INT(_hw_usb_umodem, OID_AUTO, ibufsize, CTLFLAG_RD,
+	   &umodemibufsize, 0, "umodem input packet length");
+SYSCTL_INT(_hw_usb_umodem, OID_AUTO, obufsize, CTLFLAG_RD,
+	   &umodemobufsize, 0, "umodem output packet length");
+#define UMODEMIBUFSIZE (umodemibufsize)
+#define UMODEMOBUFSIZE (umodemobufsize)
 
 #define UMODEM_MODVER			1	/* module version */
 
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list