rc.c (47739) | rc.c (50254) |
---|---|
1/* 2 * Copyright (C) 1995 by Pavel Antonov, Moscow, Russia. 3 * Copyright (C) 1995 by Andrey A. Chernov, Moscow, Russia. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 19 unchanged lines hidden (view full) --- 28/* 29 * SDL Communications Riscom/8 (based on Cirrus Logic CL-CD180) driver 30 * 31 */ 32 33#include "rc.h" 34 35#if NRC > 0 | 1/* 2 * Copyright (C) 1995 by Pavel Antonov, Moscow, Russia. 3 * Copyright (C) 1995 by Andrey A. Chernov, Moscow, Russia. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 19 unchanged lines hidden (view full) --- 28/* 29 * SDL Communications Riscom/8 (based on Cirrus Logic CL-CD180) driver 30 * 31 */ 32 33#include "rc.h" 34 35#if NRC > 0 |
36#include "opt_devfs.h" 37 | |
38/*#define RCDEBUG*/ 39 40#include <sys/param.h> 41#include <sys/systm.h> 42#include <sys/tty.h> 43#include <sys/proc.h> 44#include <sys/conf.h> 45#include <sys/dkstat.h> 46#include <sys/fcntl.h> 47#include <sys/interrupt.h> 48#include <sys/kernel.h> | 36/*#define RCDEBUG*/ 37 38#include <sys/param.h> 39#include <sys/systm.h> 40#include <sys/tty.h> 41#include <sys/proc.h> 42#include <sys/conf.h> 43#include <sys/dkstat.h> 44#include <sys/fcntl.h> 45#include <sys/interrupt.h> 46#include <sys/kernel.h> |
49#ifdef DEVFS 50#include <sys/devfsext.h> 51#endif /*DEVFS*/ 52 | |
53#include <machine/clock.h> 54#include <machine/ipl.h> 55 56#include <i386/isa/isa_device.h> 57 58#include <i386/isa/ic/cd180.h> 59#include <i386/isa/rcreg.h> 60 --- 82 unchanged lines hidden (view full) --- 143 struct tty *rc_tp; /* tty struct */ 144 u_char *rc_iptr; /* Chars input buffer */ 145 u_char *rc_hiwat; /* hi-water mark */ 146 u_char *rc_bufend; /* end of buffer */ 147 u_char *rc_optr; /* ptr in output buf */ 148 u_char *rc_obufend; /* end of output buf */ 149 u_char rc_ibuf[4 * RC_IBUFSIZE]; /* input buffer */ 150 u_char rc_obuf[RC_OBUFSIZE]; /* output buffer */ | 47#include <machine/clock.h> 48#include <machine/ipl.h> 49 50#include <i386/isa/isa_device.h> 51 52#include <i386/isa/ic/cd180.h> 53#include <i386/isa/rcreg.h> 54 --- 82 unchanged lines hidden (view full) --- 137 struct tty *rc_tp; /* tty struct */ 138 u_char *rc_iptr; /* Chars input buffer */ 139 u_char *rc_hiwat; /* hi-water mark */ 140 u_char *rc_bufend; /* end of buffer */ 141 u_char *rc_optr; /* ptr in output buf */ 142 u_char *rc_obufend; /* end of output buf */ 143 u_char rc_ibuf[4 * RC_IBUFSIZE]; /* input buffer */ 144 u_char rc_obuf[RC_OBUFSIZE]; /* output buffer */ |
151#ifdef DEVFS 152 void *devfs_token; 153#endif | |
154} rc_chans[NRC * CD180_NCHAN]; 155 156static int rc_scheduled_event = 0; 157 158/* for pstat -t */ 159static struct tty rc_tty[NRC * CD180_NCHAN]; 160static const int nrc_tty = NRC * CD180_NCHAN; 161 --- 107 unchanged lines hidden (view full) --- 269 rc->rc_dtrwait = 3 * hz; 270 rc->rc_dcdwaits= 0; 271 rc->rc_hotchar = 0; 272 tp = rc->rc_tp = &rc_tty[chan + (dvp->id_unit * CD180_NCHAN)]; 273 ttychars(tp); 274 tp->t_lflag = tp->t_iflag = tp->t_oflag = 0; 275 tp->t_cflag = TTYDEF_CFLAG; 276 tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED; | 145} rc_chans[NRC * CD180_NCHAN]; 146 147static int rc_scheduled_event = 0; 148 149/* for pstat -t */ 150static struct tty rc_tty[NRC * CD180_NCHAN]; 151static const int nrc_tty = NRC * CD180_NCHAN; 152 --- 107 unchanged lines hidden (view full) --- 260 rc->rc_dtrwait = 3 * hz; 261 rc->rc_dcdwaits= 0; 262 rc->rc_hotchar = 0; 263 tp = rc->rc_tp = &rc_tty[chan + (dvp->id_unit * CD180_NCHAN)]; 264 ttychars(tp); 265 tp->t_lflag = tp->t_iflag = tp->t_oflag = 0; 266 tp->t_cflag = TTYDEF_CFLAG; 267 tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED; |
277#ifdef DEVFS 278/* FIX THIS to reflect real devices */ 279 rc->devfs_token = 280 devfs_add_devswf(&rc_cdevsw, 281 (dvp->id_unit * CD180_NCHAN) + chan, 282 DV_CHR, 0, 0, 0600, "rc%d.%d", 283 dvp->id_unit, chan); 284#endif | |
285 } 286 rcb->rcb_probed = RC_ATTACHED; 287 if (!rc_started) { 288 cdevsw_add(&rc_cdevsw); 289 register_swi(SWI_TTY, rcpoll); 290 rc_wakeup((void *)NULL); 291 rc_started = 1; 292 } --- 1220 unchanged lines hidden --- | 268 } 269 rcb->rcb_probed = RC_ATTACHED; 270 if (!rc_started) { 271 cdevsw_add(&rc_cdevsw); 272 register_swi(SWI_TTY, rcpoll); 273 rc_wakeup((void *)NULL); 274 rc_started = 1; 275 } --- 1220 unchanged lines hidden --- |