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: --- 84 unchanged lines hidden (view full) --- 93static d_open_t rcopen; 94static d_close_t rcclose; 95static d_read_t rcread; 96static d_write_t rcwrite; 97static d_ioctl_t rcioctl; 98static d_stop_t rcstop; 99static d_devtotty_t rcdevtotty; 100 |
101#define CDEV_MAJOR 63 102static struct cdevsw rc_cdevsw = { 103 rcopen, rcclose, rcread, rcwrite, 104 rcioctl, rcstop, noreset, rcdevtotty, 105 ttpoll, nommap, NULL, "rc", 106 NULL, -1, nodump, nopsize, 107 D_TTY, 108}; |
109 110/* Per-board structure */ 111static struct rc_softc { 112 u_int rcb_probed; /* 1 - probed, 2 - attached */ 113 u_int rcb_addr; /* Base I/O addr */ 114 u_int rcb_unit; /* unit # */ 115 u_char rcb_dtr; /* DTR status */ 116 struct rc_chans *rcb_baserc; /* base rc ptr */ --- 658 unchanged lines hidden (view full) --- 775 else 776 tp->t_cflag &= ~CLOCAL; 777 778 error = rc_param(tp, &tp->t_termios); 779 if (error) 780 goto out; 781 (void) rc_modctl(rc, TIOCM_RTS|TIOCM_DTR, DMSET); 782 |
783 if ((rc->rc_msvr & MSVR_CD) || CALLOUT(dev)) 784 (*linesw[tp->t_line].l_modem)(tp, 1); 785 } 786 if (!(tp->t_state & TS_CARR_ON) && !CALLOUT(dev) 787 && !(tp->t_cflag & CLOCAL) && !(flag & O_NONBLOCK)) { 788 rc->rc_dcdwaits++; 789 error = tsleep(TSA_CARR_ON(tp), TTIPRI | PCATCH, "rcdcd", 0); 790 rc->rc_dcdwaits--; --- 718 unchanged lines hidden --- |