diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2001-09-27 22:36:24 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2001-09-27 22:36:24 +0000 |
commit | 197ca322b4320352dd5bf681f7e2e7f4ef8e3489 (patch) | |
tree | 79e5acadee89515399e304308f8010756bf075f5 /sys/arch/macppc/dev | |
parent | de37ffc99cdd8afe31c510bd9de4a297e4ab3e93 (diff) |
Two workarounds for the zs serial driver.
Enable Interrupts (recieve/status) initially.
Code currently does not enable them elsewhere.
Use a timeout to scedule the soft interrupt, since no MI soft interrupt
scheme works yet. This will have issues with high receive rates.
Diffstat (limited to 'sys/arch/macppc/dev')
-rw-r--r-- | sys/arch/macppc/dev/zs.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/arch/macppc/dev/zs.c b/sys/arch/macppc/dev/zs.c index 4548743baa1..25376a01982 100644 --- a/sys/arch/macppc/dev/zs.c +++ b/sys/arch/macppc/dev/zs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: zs.c,v 1.2 2001/09/27 02:13:36 mickey Exp $ */ +/* $OpenBSD: zs.c,v 1.3 2001/09/27 22:36:23 drahn Exp $ */ /* $NetBSD: zs.c,v 1.17 2001/06/19 13:42:15 wiz Exp $ */ /* @@ -139,7 +139,7 @@ static int zs_get_speed __P((struct zs_chanstate *)); static u_char zs_init_reg[16] = { 0, /* 0: CMD (reset, etc.) */ - 0, /* 1: No interrupts yet. */ + ZSWR1_RIE | ZSWR1_TIE | ZSWR1_SIE, /* 1: No interrupts yet. ??? */ 0, /* IVECT */ ZSWR3_RX_8 | ZSWR3_RX_ENABLE, ZSWR4_CLK_X16 | ZSWR4_ONESB | ZSWR4_EVENP, @@ -377,6 +377,7 @@ zsc_attach(parent, self, aux) /* master interrupt control (enable) */ zs_write_reg(cs, 9, zs_init_reg[9]); splx(s); + timeout_set(&zsc->zsc_timeout, (void (*)(void*))zssoft, zsc); } int @@ -452,6 +453,7 @@ zshard(arg) if (zssoftpending == 0) { zssoftpending = 1; /* XXX setsoftserial(); */ + timeout_add(&zsc->zsc_timeout, 0); } } } |