summaryrefslogtreecommitdiffstats
path: root/sys/dev/zs
diff options
context:
space:
mode:
authorjake <jake@FreeBSD.org>2003-01-11 04:15:46 +0000
committerjake <jake@FreeBSD.org>2003-01-11 04:15:46 +0000
commitd13ea619e6788c8eedaf4432084302a1c0da03c0 (patch)
treeb22cf77ec62839cf56119b40a274ec0e18680993 /sys/dev/zs
parent7c8a733a058ae9f140342e34e2e1cdef2281e435 (diff)
downloadFreeBSD-src-d13ea619e6788c8eedaf4432084302a1c0da03c0.zip
FreeBSD-src-d13ea619e6788c8eedaf4432084302a1c0da03c0.tar.gz
Reset the channel in attach if its not the console.
Diffstat (limited to 'sys/dev/zs')
-rw-r--r--sys/dev/zs/zs.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/dev/zs/zs.c b/sys/dev/zs/zs.c
index 71a20f2..9836237 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);
OpenPOWER on IntegriCloud