Make sure a serial port exists by determining whether it is possible to drain
authorMatthew Dillon <dillon@dragonflybsd.org>
Sat, 3 Jul 2004 21:23:37 +0000 (21:23 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Sat, 3 Jul 2004 21:23:37 +0000 (21:23 +0000)
commit3252589cb9dc64fcf634bfc4800d22d2403a06f9
treed6aea58f11b329857650b6b70d2004d6667fe330
parentdfa77fe631d9f1a9f95504e271836ffb7a7d383e
Make sure a serial port exists by determining whether it is possible to drain
its RX queue, before we turn on its interrupt or do other things.  If we can't
then the serial port is disabled.

This fixes drain lockups on laptops and newer desktops that occur when a
non-existant serial port is opened and allows us to ship a CD with a getty
on ttyd0 without locking up the system.
sys/dev/serial/sio/sio.c