aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/rp
diff options
context:
space:
mode:
authorRemko Lodder <remko@FreeBSD.org>2007-06-26 13:50:48 +0000
committerRemko Lodder <remko@FreeBSD.org>2007-06-26 13:50:48 +0000
commitc6feae72244fd50640e544aca79f52873c7d7448 (patch)
treeb7648f3a4b68c3b34a10ee814b95459a3e829080 /sys/dev/rp
parent67c4e286381bb32105152b778529f52af9a9087b (diff)
downloadsrc-c6feae72244fd50640e544aca79f52873c7d7448.tar.gz
src-c6feae72244fd50640e544aca79f52873c7d7448.zip
Notes
Diffstat (limited to 'sys/dev/rp')
-rw-r--r--sys/dev/rp/rp.c14
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