Module Name: src
Committed By: christos
Date: Tue Apr 8 00:09:15 UTC 2014
Modified Files:
src/sys/dev/ic: com.c
Log Message:
Clear dtr on transition from !0 to 0, and set it on the opposite.
This leaves dtr alone in the normal case.
To generate a diff of this commit:
cvs rdiff -u -r1.324 -r1.325 src/sys/dev/ic/com.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/ic/com.c
diff -u src/sys/dev/ic/com.c:1.324 src/sys/dev/ic/com.c:1.325
--- src/sys/dev/ic/com.c:1.324 Sun Apr 6 19:29:58 2014
+++ src/sys/dev/ic/com.c Mon Apr 7 20:09:15 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: com.c,v 1.324 2014/04/06 23:29:58 christos Exp $ */
+/* $NetBSD: com.c,v 1.325 2014/04/08 00:09:15 christos Exp $ */
/*-
* Copyright (c) 1998, 1999, 2004, 2008 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.324 2014/04/06 23:29:58 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.325 2014/04/08 00:09:15 christos Exp $");
#include "opt_com.h"
#include "opt_ddb.h"
@@ -1424,12 +1424,10 @@ comparam(struct tty *tp, struct termios
}
sc->sc_msr_mask = sc->sc_msr_cts | sc->sc_msr_dcd;
- if (ospeed == 0)
+ if (t->c_ospeed == 0 && tp->t_ospeed != 0)
CLR(sc->sc_mcr, sc->sc_mcr_dtr);
-#if 0
- else
+ else if (t->c_ospeed != 0 && tp->t_ospeed == 0)
SET(sc->sc_mcr, sc->sc_mcr_dtr);
-#endif
sc->sc_dlbl = ospeed;
sc->sc_dlbh = ospeed >> 8;