diff options
Diffstat (limited to 'sys/arch/atari/dev')
-rw-r--r-- | sys/arch/atari/dev/zs.c | 10 | ||||
-rw-r--r-- | sys/arch/atari/dev/zsvar.h | 4 |
2 files changed, 10 insertions, 4 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(); diff --git a/sys/arch/atari/dev/zsvar.h b/sys/arch/atari/dev/zsvar.h index 3a7de2efa82..320041baa02 100644 --- a/sys/arch/atari/dev/zsvar.h +++ b/sys/arch/atari/dev/zsvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: zsvar.h,v 1.3 1995/11/30 00:58:00 jtc Exp $ */ +/* $NetBSD: zsvar.h,v 1.4 1995/12/25 14:16:51 leo Exp $ */ /* * Copyright (c) 1995 Leo Weppelman (Atari modifications) @@ -128,7 +128,7 @@ struct zs_chanstate { */ u_int cs_rbget; /* ring buffer `get' index */ volatile u_int cs_rbput; /* ring buffer `put' index */ - int cs_rbuf[ZLRB_RING_SIZE];/* type, value pairs */ + int *cs_rbuf; /* type, value pairs */ }; #define ZS_CHAN_A 0 |