Subject: Re: kern/30685: uplcom / ucom driver toggles DTR when instructed to toggle RTS
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Martin Husemann <martin@duskware.de>
List: netbsd-bugs
Date: 08/04/2005 23:39:02
The following reply was made to PR kern/30685; it has been noted by GNATS.

From: Martin Husemann <martin@duskware.de>
To: Havard Eidnes <he@uninett.no>
Cc: gnats-bugs@NetBSD.org
Subject: Re: kern/30685: uplcom / ucom driver toggles DTR when instructed to toggle RTS
Date: Fri, 5 Aug 2005 01:38:56 +0200

 --VS++wcV0S1rZb1Fb
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 Could you try this patch, please?
 
 Thanks,
 
 Martin
 
 --VS++wcV0S1rZb1Fb
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename=patch
 
 Index: uplcom.c
 ===================================================================
 RCS file: /cvsroot/src/sys/dev/usb/uplcom.c,v
 retrieving revision 1.44
 diff -u -r1.44 uplcom.c
 --- uplcom.c	7 Jul 2005 09:59:37 -0000	1.44
 +++ uplcom.c	4 Aug 2005 23:38:11 -0000
 @@ -85,15 +85,6 @@
  #define RSAQ_STATUS_DSR		0x02
  #define RSAQ_STATUS_DCD		0x01
  
 -#define	UPLCOM_FLOW_OUT_CTS	0x0001
 -#define	UPLCOM_FLOW_OUT_DSR	0x0002
 -#define	UPLCOM_FLOW_IN_DSR	0x0004
 -#define	UPLCOM_FLOW_IN_DTR	0x0008
 -#define	UPLCOM_FLOW_IN_RTS	0x0010
 -#define	UPLCOM_FLOW_OUT_RTS	0x0020
 -#define	UPLCOM_FLOW_OUT_XON	0x0080
 -#define	UPLCOM_FLOW_IN_XON	0x0100
 -
  enum  pl2303_type {
  	UPLCOM_TYPE_0,
  	UPLCOM_TYPE_HX,
 @@ -492,8 +483,8 @@
  	if (sc->sc_rts == -1)
  		sc->sc_rts = 0;
  
 -	ls = (sc->sc_dtr ? UPLCOM_FLOW_OUT_DSR : 0) |
 -		(sc->sc_rts ? UPLCOM_FLOW_OUT_CTS : 0);
 +	ls = (sc->sc_dtr ? UCDC_LINE_DTR : 0) |
 +		(sc->sc_rts ? UCDC_LINE_RTS : 0);
  
  	req.bmRequestType = UT_WRITE_CLASS_INTERFACE;
  	req.bRequest = UCDC_SET_CONTROL_LINE_STATE;
 
 --VS++wcV0S1rZb1Fb--