> Date: Wed, 17 Aug 2016 15:38:39 +0200
> From: Marcus Glocker <mar...@nazgul.ch>
> 
> If a FIFO device already got a FIFO depth assigned, don't run a FIFO
> probe against it.
> 
> ok?

Sorry, but no.  As far as I understand, the FIFO probe was added to
detect buggy 16550 versions that implement a FIFO that is one byte
short.  In this case, sc_fifolen is set to 16, bet then overriden by
the probed depth:

com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com0: probed fifo depth: 15 bytes

Your diff would break that.

> Index: dev/ic/com.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/ic/com.c,v
> retrieving revision 1.159
> diff -u -p -r1.159 com.c
> --- dev/ic/com.c      16 Aug 2016 08:15:04 -0000      1.159
> +++ dev/ic/com.c      17 Aug 2016 13:31:47 -0000
> @@ -1855,7 +1855,7 @@ com_fifo_probe(struct com_softc *sc)
>       u_int8_t fifo, ier;
>       int timo, len;
>  
> -     if (!ISSET(sc->sc_hwflags, COM_HW_FIFO))
> +     if (!ISSET(sc->sc_hwflags, COM_HW_FIFO) || sc->sc_fifolen)
>               return;
>  
>       ier = 0;
> 
> 

Reply via email to