If the first message is for a legacy port, the IRQs shown may be wrong since it didn't probe for IRQs. If there is a second report of serial ports, it may the result of a script such as /etc/init.d/setserial. It usually does no probing and thus could be wrong about how the hardware is actually set. It only shows configuration data that got saved in a configuration files. The old method, prior to setserial 2.15, was to manually write such data directly into the script.
When the kernel loads the serial module (or if the "module equivalent" is built into the kernel) then all supported PnP ports are detected. For legacy (non-PnP) ports, only ttyS{0-3} are auto-detected and the driver is set to use only IRQs 4 and 3 (regardless of what IRQs are actually set in the hardware). No probing is done for IRQs but it's possible to do this manually. You see this as a boot-time message just as if setserial had been run.
To correct possible errors in IRQs (or for other reasons) there may be a script file somewhere that runs setserial. Unfortunately, if this file has some IRQs wrong, the kernel will still have incorrect info about the IRQs. This file is usually part of the initialization done at boot-time. Whether it runs or not depends on how you (and/or your distribution) have set things up. It may also depends on the runlevel.
Before modifying a configuration file, you can test out a "proposed" setserial command by just typing it on the command line. In some cases the results of this use of setserial will automatically get saved somewhere such as /etc/serial.conf (or autoserial.conf or serial) when you shutdown. So if it worked OK (and solved your problem) then there's no need to modify any configuration file. See Configuration method using /etc/serial.conf, etc..
Edit a script (required prior to version 2.15)
This is how it was done prior to setserial 2.15 (1999) The objective was to modify (or create) a script file in the /etc tree that runs setserial at boot-time. Most distributions provided such a file (but it may not have initially resided in the /etc tree).
So prior to version 2.15 (1999) it was simpler. All you did was edit a script. There was no /etc/serial.conf file (or the like) to configure setserial. Thus you needed to find the file that runs "setserial" at boot time and edit it. If it didn't exist, you needed to create one (or place the commands in a file that ran early at boot-time). If such a file was currently being used it's likely was somewhere in the /etc directory-tree. But Redhat <6.0 has supplied it in /usr/doc/setserial/ but you need to move it to the /etc tree before using it.
The script /etc/rc.d/rc.serial was commonly used in the past. The Debian distribution used /etc/rc.boot/0setserial. Another file once used was /etc/rc.d/rc.local but it's may not have run early enough. It's was reported that other processes may try to open the serial port before rc.local ran resulting in serial communication failure. Later on it's most likely was found in /etc/init.d/ but wasn't normally intended to be edited.
If such a file was supplied, it likely contained a number of commented-out examples. By uncommenting some of these and/or modifying them, you could set things up correctly. It was important use a valid path for setserial, and a valid device name. You could do a test by executing this file manually (just type its name as the super-user) to see if it works right. Testing like this was a lot faster than doing repeated reboots to get it right.
For versions >= 2.15 (provided your distribution implemented the change, Redhat didn't as first) it may be more tricky to do since the file that runs setserial on startup, /etc/init.d/setserial or the like was not intended to be edited by the user. See Configuration method using /etc/serial.conf, etc..
An example line in such a script was"
[/blockquote]
/sbin/setserial /dev/ttyS3 irq 5 uart 16550A skip_test
or, if you wanted setserial to automatically determine the uart and the IRQ for ttyS3 you would have used

