diff options
author | phk <phk@FreeBSD.org> | 1998-02-13 12:46:28 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1998-02-13 12:46:28 +0000 |
commit | 76528cc622637526fe2545d99fd21a2c6f39e9c4 (patch) | |
tree | 93a9b69fd7cbfbcfaa3a59dc4588bf3dfdb8dd8b /sys/i386/isa | |
parent | 3a8117ec4ddcc05573335ac5f170bf00089f52da (diff) | |
download | FreeBSD-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/i386/isa')
-rw-r--r-- | sys/i386/isa/cy.c | 13 | ||||
-rw-r--r-- | sys/i386/isa/istallion.c | 10 | ||||
-rw-r--r-- | sys/i386/isa/rc.c | 7 | ||||
-rw-r--r-- | sys/i386/isa/si.c | 15 | ||||
-rw-r--r-- | sys/i386/isa/sio.c | 13 | ||||
-rw-r--r-- | sys/i386/isa/stallion.c | 10 |
6 files changed, 11 insertions, 57 deletions
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; } /*****************************************************************************/ |