patch for umct for devices that don't assert CTS

Joe Talbott josepht at cstone.net
Sat Jun 9 07:13:56 PDT 2007


Here's a patch that allows umct (USB<->RS232 adapter) to write to
devices that do not assert CTS.  I found that these two requests were
necessary from the Linux source found here:

http://www.gelato.unsw.edu.au/lxr/source/drivers/usb/serial/mct_u232.c

Joe
Index: sys/dev/usbmisc/umct/umct.c
===================================================================
RCS file: /home/dcvs/src/sys/dev/usbmisc/umct/umct.c,v
retrieving revision 1.7
diff -u -r1.7 umct.c
--- sys/dev/usbmisc/umct/umct.c	22 Dec 2006 23:26:26 -0000	1.7
+++ sys/dev/usbmisc/umct/umct.c	9 Jun 2007 13:56:34 -0000
@@ -63,6 +63,11 @@
 #define UMCT_SET_LCR_SIZE	1
 #define UMCT_SET_MCR		10	/* Set Modem Control Register */
 #define UMCT_SET_MCR_SIZE	1
+#define UMCT_SET_UNKNOWN1	11
+#define UMCT_SET_UNKNOWN1_SIZE	1
+#define UMCT_SET_UNKNOWN2	12
+#define UMCT_SET_UNKNOWN2_SIZE	1
+
 
 #define UMCT_INTR_INTERVAL	100
 #define UMCT_IFACE_INDEX	0
@@ -428,6 +433,8 @@
 	sc = addr;
 	value = umct_calc_baud(ti->c_ospeed);
 	umct_request(sc, UMCT_SET_BAUD, UMCT_SET_BAUD_SIZE, value);
+	umct_request(sc, UMCT_SET_UNKNOWN1, UMCT_SET_UNKNOWN1_SIZE, 0);
+	umct_request(sc, UMCT_SET_UNKNOWN2, UMCT_SET_UNKNOWN2_SIZE, 0);
 
 	value = sc->sc_lcr & 0x40;
 




More information about the Bugs mailing list