Set the FIFO threshold based on the receive speed, per Mark Weaver.
This commit is contained in:
parent
a3f993944d
commit
5e4a51278b
|
@ -32,7 +32,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
|
||||
* $Id: com.c,v 1.34 1994/08/21 15:04:37 mycroft Exp $
|
||||
* $Id: com.c,v 1.35 1994/08/24 07:25:18 mycroft Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -297,10 +297,6 @@ comopen(dev, flag, mode, p)
|
|||
|
||||
iobase = sc->sc_iobase;
|
||||
/* flush any pending I/O */
|
||||
if (sc->sc_hwflags & COM_HW_FIFO)
|
||||
outb(iobase + com_fifo,
|
||||
FIFO_ENABLE | FIFO_RCV_RST | FIFO_XMT_RST |
|
||||
FIFO_TRIGGER_8);
|
||||
(void) inb(iobase + com_lsr);
|
||||
(void) inb(iobase + com_data);
|
||||
/* you turn me on, baby */
|
||||
|
@ -559,6 +555,12 @@ comparam(tp, t)
|
|||
|
||||
s = spltty();
|
||||
|
||||
/* Set the FIFO threshold based on the receive speed. */
|
||||
if (sc->sc_hwflags & COM_HW_FIFO)
|
||||
outb(iobase + com_fifo,
|
||||
FIFO_ENABLE | FIFO_RCV_RST | FIFO_XMT_RST |
|
||||
(t->c_ispeed <= 1200 ? FIFO_TRIGGER_1 : FIFO_TRIGGER_8));
|
||||
|
||||
if (ospeed == 0)
|
||||
outb(iobase + com_mcr, sc->sc_mcr &= ~MCR_DTR);
|
||||
else
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
|
||||
* $Id: com.c,v 1.34 1994/08/21 15:04:37 mycroft Exp $
|
||||
* $Id: com.c,v 1.35 1994/08/24 07:25:18 mycroft Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -297,10 +297,6 @@ comopen(dev, flag, mode, p)
|
|||
|
||||
iobase = sc->sc_iobase;
|
||||
/* flush any pending I/O */
|
||||
if (sc->sc_hwflags & COM_HW_FIFO)
|
||||
outb(iobase + com_fifo,
|
||||
FIFO_ENABLE | FIFO_RCV_RST | FIFO_XMT_RST |
|
||||
FIFO_TRIGGER_8);
|
||||
(void) inb(iobase + com_lsr);
|
||||
(void) inb(iobase + com_data);
|
||||
/* you turn me on, baby */
|
||||
|
@ -559,6 +555,12 @@ comparam(tp, t)
|
|||
|
||||
s = spltty();
|
||||
|
||||
/* Set the FIFO threshold based on the receive speed. */
|
||||
if (sc->sc_hwflags & COM_HW_FIFO)
|
||||
outb(iobase + com_fifo,
|
||||
FIFO_ENABLE | FIFO_RCV_RST | FIFO_XMT_RST |
|
||||
(t->c_ispeed <= 1200 ? FIFO_TRIGGER_1 : FIFO_TRIGGER_8));
|
||||
|
||||
if (ospeed == 0)
|
||||
outb(iobase + com_mcr, sc->sc_mcr &= ~MCR_DTR);
|
||||
else
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
|
||||
* $Id: com.c,v 1.34 1994/08/21 15:04:37 mycroft Exp $
|
||||
* $Id: com.c,v 1.35 1994/08/24 07:25:18 mycroft Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -297,10 +297,6 @@ comopen(dev, flag, mode, p)
|
|||
|
||||
iobase = sc->sc_iobase;
|
||||
/* flush any pending I/O */
|
||||
if (sc->sc_hwflags & COM_HW_FIFO)
|
||||
outb(iobase + com_fifo,
|
||||
FIFO_ENABLE | FIFO_RCV_RST | FIFO_XMT_RST |
|
||||
FIFO_TRIGGER_8);
|
||||
(void) inb(iobase + com_lsr);
|
||||
(void) inb(iobase + com_data);
|
||||
/* you turn me on, baby */
|
||||
|
@ -559,6 +555,12 @@ comparam(tp, t)
|
|||
|
||||
s = spltty();
|
||||
|
||||
/* Set the FIFO threshold based on the receive speed. */
|
||||
if (sc->sc_hwflags & COM_HW_FIFO)
|
||||
outb(iobase + com_fifo,
|
||||
FIFO_ENABLE | FIFO_RCV_RST | FIFO_XMT_RST |
|
||||
(t->c_ispeed <= 1200 ? FIFO_TRIGGER_1 : FIFO_TRIGGER_8));
|
||||
|
||||
if (ospeed == 0)
|
||||
outb(iobase + com_mcr, sc->sc_mcr &= ~MCR_DTR);
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue