Subject: Re: 3000 - M400 serial console with -current
To: Ray Phillips <r.phillips@jkmrc.com>
From: Pavel Cahyna <pavel.cahyna@st.cuni.cz>
List: port-alpha
Date: 09/15/2004 22:44:03
On Tue, 14 Sep 2004 03:05:58 +0000, Ray Phillips wrote:
 
> with ttyB1's line changed to
> 
>    ttyB1  "/usr/libexec/getty std.9600"   unknown on secure
> 
> the console stops responding here:
> 
> Setting securelevel: kern.securelevel: 0 -> 1
> Starting virecover.
> Starting local daemons:.
> Updating motd.
> Starting sendmail.
> Starting inetd.
> Starting cron.
> Sat Sep 11 16:32:36 EST 2004
> Sep 11 16:32:39 jkalpha2 getty[342]: /dev/ttyB1: Device not configured

Thanks for your testing. It confirms what I see on my DEC3000 - M600.
/dev/ttyB1 should work instead of console. It is a bug that it doesn't.
Could you please try this patch? (To be applied under /usr/src/sys.)

Bye	Pavel

Index: dev/ic/z8530tty.c
===================================================================
RCS file: /mnt/cvs/src/sys/dev/ic/z8530tty.c,v
retrieving revision 1.94.1500.1
diff -u -r1.94.1500.1 z8530tty.c
--- dev/ic/z8530tty.c	2004/09/14 09:52:04	1.94.1500.1
+++ dev/ic/z8530tty.c	2004/09/15 00:23:05
@@ -288,6 +288,9 @@
 static void zstty_txint   __P((struct zs_chanstate *));
 static void zstty_softint __P((struct zs_chanstate *));
 
+#ifndef ZSUNIT2MINOR
+#define	ZSUNIT2MINOR(x)	(x)
+#endif
 #ifndef ZSUNIT
 #define	ZSUNIT(x)	(minor(x) & 0x7ffff)
 #endif
@@ -345,7 +348,7 @@
 	zst->zst_cs = cs;
 	zst->zst_swflags = cf->cf_flags;	/* softcar, etc. */
 	zst->zst_hwflags = args->hwflags;
-	dev = makedev(cdevsw_lookup_major(&zstty_cdevsw), tty_unit);
+	dev = makedev(cdevsw_lookup_major(&zstty_cdevsw), ZSUNIT2MINOR(tty_unit));
 
 	if (zst->zst_swflags)
 		printf(" flags 0x%x", zst->zst_swflags);
Index: arch/alpha/include/z8530var.h
===================================================================
RCS file: /mnt/cvs/src/sys/arch/alpha/include/z8530var.h,v
retrieving revision 1.6.1500.1
diff -u -r1.6.1500.1 z8530var.h
--- arch/alpha/include/z8530var.h	2004/09/14 09:55:08	1.6.1500.1
+++ arch/alpha/include/z8530var.h	2004/09/15 00:17:14
@@ -117,4 +117,5 @@
 #define splzs()		spltty()
 
 /* on DEC3000, ttyB1 is minor 2, not minor 1 */
-#define	ZSUNIT(x)	((minor(x) & 0x7ffff)*2)
+#define	ZSUNIT(x)	((minor(x) & 0x7ffff)/2)
+#define	ZSUNIT2MINOR(x)	((x)*2)