sio+acpi woes on HP DL145 G2

Dmitry Morozovsky marck at rinet.ru
Mon Apr 10 11:06:09 UTC 2006


On Sun, 9 Apr 2006, Paul Saab wrote:

PS> Mars G. Miro wrote:
PS> > 
PS> > > However, *sometimes* serial consoles work only for input (I can login
PS> > > and
PS> > > check new processes presence on ttyd0, but can not see any messages.
PS> > > Trouble
PS> > > is
PS> > > that this situation is not easy reproducible, and stty state seems to be
PS> > > the
PS> > > same.
PS> > > 
PS> > >     
PS> This is a bug in the HP BMC that HP blames on FreeBSD.  The only way to work
PS> around it, is to have a custom getty that doesn't reset the port everytime
PS> you open it.

Ah, thanks for the info! Is turning off setttymode() in getty/main.c for given 
port enough? I'd prefer to invent boolean getty capability such as "nr" (no 
reset") such as in patch attached. Or did I miss something?

Sincerely,
D.Marck                                     [DM5020, MCK-RIPE, DM3-RIPN]
------------------------------------------------------------------------
*** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck at rinet.ru ***
------------------------------------------------------------------------
-------------- next part --------------
Index: gettytab.h
===================================================================
RCS file: /home/ncvs/src/libexec/getty/gettytab.h,v
retrieving revision 1.14
diff -u -r1.14 gettytab.h
--- gettytab.h	10 Jun 2003 18:30:41 -0000	1.14
+++ gettytab.h	10 Apr 2006 11:05:43 -0000
@@ -175,3 +175,4 @@
 #define	HW	gettyflags[23].value
 #define	NC	gettyflags[24].value
 #define	PL	gettyflags[25].value
+#define	NR	gettyflags[26].value
Index: init.c
===================================================================
RCS file: /home/ncvs/src/libexec/getty/init.c,v
retrieving revision 1.16
diff -u -r1.16 init.c
--- init.c	6 Apr 2005 17:42:24 -0000	1.16
+++ init.c	10 Apr 2006 11:05:43 -0000
@@ -150,5 +150,6 @@
 	{ "hw", 0 },			/* do CTSRTS flow control */
 	{ "nc", 0 },			/* set clocal (no carrier) */
 	{ "pl", 0 },			/* use PPP instead of login(1) */
+	{ "nr", 0 },			/* do not reset port on open */
 	{ 0 }
 };
Index: main.c
===================================================================
RCS file: /home/ncvs/src/libexec/getty/main.c,v
retrieving revision 1.47
diff -u -r1.47 main.c
--- main.c	6 Apr 2005 17:42:24 -0000	1.47
+++ main.c	10 Apr 2006 11:05:43 -0000
@@ -243,7 +243,8 @@
 			if (!opentty(ttyn, O_RDWR|O_NONBLOCK))
 				exit(1);
 			defttymode();
-			setttymode(1);
+			if (!NR)
+				setttymode(1);
 		}
 
 		if (IC) {
@@ -297,7 +298,8 @@
 		}
 		first_sleep = 0;
 
-		setttymode(0);
+		if (!NR)
+			setttymode(0);
 		if (AB) {
 			tname = autobaud();
 			dogettytab();


More information about the freebsd-stable mailing list