From 4cd4dee55a8a1965afaf983fe0e8f33dac616813 Mon Sep 17 00:00:00 2001 From: christos Date: Sun, 6 Apr 2014 23:29:58 +0000 Subject: [PATCH] PR/48720: John Kelly: com driver does not allow B0 to be set. The code to handle B0 was commented out for no reason given at revision 1.99. POSIX mandates to hangup on B0: http://pubs.opengroup.org/onlinepubs/9699919799/functions/tcsetattr.html --- sys/dev/ic/com.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sys/dev/ic/com.c b/sys/dev/ic/com.c index e45027c4bcb4..502bb50c50c1 100644 --- a/sys/dev/ic/com.c +++ b/sys/dev/ic/com.c @@ -1,4 +1,4 @@ -/* $NetBSD: com.c,v 1.323 2014/03/16 05:20:27 dholland Exp $ */ +/* $NetBSD: com.c,v 1.324 2014/04/06 23:29:58 christos Exp $ */ /*- * Copyright (c) 1998, 1999, 2004, 2008 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.323 2014/03/16 05:20:27 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.324 2014/04/06 23:29:58 christos Exp $"); #include "opt_com.h" #include "opt_ddb.h" @@ -296,11 +296,9 @@ comspeed(long speed, long frequency, int type) divisor = 13; } -#if 0 if (speed == 0) return (0); -#endif - if (speed <= 0) + if (speed < 0) return (-1); x = divrnd(frequency / divisor, speed); if (x <= 0) @@ -1426,9 +1424,9 @@ comparam(struct tty *tp, struct termios *t) } sc->sc_msr_mask = sc->sc_msr_cts | sc->sc_msr_dcd; -#if 0 if (ospeed == 0) CLR(sc->sc_mcr, sc->sc_mcr_dtr); +#if 0 else SET(sc->sc_mcr, sc->sc_mcr_dtr); #endif