I have a funky PCI card with multiple serial ports on it that loaded fine with the standard serial driver from my standard kernel, until… the revision changed and now instead of using the tried and true 16550 UART, it’s got some sort of super specialized proprietary version of that chip. The manufacturer says it’s 100% backwards compatible with the 16550 / 16550A chips, and theirs just adds some more functionality for industrial processes or something… blah.
Here’s how to get it to work just fine without loading their fancy pants driver. I added these three “if” statements to /etc/rc.local
if [ `setserial /dev/ttyS2 | grep Unknown` ]; then
setserial /dev/ttyS2 uart 16550A port 0xB600 irq 16
fi
if [ `setserial /dev/ttyS3 | grep Unknown` ]; then
setserial /dev/ttyS3 uart 16550A port 0xB700 irq 17
fi
if [ `setserial /dev/ttyS4 | grep Unknown` ]; then
setserial /dev/ttyS4 uart 16550A port 0xB800 irq 18
fi
I did it this way because I want to keep using the old revision of these PCI cards until they croak. At that point, I want the system to just keep on trucking once I replace the board with the new revision.
If you just want to fix it and forget it, there’s another way, which is add to udev rules. That’s old garbage and doesn’t allow me the flexibility I need. But here’s how just incase. Make a file called “99-ninja-rules” in your udev/rules.d directory. And add a statement like the following for each serial port:
KERNEL=="ttyS2" RUN+="setserial /dev/ttyS2 uart 16550A port 0xB600 irq 16"