diff options
Diffstat (limited to 'sys/dev/rp/rp.c')
-rw-r--r-- | sys/dev/rp/rp.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sys/dev/rp/rp.c b/sys/dev/rp/rp.c index 6d9690d9597c..0e7fb2e077b0 100644 --- a/sys/dev/rp/rp.c +++ b/sys/dev/rp/rp.c @@ -573,6 +573,7 @@ static struct rp_port *p_rp_table[MAX_RP_PORTS]; static void rpbreak(struct tty *, int); static void rpclose(struct tty *tp); +static void rphardclose(struct tty *tp); static int rpmodem(struct tty *, int, int); static int rpparam(struct tty *, struct termios *); static void rpstart(struct tty *); @@ -697,7 +698,7 @@ static void rp_handle_port(struct rp_port *rp) if((tp->t_state & TS_CARR_ON)) { (void)ttyld_modem(tp, 0); if(ttyld_modem(tp, 0) == 0) { - rpclose(tp); + rphardclose(tp); } } } @@ -935,6 +936,16 @@ static void rpclose(struct tty *tp) { struct rp_port *rp; + + rp = tp->t_sc; + rphardclose(tp); + device_unbusy(rp->rp_ctlp->dev); +} + +static void +rphardclose(struct tty *tp) +{ + struct rp_port *rp; CHANNEL_t *cp; rp = tp->t_sc; @@ -958,7 +969,6 @@ rpclose(struct tty *tp) tp->t_actout = FALSE; wakeup(&tp->t_actout); wakeup(TSA_CARR_ON(tp)); - device_unbusy(rp->rp_ctlp->dev); } static void |