From 776c5378cb76301afeb15fbc169ee86cfef9f7bb Mon Sep 17 00:00:00 2001 From: Jake Burkholder Date: Sat, 11 Jan 2003 04:15:46 +0000 Subject: [PATCH] Reset the channel in attach if its not the console. --- sys/dev/zs/zs.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/dev/zs/zs.c b/sys/dev/zs/zs.c index 71a20f204a4..9836237fa75 100644 --- a/sys/dev/zs/zs.c +++ b/sys/dev/zs/zs.c @@ -263,6 +263,7 @@ zstty_attach(device_t dev) struct zstty_softc *sc; struct tty *tp; char mode[32]; + int reset; int baud; int clen; char parity; @@ -328,6 +329,12 @@ zstty_attach(device_t dev) device_printf(dev, "console %s\n", mode); sc->sc_console = 1; zstty_cons = sc; + } else { + if ((device_get_unit(dev) & 1) == 0) + reset = ZSWR9_A_RESET; + else + reset = ZSWR9_B_RESET; + ZS_WRITE_REG(sc, 9, reset); } return (0);