summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1998-02-13 12:46:28 +0000
committerphk <phk@FreeBSD.org>1998-02-13 12:46:28 +0000
commit76528cc622637526fe2545d99fd21a2c6f39e9c4 (patch)
tree93a9b69fd7cbfbcfaa3a59dc4588bf3dfdb8dd8b /sys
parent3a8117ec4ddcc05573335ac5f170bf00089f52da (diff)
downloadFreeBSD-src-76528cc622637526fe2545d99fd21a2c6f39e9c4.zip
FreeBSD-src-76528cc622637526fe2545d99fd21a2c6f39e9c4.tar.gz
Implement the spirit but not the letter of Terrys hot-char patch.
The differences Terrys patch and this patch are: * Remove a lot of un-needed comments. * Don't put l_hotchar at the front of stuct linesw, there is no need to. * Use the #defines for the hotchar in the SLIP and PPP line disciplines
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/cy/cy.c13
-rw-r--r--sys/dev/cy/cy_isa.c13
-rw-r--r--sys/dev/rc/rc.c7
-rw-r--r--sys/dev/si/si.c15
-rw-r--r--sys/dev/sio/sio.c13
-rw-r--r--sys/i386/isa/cy.c13
-rw-r--r--sys/i386/isa/istallion.c10
-rw-r--r--sys/i386/isa/rc.c7
-rw-r--r--sys/i386/isa/si.c15
-rw-r--r--sys/i386/isa/sio.c13
-rw-r--r--sys/i386/isa/stallion.c10
-rw-r--r--sys/isa/sio.c13
-rw-r--r--sys/net/if_sl.c5
-rw-r--r--sys/net/ppp_tty.c7
-rw-r--r--sys/pc98/cbus/sio.c13
-rw-r--r--sys/pc98/pc98/sio.c13
-rw-r--r--sys/sys/conf.h3
-rw-r--r--sys/sys/linedisc.h3
18 files changed, 37 insertions, 149 deletions
diff --git a/sys/dev/cy/cy.c b/sys/dev/cy/cy.c
index bb78e29..8661f3e 100644
--- a/sys/dev/cy/cy.c
+++ b/sys/dev/cy/cy.c
@@ -27,7 +27,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: cy.c,v 1.59 1997/12/28 06:23:03 bde Exp $
+ * $Id: cy.c,v 1.60 1998/01/24 02:54:17 eivind Exp $
*/
#include "opt_compat.h"
@@ -2420,16 +2420,7 @@ disc_optim(tp, t, com)
tp->t_state |= TS_CAN_BYPASS_L_RINT;
else
tp->t_state &= ~TS_CAN_BYPASS_L_RINT;
- /*
- * Prepare to reduce input latency for packet
- * discplines with a end of packet character.
- */
- if (tp->t_line == SLIPDISC)
- com->hotchar = 0xc0;
- else if (tp->t_line == PPPDISC)
- com->hotchar = 0x7e;
- else
- com->hotchar = 0;
+ com->hotchar = linesw[tp->t_line].l_hotchar;
#ifndef SOFT_HOTCHAR
iobase = com->iobase;
cd_outb(iobase, CD1400_CAR, com->cy_align, com->unit & CD1400_CAR_CHAN);
diff --git a/sys/dev/cy/cy_isa.c b/sys/dev/cy/cy_isa.c
index bb78e29..8661f3e 100644
--- a/sys/dev/cy/cy_isa.c
+++ b/sys/dev/cy/cy_isa.c
@@ -27,7 +27,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: cy.c,v 1.59 1997/12/28 06:23:03 bde Exp $
+ * $Id: cy.c,v 1.60 1998/01/24 02:54:17 eivind Exp $
*/
#include "opt_compat.h"
@@ -2420,16 +2420,7 @@ disc_optim(tp, t, com)
tp->t_state |= TS_CAN_BYPASS_L_RINT;
else
tp->t_state &= ~TS_CAN_BYPASS_L_RINT;
- /*
- * Prepare to reduce input latency for packet
- * discplines with a end of packet character.
- */
- if (tp->t_line == SLIPDISC)
- com->hotchar = 0xc0;
- else if (tp->t_line == PPPDISC)
- com->hotchar = 0x7e;
- else
- com->hotchar = 0;
+ com->hotchar = linesw[tp->t_line].l_hotchar;
#ifndef SOFT_HOTCHAR
iobase = com->iobase;
cd_outb(iobase, CD1400_CAR, com->cy_align, com->unit & CD1400_CAR_CHAN);
diff --git a/sys/dev/rc/rc.c b/sys/dev/rc/rc.c
index 2779bbf..784527f 100644
--- a/sys/dev/rc/rc.c
+++ b/sys/dev/rc/rc.c
@@ -1476,12 +1476,7 @@ disc_optim(tp, t, rc)
tp->t_state |= TS_CAN_BYPASS_L_RINT;
else
tp->t_state &= ~TS_CAN_BYPASS_L_RINT;
- if (tp->t_line == SLIPDISC)
- rc->rc_hotchar = 0xc0;
- else if (tp->t_line == PPPDISC)
- rc->rc_hotchar = 0x7e;
- else
- rc->rc_hotchar = 0;
+ rc->rc_hotchar = linesw[tp->t_line].l_hotchar;
}
static void
diff --git a/sys/dev/si/si.c b/sys/dev/si/si.c
index 31404aa..e55e41f 100644
--- a/sys/dev/si/si.c
+++ b/sys/dev/si/si.c
@@ -30,7 +30,7 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
* NO EVENT SHALL THE AUTHORS BE LIABLE.
*
- * $Id: si.c,v 1.64 1998/01/24 02:54:24 eivind Exp $
+ * $Id: si.c,v 1.65 1998/01/31 07:23:09 eivind Exp $
*/
#ifndef lint
@@ -2299,18 +2299,7 @@ si_disc_optim(tp, t, pp)
tp->t_state |= TS_CAN_BYPASS_L_RINT;
else
tp->t_state &= ~TS_CAN_BYPASS_L_RINT;
-
- /*
- * Prepare to reduce input latency for packet
- * discplines with a end of packet character.
- */
- if (tp->t_line == SLIPDISC)
- pp->sp_hotchar = 0xc0;
- else if (tp->t_line == PPPDISC)
- pp->sp_hotchar = 0x7e;
- else
- pp->sp_hotchar = 0;
-
+ pp->sp_hotchar = linesw[tp->t_line].l_hotchar;
DPRINT((pp, DBG_OPTIM, "bypass: %s, hotchar: %x\n",
(tp->t_state & TS_CAN_BYPASS_L_RINT) ? "on" : "off",
pp->sp_hotchar));
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c
index 922d93b..a1da0ff 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.194 1998/01/08 04:53:43 amurai Exp $
+ * $Id: sio.c,v 1.195 1998/01/24 02:54:25 eivind Exp $
*/
#include "opt_comconsole.h"
@@ -2548,16 +2548,7 @@ disc_optim(tp, t, com)
tp->t_state |= TS_CAN_BYPASS_L_RINT;
else
tp->t_state &= ~TS_CAN_BYPASS_L_RINT;
- /*
- * Prepare to reduce input latency for packet
- * discplines with a end of packet character.
- */
- if (tp->t_line == SLIPDISC)
- com->hotchar = 0xc0;
- else if (tp->t_line == PPPDISC)
- com->hotchar = 0x7e;
- else
- com->hotchar = 0;
+ com->hotchar = linesw[tp->t_line].l_hotchar;
}
/*
diff --git a/sys/i386/isa/cy.c b/sys/i386/isa/cy.c
index bb78e29..8661f3e 100644
--- a/sys/i386/isa/cy.c
+++ b/sys/i386/isa/cy.c
@@ -27,7 +27,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: cy.c,v 1.59 1997/12/28 06:23:03 bde Exp $
+ * $Id: cy.c,v 1.60 1998/01/24 02:54:17 eivind Exp $
*/
#include "opt_compat.h"
@@ -2420,16 +2420,7 @@ disc_optim(tp, t, com)
tp->t_state |= TS_CAN_BYPASS_L_RINT;
else
tp->t_state &= ~TS_CAN_BYPASS_L_RINT;
- /*
- * Prepare to reduce input latency for packet
- * discplines with a end of packet character.
- */
- if (tp->t_line == SLIPDISC)
- com->hotchar = 0xc0;
- else if (tp->t_line == PPPDISC)
- com->hotchar = 0x7e;
- else
- com->hotchar = 0;
+ com->hotchar = linesw[tp->t_line].l_hotchar;
#ifndef SOFT_HOTCHAR
iobase = com->iobase;
cd_outb(iobase, CD1400_CAR, com->cy_align, com->unit & CD1400_CAR_CHAN);
diff --git a/sys/i386/isa/istallion.c b/sys/i386/isa/istallion.c
index e74ec01..b59e5b2 100644
--- a/sys/i386/isa/istallion.c
+++ b/sys/i386/isa/istallion.c
@@ -33,7 +33,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: istallion.c,v 1.15 1997/12/16 17:40:00 eivind Exp $
+ * $Id: istallion.c,v 1.16 1998/02/09 06:08:33 eivind Exp $
*/
/*****************************************************************************/
@@ -2507,13 +2507,7 @@ static void stli_ttyoptim(stliport_t *portp, struct termios *tiosp)
tp->t_state |= TS_CAN_BYPASS_L_RINT;
else
tp->t_state &= ~TS_CAN_BYPASS_L_RINT;
-
- if (tp->t_line == SLIPDISC)
- portp->hotchar = 0xc0;
- else if (tp->t_line == PPPDISC)
- portp->hotchar = 0x7e;
- else
- portp->hotchar = 0;
+ portp->hotchar = linesw[tp->t_line].l_hotchar;
}
/*****************************************************************************/
diff --git a/sys/i386/isa/rc.c b/sys/i386/isa/rc.c
index 2779bbf..784527f 100644
--- a/sys/i386/isa/rc.c
+++ b/sys/i386/isa/rc.c
@@ -1476,12 +1476,7 @@ disc_optim(tp, t, rc)
tp->t_state |= TS_CAN_BYPASS_L_RINT;
else
tp->t_state &= ~TS_CAN_BYPASS_L_RINT;
- if (tp->t_line == SLIPDISC)
- rc->rc_hotchar = 0xc0;
- else if (tp->t_line == PPPDISC)
- rc->rc_hotchar = 0x7e;
- else
- rc->rc_hotchar = 0;
+ rc->rc_hotchar = linesw[tp->t_line].l_hotchar;
}
static void
diff --git a/sys/i386/isa/si.c b/sys/i386/isa/si.c
index 31404aa..e55e41f 100644
--- a/sys/i386/isa/si.c
+++ b/sys/i386/isa/si.c
@@ -30,7 +30,7 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
* NO EVENT SHALL THE AUTHORS BE LIABLE.
*
- * $Id: si.c,v 1.64 1998/01/24 02:54:24 eivind Exp $
+ * $Id: si.c,v 1.65 1998/01/31 07:23:09 eivind Exp $
*/
#ifndef lint
@@ -2299,18 +2299,7 @@ si_disc_optim(tp, t, pp)
tp->t_state |= TS_CAN_BYPASS_L_RINT;
else
tp->t_state &= ~TS_CAN_BYPASS_L_RINT;
-
- /*
- * Prepare to reduce input latency for packet
- * discplines with a end of packet character.
- */
- if (tp->t_line == SLIPDISC)
- pp->sp_hotchar = 0xc0;
- else if (tp->t_line == PPPDISC)
- pp->sp_hotchar = 0x7e;
- else
- pp->sp_hotchar = 0;
-
+ pp->sp_hotchar = linesw[tp->t_line].l_hotchar;
DPRINT((pp, DBG_OPTIM, "bypass: %s, hotchar: %x\n",
(tp->t_state & TS_CAN_BYPASS_L_RINT) ? "on" : "off",
pp->sp_hotchar));
diff --git a/sys/i386/isa/sio.c b/sys/i386/isa/sio.c
index 922d93b..a1da0ff 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.194 1998/01/08 04:53:43 amurai Exp $
+ * $Id: sio.c,v 1.195 1998/01/24 02:54:25 eivind Exp $
*/
#include "opt_comconsole.h"
@@ -2548,16 +2548,7 @@ disc_optim(tp, t, com)
tp->t_state |= TS_CAN_BYPASS_L_RINT;
else
tp->t_state &= ~TS_CAN_BYPASS_L_RINT;
- /*
- * Prepare to reduce input latency for packet
- * discplines with a end of packet character.
- */
- if (tp->t_line == SLIPDISC)
- com->hotchar = 0xc0;
- else if (tp->t_line == PPPDISC)
- com->hotchar = 0x7e;
- else
- com->hotchar = 0;
+ com->hotchar = linesw[tp->t_line].l_hotchar;
}
/*
diff --git a/sys/i386/isa/stallion.c b/sys/i386/isa/stallion.c
index b0938cc..bfe8064 100644
--- a/sys/i386/isa/stallion.c
+++ b/sys/i386/isa/stallion.c
@@ -33,7 +33,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: stallion.c,v 1.15 1997/12/16 17:40:09 eivind Exp $
+ * $Id: stallion.c,v 1.16 1998/02/09 06:08:42 eivind Exp $
*/
/*****************************************************************************/
@@ -2556,13 +2556,7 @@ static void stl_ttyoptim(stlport_t *portp, struct termios *tiosp)
tp->t_state |= TS_CAN_BYPASS_L_RINT;
else
tp->t_state &= ~TS_CAN_BYPASS_L_RINT;
-
- if (tp->t_line == SLIPDISC)
- portp->hotchar = 0xc0;
- else if (tp->t_line == PPPDISC)
- portp->hotchar = 0x7e;
- else
- portp->hotchar = 0;
+ portp->hotchar = linesw[tp->t_line].l_hotchar;
}
/*****************************************************************************/
diff --git a/sys/isa/sio.c b/sys/isa/sio.c
index 922d93b..a1da0ff 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.194 1998/01/08 04:53:43 amurai Exp $
+ * $Id: sio.c,v 1.195 1998/01/24 02:54:25 eivind Exp $
*/
#include "opt_comconsole.h"
@@ -2548,16 +2548,7 @@ disc_optim(tp, t, com)
tp->t_state |= TS_CAN_BYPASS_L_RINT;
else
tp->t_state &= ~TS_CAN_BYPASS_L_RINT;
- /*
- * Prepare to reduce input latency for packet
- * discplines with a end of packet character.
- */
- if (tp->t_line == SLIPDISC)
- com->hotchar = 0xc0;
- else if (tp->t_line == PPPDISC)
- com->hotchar = 0x7e;
- else
- com->hotchar = 0;
+ com->hotchar = linesw[tp->t_line].l_hotchar;
}
/*
diff --git a/sys/net/if_sl.c b/sys/net/if_sl.c
index f72d814..5ff58ec 100644
--- a/sys/net/if_sl.c
+++ b/sys/net/if_sl.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)if_sl.c 8.6 (Berkeley) 2/1/94
- * $Id: if_sl.c,v 1.65 1998/01/08 23:41:29 eivind Exp $
+ * $Id: if_sl.c,v 1.66 1998/02/09 06:09:54 eivind Exp $
*/
/*
@@ -196,7 +196,8 @@ static int slstart __P((struct tty *));
static struct linesw slipdisc = {
slopen, slclose, l_noread, l_nowrite,
- sltioctl, slinput, slstart, ttymodem
+ sltioctl, slinput, slstart, ttymodem,
+ FRAME_END
};
/*
diff --git a/sys/net/ppp_tty.c b/sys/net/ppp_tty.c
index ecfe326..f12a85c 100644
--- a/sys/net/ppp_tty.c
+++ b/sys/net/ppp_tty.c
@@ -70,7 +70,7 @@
* Paul Mackerras (paulus@cs.anu.edu.au).
*/
-/* $Id: ppp_tty.c,v 1.28 1997/11/18 14:08:51 bde Exp $ */
+/* $Id: ppp_tty.c,v 1.29 1997/12/06 13:24:37 bde Exp $ */
#include "ppp.h"
#if NPPP > 0
@@ -161,8 +161,9 @@ void pppasyncattach __P((void *));
*/
static struct linesw pppdisc = {
- pppopen, pppclose, pppread, pppwrite, ppptioctl,
- pppinput, pppstart, ttymodem
+ pppopen, pppclose, pppread, pppwrite,
+ ppptioctl, pppinput, pppstart, ttymodem,
+ PPP_FLAG
};
void
diff --git a/sys/pc98/cbus/sio.c b/sys/pc98/cbus/sio.c
index 81a1e2a..dd94fb4 100644
--- a/sys/pc98/cbus/sio.c
+++ b/sys/pc98/cbus/sio.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
- * $Id: sio.c,v 1.50 1998/01/24 02:54:39 eivind Exp $
+ * $Id: sio.c,v 1.51 1998/02/02 07:59:05 kato Exp $
*/
#include "opt_comconsole.h"
@@ -3283,16 +3283,7 @@ disc_optim(tp, t, com)
tp->t_state |= TS_CAN_BYPASS_L_RINT;
else
tp->t_state &= ~TS_CAN_BYPASS_L_RINT;
- /*
- * Prepare to reduce input latency for packet
- * discplines with a end of packet character.
- */
- if (tp->t_line == SLIPDISC)
- com->hotchar = 0xc0;
- else if (tp->t_line == PPPDISC)
- com->hotchar = 0x7e;
- else
- com->hotchar = 0;
+ com->hotchar = linesw[tp->t_line].l_hotchar;
}
/*
diff --git a/sys/pc98/pc98/sio.c b/sys/pc98/pc98/sio.c
index 81a1e2a..dd94fb4 100644
--- a/sys/pc98/pc98/sio.c
+++ b/sys/pc98/pc98/sio.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
- * $Id: sio.c,v 1.50 1998/01/24 02:54:39 eivind Exp $
+ * $Id: sio.c,v 1.51 1998/02/02 07:59:05 kato Exp $
*/
#include "opt_comconsole.h"
@@ -3283,16 +3283,7 @@ disc_optim(tp, t, com)
tp->t_state |= TS_CAN_BYPASS_L_RINT;
else
tp->t_state &= ~TS_CAN_BYPASS_L_RINT;
- /*
- * Prepare to reduce input latency for packet
- * discplines with a end of packet character.
- */
- if (tp->t_line == SLIPDISC)
- com->hotchar = 0xc0;
- else if (tp->t_line == PPPDISC)
- com->hotchar = 0x7e;
- else
- com->hotchar = 0;
+ com->hotchar = linesw[tp->t_line].l_hotchar;
}
/*
diff --git a/sys/sys/conf.h b/sys/sys/conf.h
index ff5662f..7a9be5e 100644
--- a/sys/sys/conf.h
+++ b/sys/sys/conf.h
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)conf.h 8.5 (Berkeley) 1/9/95
- * $Id: conf.h,v 1.37 1997/11/22 08:35:42 bde Exp $
+ * $Id: conf.h,v 1.38 1998/01/24 02:01:29 dyson Exp $
*/
#ifndef _SYS_CONF_H_
@@ -151,6 +151,7 @@ struct linesw {
l_rint_t *l_rint;
l_start_t *l_start;
l_modem_t *l_modem;
+ u_char l_hotchar;
};
#ifdef KERNEL
diff --git a/sys/sys/linedisc.h b/sys/sys/linedisc.h
index ff5662f..7a9be5e 100644
--- a/sys/sys/linedisc.h
+++ b/sys/sys/linedisc.h
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)conf.h 8.5 (Berkeley) 1/9/95
- * $Id: conf.h,v 1.37 1997/11/22 08:35:42 bde Exp $
+ * $Id: conf.h,v 1.38 1998/01/24 02:01:29 dyson Exp $
*/
#ifndef _SYS_CONF_H_
@@ -151,6 +151,7 @@ struct linesw {
l_rint_t *l_rint;
l_start_t *l_start;
l_modem_t *l_modem;
+ u_char l_hotchar;
};
#ifdef KERNEL
OpenPOWER on IntegriCloud