Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Sep 2003 15:01:07 -0700 (PDT)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 37340 for review
Message-ID:  <200309012201.h81M17p9097083@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=37340

Change 37340 by marcel@marcel_nfs on 2003/09/01 15:00:27

	Got it: we were setting CLOCAL and ~HUPCL in the wrong
	structure. It was never properly set for the tty. I
	think I must always have had DCD wired to DSR with my
	null-modem cables.
	
	Ok, so now that I can login (yay!) I still need to
	figure out if a have the DCD and CTS signals with the
	right polarity, because apparently DCD is not set
	according to the z8530 driver. If I look at zs(4),
	I think this is right, but I have no visual way to
	confirm this. It's trivial to fix, so I'm not going
	to worry about it until I get some definite reports.

Affected files ...

.. //depot/projects/uart/dev/uart/uart_tty.c#10 edit

Differences ...

==== //depot/projects/uart/dev/uart/uart_tty.c#10 (text+ko) ====

@@ -191,9 +191,12 @@
 		return (ENODEV);
 	if (t->c_ispeed != t->c_ospeed && t->c_ospeed != 0)
 		return (EINVAL);
-	/* Hardwire the speed of system devices. */
-	if (sc->sc_sysdev != NULL)
+	/* Fixate certain parameters for system devices. */
+	if (sc->sc_sysdev != NULL) {
 		t->c_ispeed = t->c_ospeed = sc->sc_sysdev->baudrate;
+		t->c_cflag |= CLOCAL;
+		t->c_cflag &= ~HUPCL;
+	}
 	if (t->c_ospeed == 0) {
 		UART_SETSIG(sc, UART_SIG_DDTR | UART_SIG_DRTS);
 		return (0);
@@ -215,10 +218,6 @@
 	if ((t->c_cflag & CRTS_IFLOW) == 0)
 		UART_SETSIG(sc, UART_SIG_DRTS | UART_SIG_RTS);
 	ttsetwater(tp);
-	if (sc->sc_sysdev != NULL) {
-		tp->t_cflag |= CLOCAL;
-		tp->t_cflag &= ~HUPCL;
-	}
 	return (0);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200309012201.h81M17p9097083>