summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1994-10-15 18:05:25 +0000
committerache <ache@FreeBSD.org>1994-10-15 18:05:25 +0000
commitd2e6f2862ca222bc5cf480de8575578ab341b98a (patch)
tree41e10713727d9dfe35f5ca5254b9e5e492ed263b /sys/dev
parent32696c9c2e645fbbd09ce5cdabf2ca8325fa9a80 (diff)
downloadFreeBSD-src-d2e6f2862ca222bc5cf480de8575578ab341b98a.zip
FreeBSD-src-d2e6f2862ca222bc5cf480de8575578ab341b98a.tar.gz
Prevent modem hanging forever on close with CTS off:
use 1min timeout to wakeup ttywait
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/sio/sio.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c
index 1df3260..6356c83 100644
--- a/sys/dev/sio/sio.c
+++ b/sys/dev/sio/sio.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
- * $Id: sio.c,v 1.53 1994/09/21 19:39:25 davidg Exp $
+ * $Id: sio.c,v 1.54 1994/10/12 19:49:11 bde Exp $
*/
#include "sio.h"
@@ -876,7 +876,9 @@ sioclose(dev, flag, mode, p)
com = com_addr(MINOR_TO_UNIT(mynor));
tp = com->tp;
s = spltty();
+ timeout((timeout_func_t)wakeup, (caddr_t)&tp->t_outq, 60*hz);
(*linesw[tp->t_line].l_close)(tp, flag);
+ untimeout((timeout_func_t)wakeup, (caddr_t)&tp->t_outq);
siostop(tp, FREAD | FWRITE);
comhardclose(com);
ttyclose(tp);
OpenPOWER on IntegriCloud