summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1994-03-23 17:28:35 +0000
committerache <ache@FreeBSD.org>1994-03-23 17:28:35 +0000
commit9951f4331e0349dcfc45c0b316155c3a616454f2 (patch)
tree2a27f1deeddcb30986554646da156d8429d89214
parent0b07523c75c58c331e7f4c9f19e966a87359cb3e (diff)
downloadFreeBSD-src-9951f4331e0349dcfc45c0b316155c3a616454f2.zip
FreeBSD-src-9951f4331e0349dcfc45c0b316155c3a616454f2.tar.gz
1) Change dtrwait 300 to 3 * hz (to be more kosher)
2) Protect sioclose by spltty()
-rw-r--r--sys/dev/sio/sio.c6
-rw-r--r--sys/i386/isa/sio.c6
-rw-r--r--sys/isa/sio.c6
3 files changed, 12 insertions, 6 deletions
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c
index f19709f..a90d45a 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.36 1994/03/21 15:18:27 ache Exp $
+ * $Id: sio.c,v 1.37 1994/03/21 22:19:56 ache Exp $
*/
#include "sio.h"
@@ -426,7 +426,7 @@ sioattach(isdp)
com = &com_structs[unit];
com->cfcr_image = CFCR_8BITS;
com->mcr_image = MCR_IENABLE;
- com->dtr_wait = 300;
+ com->dtr_wait = 3 * hz;
com->tx_fifo_size = 1;
com->iptr = com->ibuf = com->ibuf1;
com->ibufend = com->ibuf1 + RS_IBUFSIZE;
@@ -768,6 +768,7 @@ sioclose(dev, flag, mode, p)
{
struct com_s *com;
struct tty *tp;
+ int s = spltty();
com = com_addr(UNIT(dev));
tp = com->tp;
@@ -775,6 +776,7 @@ sioclose(dev, flag, mode, p)
siostop(tp, FREAD|FWRITE);
ttyclose(tp);
comhardclose(com);
+ splx(s);
return (0);
}
diff --git a/sys/i386/isa/sio.c b/sys/i386/isa/sio.c
index f19709f..a90d45a 100644
--- a/sys/i386/isa/sio.c
+++ b/sys/i386/isa/sio.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
- * $Id: sio.c,v 1.36 1994/03/21 15:18:27 ache Exp $
+ * $Id: sio.c,v 1.37 1994/03/21 22:19:56 ache Exp $
*/
#include "sio.h"
@@ -426,7 +426,7 @@ sioattach(isdp)
com = &com_structs[unit];
com->cfcr_image = CFCR_8BITS;
com->mcr_image = MCR_IENABLE;
- com->dtr_wait = 300;
+ com->dtr_wait = 3 * hz;
com->tx_fifo_size = 1;
com->iptr = com->ibuf = com->ibuf1;
com->ibufend = com->ibuf1 + RS_IBUFSIZE;
@@ -768,6 +768,7 @@ sioclose(dev, flag, mode, p)
{
struct com_s *com;
struct tty *tp;
+ int s = spltty();
com = com_addr(UNIT(dev));
tp = com->tp;
@@ -775,6 +776,7 @@ sioclose(dev, flag, mode, p)
siostop(tp, FREAD|FWRITE);
ttyclose(tp);
comhardclose(com);
+ splx(s);
return (0);
}
diff --git a/sys/isa/sio.c b/sys/isa/sio.c
index f19709f..a90d45a 100644
--- a/sys/isa/sio.c
+++ b/sys/isa/sio.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
- * $Id: sio.c,v 1.36 1994/03/21 15:18:27 ache Exp $
+ * $Id: sio.c,v 1.37 1994/03/21 22:19:56 ache Exp $
*/
#include "sio.h"
@@ -426,7 +426,7 @@ sioattach(isdp)
com = &com_structs[unit];
com->cfcr_image = CFCR_8BITS;
com->mcr_image = MCR_IENABLE;
- com->dtr_wait = 300;
+ com->dtr_wait = 3 * hz;
com->tx_fifo_size = 1;
com->iptr = com->ibuf = com->ibuf1;
com->ibufend = com->ibuf1 + RS_IBUFSIZE;
@@ -768,6 +768,7 @@ sioclose(dev, flag, mode, p)
{
struct com_s *com;
struct tty *tp;
+ int s = spltty();
com = com_addr(UNIT(dev));
tp = com->tp;
@@ -775,6 +776,7 @@ sioclose(dev, flag, mode, p)
siostop(tp, FREAD|FWRITE);
ttyclose(tp);
comhardclose(com);
+ splx(s);
return (0);
}
OpenPOWER on IntegriCloud