From nobody@FreeBSD.ORG Tue Feb 16 15:21:17 1999
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id 34A8410F6C; Tue, 16 Feb 1999 15:21:04 -0800 (PST)
Message-Id: <19990216232104.34A8410F6C@hub.freebsd.org>
Date: Tue, 16 Feb 1999 15:21:04 -0800 (PST)
From: tajh@blaze.ca
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@freebsd.org
Subject: Serial port parity setting problems with 3.1-RELEASE
X-Send-Pr-Version: www-1.0

>Number:         10121
>Category:       i386
>Synopsis:       Serial port parity setting problems with 3.1-RELEASE
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    n_hibma
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 16 15:30:01 PST 1999
>Closed-Date:    Sat Jul 17 11:19:57 PDT 1999
>Last-Modified:  Mon Jul 23 01:12:48 PDT 2001
>Originator:     Tajh Leitso
>Release:        3.1-RELEASE
>Organization:
Blaze Telecommunications Inc.
>Environment:
>Description:
I have a custom application (MDB interface software) that runs under FreeBSD.  The MDB spec calls for 9 bit words on the serial port and some other bizarre settings.  What worked on 2.2.8, 3.0-RELEASE does not work on the 3.1-RELEASE system


>How-To-Repeat:
It may be hard if you do not have a device that supports 9-bit parity enabled serial communications but this works under 3.0 and not 3.1: 

 { // Mode bit SET
  tty.c_cflag = CS8;
  tty.c_cflag |= CREAD;
  tty.c_cflag |= CLOCAL;
  tty.c_cflag &= ~HUPCL;
 }
 if (tcsetattr(fd, TCSANOW, &tty) == -1)
 {
  perror("tcsetattr");
  exit(1);
 }
 
>Fix:
I do not have the time to find out what happened to the sio code, however I am definately more than willing to help.

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: n_hibma 
State-Changed-When: Fri Jul 16 01:47:30 PDT 1999 
State-Changed-Why:  
I am going to ask for feedback in a minute (the submission of mails to 
GNATS is horribly slow, so I do it the other way around :-) 


Responsible-Changed-From-To: freebsd-bugs->n_hibma 
Responsible-Changed-By: n_hibma 
Responsible-Changed-When: Fri Jul 16 01:47:30 PDT 1999 
Responsible-Changed-Why:  
Make sure I don't forget about it. 

From: Nick Hibma <nick.hibma@jrc.it>
To: freebsd-gnats-submit@freebsd.org, tajh@blaze.ca
Cc:  
Subject: Re: i386/10121: Serial port parity setting problems with 3.1-RELEASE
Date: Fri, 16 Jul 1999 10:59:04 +0200

 Are you still running 3.1? You might want to upgrade to 3.2-STABLE
 (which is the version that is most current but
 yet stable). You can do that by installing cvsup-16.0 (binaries
 available from package sites) and updating your /usr/src tree with it.
 After that
 
 	cd /usr/src
 	make world && reboot
 
 	cd /usr/src/sys/i386/conf
 	# check GENERIC against your KERNELNAME
 	config KERNELNAME
 	cd ../../compile/KERNELNAME
 	make && make install && reboot
 
 The long version of how to do this can be found in the handbook at
 /usr/share ...
 
 Let me know whether the problem is solved by that or the problem no
 longer exists (if you have the solution to it, please mail a description
 of it as well, for future reference)
 
 Please reply to all.
 
 Hope this is of help.
 
 Nick
 -- 
 Paranoid:
    perl -e 'use strict;' -e ...
 
 ISIS/STA, T.P.270, Joint Research Centre, 21020 Ispra, Italy
 

From: Nick Hibma <nick.hibma@jrc.it>
To: freebsd-gnats-submit@freebsd.org, tajh@blaze.ca
Cc:  
Subject: Re: i386/10121: Serial port parity setting problems with 3.1-RELEASE
Date: Fri, 16 Jul 1999 16:08:05 +0200

 A response I received from Bruce. Any chance you could comment on this
 Tajh?
 
   Date: Fri, 16 Jul 1999 23:28:54 +1000
   From: Bruce Evans <bde@zeta.org.au>
   To: n_hibma@FreeBSD.ORG
   Subject: Re: i386/10121: Serial port parity setting problems   with
 3.1-RELEASE
  
   >Synopsis: Serial port parity setting problems with 
   >3.1-RELEASE
   >
   >State-Changed-From-To: open->feedback
  
   I believe I solved this for the author of the PR.  The 
   problem is that tcsetattr(..., TCSANOW) is actually done NOW 
   (immediately) in 3.1, so it tends to clobber any i/o in 
   progress.  The author agreed that this was probably the 
   problem but never confirmed a fix.
  
   Bruce
 
 Cheers,
 Nick
 -- 
 Paranoid:
    perl -e 'use strict;' -e ...
 
 ISIS/STA, T.P.270, Joint Research Centre, 21020 Ispra, Italy
 
State-Changed-From-To: feedback->closed 
State-Changed-By: n_hibma 
State-Changed-When: Sat Jul 17 11:19:57 PDT 1999 
State-Changed-Why:  
submitter of the PR says that the problem is no longer pertinent in 3.2-STABLE 

From: Nick Hibma <n_hibma@webweaving.org>
To: freebsd-gnats-submit@freebsd.org
Cc:  
Subject: Re: i386/10121: Serial port parity setting problems with 3.1-RELEASE (fwd)
Date: Sat, 17 Jul 1999 20:21:28 +0200 (CEST)

 The reply from the submitter.
 
 ---------- Forwarded message ----------
 Date: Fri, 16 Jul 1999 11:19:08 -0700 (PDT)
 From: Tajh Leitso <tajh@blaze.ca>
 To: Nick Hibma <nick.hibma@jrc.it>
 Subject: Re: i386/10121: Serial port parity setting problems with 3.1-RELEASE
 
 ...
 >   I believe I solved this for the author of the PR.  The 
 >   problem is that tcsetattr(..., TCSANOW) is actually done NOW 
 >   (immediately) in 3.1, so it tends to clobber any i/o in 
 >   progress.  The author agreed that this was probably the 
 >   problem but never confirmed a fix.
 
 Yes, this works properly under 3.2-RELEASE, I think there were some other
 timing issues with the serial port in my particular application that
 caused strange results, removing my old code and using tcsetattr(...,
 TCSAFLUSH) removes the need for my old timing code (read _hack_).  Works
 properly now.
 Thanks...
 
 
 
>Unformatted:
