Hardware manual
8.7 What is the IO Address & IRQ of my Serial Port
Hardware?
Introduction
If it's PCI or ISA PnP then what's set in the hardware has been done by PnP methods. Even if nothing has
been set or the port disabled, PnP ports may still be found by using "lspci -v" or "isapnp --dumpregs". Ports
disabled by jumpers (or hardware failures) are completely lost. See ISA PnP ports, PCI: What IOs and IRQs
have been set?, PCI: Enabling a disabled port
PnP ports don't store their configuration in the hardware when the power is turned off. This is in contrast to
Jumpers (non-PnP) which remain the same with the power off. That's why a PnP port is more likely to be
found in a disabled state than an old non-PnP one.
PCI: What IOs and IRQs have been set?
For PCI, the BIOS almost always sets the IRQ and may set the IO address as well. To see how it's set use
"lspci -vv" (best) or look in /proc/bus/pci (or for kernels <2.2 /proc/pci). The modem's serial port is often
called a "Communication controller". Look for this. If lspci shows "I/O ports at ... [disabled]" then the serial
port is disabled and the hardware has no IO address so it's lost and can't be used. See PCI: Enabling a disabled
port for how to enable it.
If more than one IO address is shown, the first one is more likely to be it. You can't change the IRQ (at least
not with "setpci") This is because if one writes an IRQ it it's hardware register no action is taken on it. It's the
BIOS that should actually set up the IRQs and then write the correct value to this register for lspci to view. If
you must, change the IO address with "setpci" by changing the BASE_ADDRESS_0 or the like.
PCI: Enabling a disabled port
If the port communicates via an IO address then "lspci -vv" should show "Control: I/O+ ..." with + meaning
that the IO address is enabled. If it shows "I/O-" (and "I/O ports at ... [disabled]") then you may need to use
the setpci command to enable it. For example "setpci -d 151f:000 command=101". 151f is the vendor id, and
000 is the device id both obtained from "lspci -n -v" or from /proc/bus/pci or from "scanpci -v". The
"command=101" means that 101 is put into the command register which is the same as the "Control" register
displayed by "lspci". The 101h sets two bits: the 1 sets I/O to + and the 100 part keeps SERR# set to +. In this
case only the SERR# bit of the Control register was initially observed to be + when the lspci command was
run. So we kept it enabled to + by setting bit 8 (where bit 0 is I/O) to 1 by the first 1 in 101. Some serial cards
don't use SERR# so if you see SERR#- then there's no need to enable it so then use: command=1. Then you'll
need to set up "setserial" to tell the driver the IO and IRQ.
Bit 8 is actually the 9th bit since we started counting bits from 0. Don't be alarmed that lspci shows a lot of -
signs showing that the card doesn't have many features available (or enabled). Serial ports are relatively slow
and don't need these features.
Another way to enable it is to let the BIOS do it by telling the BIOS that you don't have a plug-and-play
operating system. Then the BIOS should enable it when you start your PC. If you have MS Windows9x on the
same PC then doing this might cause problems with Windows (see Plug-and-Play-HOWTO).
Serial HOWTO
8.7 What is the IO Address & IRQ of my Serial Port Hardware? 32