summaryrefslogtreecommitdiffstats
path: root/sys/dev/rp
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-07-11 15:18:39 +0000
committerphk <phk@FreeBSD.org>2004-07-11 15:18:39 +0000
commit3683e698d2b43b057fd00f831207c4322511e44d (patch)
tree620574f4324dc13c9b729c71899ac553f4582bcc /sys/dev/rp
parentf41e48677c13ba754473dc99f8dc21534770132f (diff)
downloadFreeBSD-src-3683e698d2b43b057fd00f831207c4322511e44d.zip
FreeBSD-src-3683e698d2b43b057fd00f831207c4322511e44d.tar.gz
Introduce ttygone() which indicates that the hardware is detached.
Move dtrwait logic to the generic TTY level.
Diffstat (limited to 'sys/dev/rp')
-rw-r--r--sys/dev/rp/rp.c20
-rw-r--r--sys/dev/rp/rpvar.h1
2 files changed, 4 insertions, 17 deletions
diff --git a/sys/dev/rp/rp.c b/sys/dev/rp/rp.c
index 6a9eb63..87412b1 100644
--- a/sys/dev/rp/rp.c
+++ b/sys/dev/rp/rp.c
@@ -871,7 +871,6 @@ rp_attachcommon(CONTROLLER_T *ctlp, int num_aiops, int num_ports)
rp->rp_tty->t_line = 0;
/* tty->t_termios = deftermios;
*/
- rp->dtr_wait = 3 * hz;
rp->it_in.c_iflag = 0;
rp->it_in.c_oflag = 0;
rp->it_in.c_cflag = TTYDEF_CFLAG;
@@ -983,7 +982,7 @@ rpopen(dev, flag, mode, td)
open_top:
while(rp->state & ~SET_DTR) {
- error = tsleep(&rp->dtr_wait, TTIPRI | PCATCH, "rpdtr", 0);
+ error = tsleep(&tp->t_dtr_wait, TTIPRI | PCATCH, "rpdtr", 0);
if(error != 0)
goto out;
}
@@ -1174,8 +1173,8 @@ rphardclose(struct rp_port *rp)
if(IS_CALLOUT(tp->t_dev)) {
sClrDTR(cp);
}
- if(rp->dtr_wait != 0) {
- timeout(rpdtrwakeup, rp, rp->dtr_wait);
+ if(tp->t_dtr_wait != 0) {
+ timeout(rpdtrwakeup, rp, tp->t_dtr_wait);
rp->state |= ~SET_DTR;
}
@@ -1222,7 +1221,7 @@ rpdtrwakeup(void *chan)
rp = (struct rp_port *)chan;
rp->state &= SET_DTR;
- wakeup(&rp->dtr_wait);
+ wakeup(&rp->rp_tty->t_dtr_wait);
}
static int
@@ -1408,17 +1407,6 @@ rpioctl(dev, cmd, data, flag, td)
*(int *)data = result;
break;
- case TIOCMSDTRWAIT:
- error = suser(td);
- if(error != 0) {
- splx(oldspl);
- return(error);
- }
- rp->dtr_wait = *(int *)data * hz/100;
- break;
- case TIOCMGDTRWAIT:
- *(int *)data = rp->dtr_wait * 100/hz;
- break;
default:
splx(oldspl);
return ENOTTY;
diff --git a/sys/dev/rp/rpvar.h b/sys/dev/rp/rpvar.h
index 41aee02..89b4a2f 100644
--- a/sys/dev/rp/rpvar.h
+++ b/sys/dev/rp/rpvar.h
@@ -57,7 +57,6 @@ struct rp_port {
unsigned char state; /* state of dtr */
/* Time to hold DTR down on close */
- int dtr_wait;
int wopeners; /* processes waiting for DCD */
int rp_port;
OpenPOWER on IntegriCloud