Subject: Settings are wrong on first open of /dev/ttya by zs driver
To: Gordon W. Ross <gwr@jericho.mc.com>
From: Harry Schreurs <HLS@oce.nl>
List: port-sun3
Date: 06/09/1994 16:01:09
Gordon,

I think I found a problem in the zs driver. Or better an unconveniece.
During the kernel boot sequence, output being done by the printf routine
of the prom monitor of the SUN. Characters send to the console in this 
way have the the following format: 8N1 ( 8 bits, no parity ).

From the moment /dev/ttya is opened as the console, the prom monitor isn't
used anymore. When /dev/ttya is being opened for the first time, the
character format being used, is changed to 7E1 ( 7 bits, even parity ).

I don't think this correct. I came up with the following fix:

*** /usr/src/sys/arch/sun3/dev/zs.c            Thu Jun  9 04:37:48 1994
--- /usr/src/sys/arch/sun3/dev/zs.c.org        Mon May 30 13:11:00 1994
***************
*** 577,584 ****
        if (tp->t_ispeed == 0) {
            tp->t_iflag = TTYDEF_IFLAG;
            tp->t_oflag = TTYDEF_OFLAG;
!           /* hls- don't use the default from ttydefaults.h */
!           tp->t_cflag = (CREAD | CS8 | HUPCL)
            tp->t_lflag = TTYDEF_LFLAG;
            tp->t_ispeed = tp->t_ospeed = cs->cs_speed;
        }
--- 577,583 ----
        if (tp->t_ispeed == 0) {
            tp->t_iflag = TTYDEF_IFLAG;
            tp->t_oflag = TTYDEF_OFLAG;
!           tp->t_cflag = TTYDEF_CFLAG;
            tp->t_lflag = TTYDEF_LFLAG;
            tp->t_ispeed = tp->t_ospeed = cs->cs_speed;
        }

Regards,

Harry Schreurs

------------------------------------------------------------------------------
H.L Schreurs                                            Email: hls@oce.nl
Business Unit Printing Systems                          Phone: +31 77 593775
Oce Nederland B.V.                                      Fax:   +31 77 595434
The Netherlands
------------------------------------------------------------------------------

      ###########################################################
      #  This note does not necessarily represent the position  #
      #     of Oce-Nederland B.V. Therefore no liability or     #
      #      responsibility for whatever will be accepted.      #
      ###########################################################

------------------------------------------------------------------------------