From simokawa@sat.t.u-tokyo.ac.jp  Wed Sep 18 22:44:57 1996
Received: from mail.crl.com (mail.crl.com [165.113.1.22])
          by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id WAA26695
          for <FreeBSD-gnats-submit@freebsd.org>; Wed, 18 Sep 1996 22:44:52 -0700 (PDT)
Received: from uno.sat.t.u-tokyo.ac.jp by mail.crl.com with SMTP id AA25073
  (5.65c/IDA-1.5 for <FreeBSD-gnats-submit@freebsd.org>); Wed, 18 Sep 1996 22:44:19 -0700
Received: by uno.sat.t.u-tokyo.ac.jp (8.7.3+2.6Wbeta5/8.7.3)
	id OAA03096; Thu, 19 Sep 1996 14:43:36 +0900 (JST)
Message-Id: <199609190543.OAA03096@uno.sat.t.u-tokyo.ac.jp>
Date: Thu, 19 Sep 1996 14:43:36 +0900 (JST)
From: Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp>
Reply-To: simokawa@sat.t.u-tokyo.ac.jp
To: FreeBSD-gnats-submit@freebsd.org
Subject: sio.c can't keep RTS off while RTS flow controll is off.
X-Send-Pr-Version: 3.2

>Number:         1644
>Category:       i386
>Synopsis:       sio.c can't keep RTS off while RTS flow controll is off.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 18 22:50:02 PDT 1996
>Closed-Date:    Tue Dec 17 03:17:23 PST 1996
>Last-Modified:  Tue Dec 17 03:24:38 PST 1996
>Originator:     Hidetoshi Shimokawa
>Release:        FreeBSD 2.2-CURRENT i386
>Organization:
Univsity of Tokyo
>Environment:
	common 16550A base serial interface.

>Description:
	when I want keep RTS off for some use (without flow control),
	it doesn't work righ.
	(it is required for qvplay which transfer data from CASIO
	digital camera QV10 series)

	
	in sio.c, it seems that comment is right, but code doesn't do it.

                /*
                 * XXX don't raise MCR_RTS if CTS_RTS_IFLOW is off.  Set it
                 * appropriately in comparam() if RTS-flow is being changed.
                 * Check for races.
                 */
                if (!(com->mcr_image & MCR_RTS) && com->iptr < com->ihighwater)
                        outb(com->modem_ctl_port, com->mcr_image |= MCR_RTS);



>How-To-Repeat:

	disable hard flow control and make RTS off, then watch RTS line.
	(sorry, I didn't do this)

>Fix:
	the same fix should be also applied to stable branch.

*** sio.c.orig  Sun Sep 15 22:26:20 1996
--- sio.c       Thu Sep 19 03:55:38 1996
***************
*** 2000,2006 ****
                 * appropriately in comparam() if RTS-flow is being changed.
                 * Check for races.
                 */
!               if (!(com->mcr_image & MCR_RTS) && com->iptr < com->ihighwater)
                        outb(com->modem_ctl_port, com->mcr_image |= MCR_RTS);
        }
        enable_intr();
--- 2000,2007 ----
                 * appropriately in comparam() if RTS-flow is being changed.
                 * Check for races.
                 */
!               if (!(com->mcr_image & MCR_RTS) && (com->iptr < com->ihighwater)
!                       && (com->state & CS_RTS_IFLOW))
                        outb(com->modem_ctl_port, com->mcr_image |= MCR_RTS);
        }
        enable_intr();

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: bde 
State-Changed-When: Tue Dec 17 03:17:23 PST 1996 
State-Changed-Why:  
Was misfiled as Confidentnal. 
Fixed in rev.1.149 of sio.c (1996/11/13). 
Also fixed in cy.c. 
Also fixed in 2.2. 
Not fixed in -stable. 
Not investigated in other drivers. 
>Unformatted:
