PERFORCE change 37340 for review

Marcel Moolenaar marcel at FreeBSD.org
Mon Sep 1 15:01:09 PDT 2003


http://perforce.freebsd.org/chv.cgi?CH=37340

Change 37340 by marcel at 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);
 }
 


More information about the p4-projects mailing list