aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/zs
diff options
context:
space:
mode:
authorJake Burkholder <jake@FreeBSD.org>2003-01-11 04:15:46 +0000
committerJake Burkholder <jake@FreeBSD.org>2003-01-11 04:15:46 +0000
commit776c5378cb76301afeb15fbc169ee86cfef9f7bb (patch)
treeb22cf77ec62839cf56119b40a274ec0e18680993 /sys/dev/zs
parent797159bde3b75c8f2926b5c86ed5d31f82bd2245 (diff)
downloadsrc-776c5378cb76301afeb15fbc169ee86cfef9f7bb.tar.gz
src-776c5378cb76301afeb15fbc169ee86cfef9f7bb.zip
Reset the channel in attach if its not the console.
Notes
Notes: svn path=/head/; revision=109091
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 71a20f204a47..9836237fa75b 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);