From efb43341a2f65f01a60f8400b71aefd187443075 Mon Sep 17 00:00:00 2001 From: bde Date: Wed, 17 Sep 2003 16:44:02 +0000 Subject: 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. --- sys/dev/sio/sio.c | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'sys/dev/sio/sio.c') 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 -- cgit v1.1