Subject: kern/2238: com ports do not get their initial speed set.
To: None <gnats-bugs@NetBSD.ORG>
From: Lennart Augustsson <augustss@cs.chalmers.se>
List: netbsd-bugs
Date: 03/18/1996 13:21:00
>Number: 2238
>Category: kern
>Synopsis: com ports do not get their initial speed set.
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: kern-bug-people (Kernel Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Mar 18 07:35:01 1996
>Last-Modified:
>Originator: Lennart Augustsson
>Organization:
Chalmers
>Release: 960316
>Environment:
System: NetBSD calvin.cs.chalmers.se 1.1B NetBSD 1.1B (CALVIN) #3: Mon Mar 18 12:22:18 MET 1996 augustss@calvin.cs.chalmers.se:/usr/src/sys/arch/i386/compile/CALVIN i386
>Description:
After the patch that only changes the speed of the com port
when the FIFO is drained the initial speed no longer gets set
at all. The reason is that there is a test if the speed you
are trying to set is equal to the current one (com.c, line 865).
This works except for the initialization of the port where
comparam is called from line 516. The arguments ensure that
the comparison is never going to come out unequal, and thus the
start speed is not set.
This is bad news if you then try to use the port at this speed
since any attempt to change to the same value it will result
in nothing.
>How-To-Repeat:
Try using a com port at the default speed after reboot.
>Fix:
The easiest fix is to use the #if that is already there,
but it's not so elegant.
#if 0
if (tp->t_ispeed != t->c_ispeed) {
#else
if (1) {
#endif
>Audit-Trail:
>Unformatted: