diff options
author | bde <bde@FreeBSD.org> | 2003-09-17 16:44:02 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 2003-09-17 16:44:02 +0000 |
commit | efb43341a2f65f01a60f8400b71aefd187443075 (patch) | |
tree | 8344702aaa5674367ec27d5e5ca0496d6dd95a8e /sys/dev/sio/sio.c | |
parent | 399b18e3c782d0e45dedf281b31b05b35f94f03a (diff) | |
download | FreeBSD-src-efb43341a2f65f01a60f8400b71aefd187443075.zip FreeBSD-src-efb43341a2f65f01a60f8400b71aefd187443075.tar.gz |
Fixed bitrot in the probe in revs.1.127, 1.165 and 1.169. The
COM_NOFIFO() and COM_ESP cases are supposed to be a subsets of the
plain 16550A case, but 16650-related changes made the former fall into
the latter and then both fall into general code for printing the tx
fifo size. This mainly caused hard to parse boot messages like:
"sio0: type 16550A fifo disabled lookalike with 1 bytes FIFO".
COM_NOFIFO() on an ESP port gave a larger mess whose extent is not
clear.
Fixed some nearby style bugs.
Diffstat (limited to 'sys/dev/sio/sio.c')
-rw-r--r-- | sys/dev/sio/sio.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c index 4fa8ef7..3898990 100644 --- a/sys/dev/sio/sio.c +++ b/sys/dev/sio/sio.c @@ -1037,40 +1037,40 @@ sioattach(dev, xrid, rclk) case FIFO_RX_HIGH: if (COM_NOFIFO(flags)) { printf(" 16550A fifo disabled"); - } else { - com->hasfifo = TRUE; - if (COM_ST16650A(flags)) { - com->st16650a = 1; - com->tx_fifo_size = 32; - printf(" ST16650A"); - } else if (COM_TI16754(flags)) { - com->tx_fifo_size = 64; - printf(" TI16754"); - } else { - com->tx_fifo_size = COM_FIFOSIZE(flags); - printf(" 16550A"); - } + break; } + com->hasfifo = TRUE; + if (COM_ST16650A(flags)) { + printf(" ST16650A"); + com->st16650a = TRUE; + com->tx_fifo_size = 32; + break; + } + if (COM_TI16754(flags)) { + printf(" TI16754"); + com->tx_fifo_size = 64; + break; + } + printf(" 16550A"); #ifdef COM_ESP for (espp = likely_esp_ports; *espp != 0; espp++) if (espattach(com, *espp)) { com->tx_fifo_size = 1024; break; } + if (com->esp != NULL) + break; #endif - if (!com->st16650a && !COM_TI16754(flags)) { - if (!com->tx_fifo_size) - com->tx_fifo_size = 16; - else - printf(" lookalike with %d bytes FIFO", - com->tx_fifo_size); - } - + com->tx_fifo_size = COM_FIFOSIZE(flags); + if (com->tx_fifo_size == 0) + com->tx_fifo_size = 16; + else + printf(" lookalike with %u bytes FIFO", + com->tx_fifo_size); break; } - #ifdef COM_ESP - if (com->esp) { + if (com->esp != NULL) { /* * Set 16550 compatibility mode. * We don't use the ESP_MODE_SCALE bit to increase the |