diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-12-27 22:27:35 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-12-27 22:27:35 +0000 |
commit | 3c97c55eaca19a64b884c5c37af0d0a44c15dbf2 (patch) | |
tree | affad144c69e218665b95e4d185bd30fc1cdaea4 /sys/arch/atari/dev/zs.c | |
parent | 8d488e2a77ae000baef9b8aa9f105c14ffea935a (diff) |
from leo:
Remove an unwanted interference between the 2 channels.
Allocate the ringbuffer on a channel's first open.
Diffstat (limited to 'sys/arch/atari/dev/zs.c')
-rw-r--r-- | sys/arch/atari/dev/zs.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/arch/atari/dev/zs.c b/sys/arch/atari/dev/zs.c index b68b6c1626e..c63aa037396 100644 --- a/sys/arch/atari/dev/zs.c +++ b/sys/arch/atari/dev/zs.c @@ -1,4 +1,4 @@ -/* $NetBSD: zs.c,v 1.12 1995/12/16 21:45:31 leo Exp $ */ +/* $NetBSD: zs.c,v 1.13 1995/12/25 14:16:50 leo Exp $ */ /* * Copyright (c) 1995 L. Weppelman (Atari modifications) @@ -60,6 +60,7 @@ #include <sys/conf.h> #include <sys/file.h> #include <sys/ioctl.h> +#include <sys/malloc.h> #include <sys/tty.h> #include <sys/time.h> #include <sys/kernel.h> @@ -107,7 +108,7 @@ static u_char zs_init_regs[16] = { /* 6 */ 0, /* 7 */ 0, /* 8 */ 0, -/* 9 */ ZSWR9_VECTOR_INCL_STAT, +/* 9 */ ZSWR9_MASTER_IE | ZSWR9_VECTOR_INCL_STAT, /* 10 */ ZSWR10_NRZ, /* 11 */ ZSWR11_TXCLK_BAUD | ZSWR11_RXCLK_BAUD, /* 12 */ 0, @@ -317,6 +318,11 @@ struct proc *p; SOUND->sd_wdat = SOUND->sd_rdat | PA_SER2; } + if (cs->cs_rbuf == NULL) { + cs->cs_rbuf = malloc(ZLRB_RING_SIZE * sizeof(int), M_DEVBUF, + M_WAITOK); + } + tp = cs->cs_ttyp; if(tp == NULL) { cs->cs_ttyp = tp = ttymalloc(); |