How does the kernel code for supporting serial consoles solve these problems? Does it work on PCI cards, or just the standard serial ports? If it can work on PCI cards, it may be possible to borrow some of that code in order to resolve this once and for all.