* The fact that IIR_NOPEND was not set on entry does *not* mean that no
transmission was in progress. Besides, we don't want to throw away receive
interrupts either.
* In the !clearirq case, we didn't splx().
1. don't clear the irq unless it was clear before transmitting
2. also do various bus_space_barrier() ops
Stops console from freezing when kprintf interrupts tty driver output.
- In the console getc routine, block until a character becomes ready
(no, really, we mean it). This routine should _never_ time out.
- In the console putc routine, if the UART has trouble, do NOT proceed
to print a diagnostic message, which would recursively invoke the
console putc routine ad nauseum.
This is useful in the case where an attachment's probe routine
verifies that there is indeed hardware present but something goes
"wrong" in the attach causing the device to be unusable. (Without
keeping track of this, in that case incorrect ports could be
accessed or uninitted pointers could be deferenced on open or at
other times.)
* Make the ring buffer size and water marks patchable, and allocate the buffer
separately.
* Do the ttymalloc() at attach time.
* Reorganize the receive buffer so the status and data pair are next to each
other. This is slightly faster.
* Make sure we actually do turn off interrupts in comclose() if we have DDB
configured and it's not the console. (D'oh!!!!)
* When we exhaust the current transmit run, turn off transmit interrupts in
comintr(), so we're fairly sure we don't get another one.
* Nuke the silly lsrmap[] idea; it's slower in the normal case.
* Cache the l_rint pointer in the soft interrupt routine.
things happen if we are the console.
Restore to the prevoius value (not to hardwired 8N1) because this
could be set by the serial console initialization.
Closed PR kern/4373 (Dave Huang)
Dave Huang <khym@bga.com>, with added check for broken early versions
of the 16650, taken from the Linux driver.
This should be extended to use, for example, higher trigger levels for
the bigger 16650 FIFO, and its capability for using a smaller divisor
and thus higher speeds. But this patch is very useful for 16650 users
already.
options RND_COM
in your kernel config file (along with the
pseudo-device rnd
line) to enable this. If results are positive, I will make this enabled
by default.