Alfred von Campe
2007-Mar-09  16:00 UTC
[CentOS] How do I configure additional serial ports?
I have installed two 4-port serial cards (http://www.startech.com/ 
Product/ItemDetail.aspx?productid=PCI4S550&c=US) on a CentOS 4.4  
system.  The hardware appears to be recognized correctly, as kudzu  
added 2 entries to /etc/sysconfig/hwconf and lscpi shows both cards  
(output of lspci -vv for both cards included at the end of this email):
# lspci
00:00.0 Host bridge: Intel Corporation 945G/GZ/P/PL Express Memory  
Controller Hub (rev 02)
00:01.0 PCI bridge: Intel Corporation 945G/GZ/P/PL Express PCI  
Express Root Port (rev 02)
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High  
Definition Audio Controller (rev 01)
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI  
Express Port 1 (rev 01)
00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI  
Express Port 2 (rev 01)
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB  
UHCI #1 (rev 01)
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB  
UHCI #2 (rev 01)
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB  
UHCI #3 (rev 01)
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB  
UHCI #4 (rev 01)
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2  
EHCI Controller (rev 01)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev e1)
00:1f.0 ISA bridge: Intel Corporation 82801GB/GR (ICH7 Family) LPC  
Interface Bridge (rev 01)
00:1f.2 IDE interface: Intel Corporation 82801GB/GR/GH (ICH7 Family)  
Serial ATA Storage Controller IDE (rev 01)
00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus  
Controller (rev 01)
01:00.0 VGA compatible controller: nVidia Corporation NV44 [GeForce  
6200 TurboCache(TM)] (rev a1)
02:00.0 Ethernet controller: Intel Corporation 82573E Gigabit  
Ethernet Controller (Copper) (rev 03)
0a:0a.0 Serial controller: Oxford Semiconductor Ltd OX16PCI954 (Quad  
16950 UART) function 0 (Uart)
0a:0a.1 Bridge: Oxford Semiconductor Ltd OX16PCI954 (Quad 16950 UART)  
function 1 (8bit bus)
0a:0c.0 Serial controller: Oxford Semiconductor Ltd OX16PCI954 (Quad  
16950 UART) function 0 (Uart)
0a:0c.1 Bridge: Oxford Semiconductor Ltd OX16PCI954 (Quad 16950 UART)  
function 1 (8bit bus)
However, only the 4 serial ports on one of the two cards are  
configured correctly:
# dmesg | fgrep ttyS
ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
ttyS4 at I/O 0x5020 (irq = 177) is a 16C950/954
ttyS5 at I/O 0x5028 (irq = 177) is a 16C950/954
ttyS6 at I/O 0x5030 (irq = 177) is a 16C950/954
ttyS7 at I/O 0x5038 (irq = 177) is a 16C950/954
ttyS1 at I/O 0x5060 (irq = 193) is a 16450
ttyS2 at I/O 0x5068 (irq = 193) is a 16450
ttyS3 at I/O 0x5070 (irq = 193) is a 16450
I have no idea what ttyS1-3 are, but I've tested ttyS4-7 and they  
work fine.  If I only install one card (in either PCI slot 1 or 2) I  
get the same 4 ports.  If I install both cards, ttyS4-7 work on the  
card that is in PCI slot 2.
Any ideas how to get the 4 ports on the other card working?
Alfred
0a:0a.0 Serial controller: Oxford Semiconductor Ltd OX16PCI954 (Quad  
16950 UART) function 0 (Uart) (prog-if 06 [16950])
         Subsystem: Oxford Semiconductor Ltd: Unknown device 0000
         Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop-  
ParErr- Stepping- SERR+ FastB2B-
         Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium  
 >TAbort- <TAbort- <MAbort- >SERR- <PERR-
         Interrupt: pin A routed to IRQ 177
         Region 0: I/O ports at 5020 [size=32]
         Region 1: Memory at d2101000 (32-bit, non-prefetchable)  
[size=4K]
         Region 2: I/O ports at 5000 [size=32]
         Region 3: Memory at d2100000 (32-bit, non-prefetchable)  
[size=4K]
         Capabilities: [40] Power Management version 1
                 Flags: PMEClk- DSI- D1- D2+ AuxCurrent=0mA PME(D0 
+,D1-,D2+,D3hot+,D3cold-)
                 Status: D0 PME-Enable- DSel=0 DScale=0 PME-
0a:0a.1 Bridge: Oxford Semiconductor Ltd OX16PCI954 (Quad 16950 UART)  
function 1 (8bit bus)
         Subsystem: Oxford Semiconductor Ltd: Unknown device 0000
         Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop-  
ParErr- Stepping- SERR+ FastB2B-
         Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium  
 >TAbort- <TAbort- <MAbort- >SERR- <PERR-
         Interrupt: pin B routed to IRQ 193
         Region 0: I/O ports at 5060 [size=32]
         Region 1: Memory at d2103000 (32-bit, non-prefetchable)  
[size=4K]
         Region 2: I/O ports at 5040 [size=32]
         Region 3: Memory at d2102000 (32-bit, non-prefetchable)  
[size=4K]
         Capabilities: [40] Power Management version 1
                 Flags: PMEClk- DSI- D1- D2+ AuxCurrent=0mA PME(D0 
+,D1-,D2+,D3hot+,D3cold-)
                 Status: D0 PME-Enable- DSel=0 DScale=0 PME-
0a:0c.0 Serial controller: Oxford Semiconductor Ltd OX16PCI954 (Quad  
16950 UART) function 0 (Uart) (prog-if 06 [16950])
         Subsystem: Oxford Semiconductor Ltd: Unknown device 0000
         Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop-  
ParErr- Stepping- SERR+ FastB2B-
         Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium  
 >TAbort- <TAbort- <MAbort- >SERR- <PERR-
         Interrupt: pin A routed to IRQ 217
         Region 0: I/O ports at 50a0 [size=32]
         Region 1: Memory at d2105000 (32-bit, non-prefetchable)  
[size=4K]
         Region 2: I/O ports at 5080 [size=32]
         Region 3: Memory at d2104000 (32-bit, non-prefetchable)  
[size=4K]
         Capabilities: [40] Power Management version 1
                 Flags: PMEClk- DSI- D1- D2+ AuxCurrent=0mA PME(D0 
+,D1-,D2+,D3hot+,D3cold-)
                 Status: D0 PME-Enable- DSel=0 DScale=0 PME-
0a:0c.1 Bridge: Oxford Semiconductor Ltd OX16PCI954 (Quad 16950 UART)  
function 1 (8bit bus)
         Subsystem: Oxford Semiconductor Ltd: Unknown device 0000
         Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop-  
ParErr- Stepping- SERR+ FastB2B-
         Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium  
 >TAbort- <TAbort- <MAbort- >SERR- <PERR-
         Interrupt: pin B routed to IRQ 225
         Region 0: I/O ports at 50e0 [size=32]
         Region 1: Memory at d2107000 (32-bit, non-prefetchable)  
[size=4K]
         Region 2: I/O ports at 50c0 [size=32]
         Region 3: Memory at d2106000 (32-bit, non-prefetchable)  
[size=4K]
         Capabilities: [40] Power Management version 1
                 Flags: PMEClk- DSI- D1- D2+ AuxCurrent=0mA PME(D0 
+,D1-,D2+,D3hot+,D3cold-)
                 Status: D0 PME-Enable- DSel=0 DScale=0 PME-
Alfred von Campe wrote:> I have installed two 4-port serial cards (http://www.startech.com/ > Product/ItemDetail.aspx?productid=PCI4S550&c=US) on a CentOS 4.4 > system. The hardware appears to be recognized correctly, as kudzu > added 2 entries to /etc/sysconfig/hwconf and lscpi shows both cards > (output of lspci -vv for both cards included at the end of this email): > > # lspci > 00:00.0 Host bridge: Intel Corporation 945G/GZ/P/PL Express Memory > Controller Hub (rev 02) > 00:01.0 PCI bridge: Intel Corporation 945G/GZ/P/PL Express PCI Express > Root Port (rev 02) > 00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High > Definition Audio Controller (rev 01) > 00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express > Port 1 (rev 01) > 00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express > Port 2 (rev 01) > 00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI > #1 (rev 01) > 00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI > #2 (rev 01) > 00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI > #3 (rev 01) > 00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI > #4 (rev 01) > 00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 > EHCI Controller (rev 01) > 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev e1) > 00:1f.0 ISA bridge: Intel Corporation 82801GB/GR (ICH7 Family) LPC > Interface Bridge (rev 01) > 00:1f.2 IDE interface: Intel Corporation 82801GB/GR/GH (ICH7 Family) > Serial ATA Storage Controller IDE (rev 01) > 00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller > (rev 01) > 01:00.0 VGA compatible controller: nVidia Corporation NV44 [GeForce > 6200 TurboCache(TM)] (rev a1) > 02:00.0 Ethernet controller: Intel Corporation 82573E Gigabit Ethernet > Controller (Copper) (rev 03) > 0a:0a.0 Serial controller: Oxford Semiconductor Ltd OX16PCI954 (Quad > 16950 UART) function 0 (Uart) > 0a:0a.1 Bridge: Oxford Semiconductor Ltd OX16PCI954 (Quad 16950 UART) > function 1 (8bit bus) > 0a:0c.0 Serial controller: Oxford Semiconductor Ltd OX16PCI954 (Quad > 16950 UART) function 0 (Uart) > 0a:0c.1 Bridge: Oxford Semiconductor Ltd OX16PCI954 (Quad 16950 UART) > function 1 (8bit bus) > > However, only the 4 serial ports on one of the two cards are configured > correctly: > > # dmesg | fgrep ttyS > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS4 at I/O 0x5020 (irq = 177) is a 16C950/954 > ttyS5 at I/O 0x5028 (irq = 177) is a 16C950/954 > ttyS6 at I/O 0x5030 (irq = 177) is a 16C950/954 > ttyS7 at I/O 0x5038 (irq = 177) is a 16C950/954 > ttyS1 at I/O 0x5060 (irq = 193) is a 16450 > ttyS2 at I/O 0x5068 (irq = 193) is a 16450 > ttyS3 at I/O 0x5070 (irq = 193) is a 16450 > > I have no idea what ttyS1-3 are, but I've tested ttyS4-7 and they work > fine. If I only install one card (in either PCI slot 1 or 2) I get the > same 4 ports. If I install both cards, ttyS4-7 work on the card that > is in PCI slot 2.Never used these cards, but the standard CentOS4 kernel has the following config settings: CONFIG_SERIAL_8250_NR_UARTS=4 # CONFIG_SERIAL_8250_MANY_PORTS is not set This might be your problem ... James Pearson
On Fri, 9 Mar 2007, Alfred von Campe wrote:> I have installed two 4-port serial cards > (http://www.startech.com/Product/ItemDetail.aspx?productid=PCI4S550&c=US) on > a CentOS 4.4 system. The hardware appears to be recognized correctly, as > kudzu added 2 entries to /etc/sysconfig/hwconf and lscpi shows both cards > (output of lspci -vv for both cards included at the end of this email): > > [....] > 0a:0a.0 Serial controller: Oxford Semiconductor Ltd OX16PCI954 (Quad 16950 > UART) function 0 (Uart) > 0a:0a.1 Bridge: Oxford Semiconductor Ltd OX16PCI954 (Quad 16950 UART) > function 1 (8bit bus) > 0a:0c.0 Serial controller: Oxford Semiconductor Ltd OX16PCI954 (Quad 16950 > UART) function 0 (Uart) > 0a:0c.1 Bridge: Oxford Semiconductor Ltd OX16PCI954 (Quad 16950 UART) > function 1 (8bit bus) > > However, only the 4 serial ports on one of the two cards are configured > correctly: > > # dmesg | fgrep ttyS > ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A > ttyS4 at I/O 0x5020 (irq = 177) is a 16C950/954 > ttyS5 at I/O 0x5028 (irq = 177) is a 16C950/954 > ttyS6 at I/O 0x5030 (irq = 177) is a 16C950/954 > ttyS7 at I/O 0x5038 (irq = 177) is a 16C950/954 > ttyS1 at I/O 0x5060 (irq = 193) is a 16450 > ttyS2 at I/O 0x5068 (irq = 193) is a 16450 > ttyS3 at I/O 0x5070 (irq = 193) is a 16450 > > I have no idea what ttyS1-3 are, but I've tested ttyS4-7 and they > work fine. If I only install one card (in either PCI slot 1 or 2) I > get the same 4 ports. If I install both cards, ttyS4-7 work on the > card that is in PCI slot 2. > > Any ideas how to get the 4 ports on the other card working?I've got only one of these cards installed, and although it's less than a year old, it uses a completely different chipset than yours. Here's my dmesg: $ dmesg | grep ttyS ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A ttyS4 at I/O 0xdf08 (irq = 209) is a 16550A ttyS5 at I/O 0xdf10 (irq = 209) is a 16550A ttyS6 at I/O 0xdf18 (irq = 209) is a 16550A ttyS7 at I/O 0xdf20 (irq = 209) is a 16550A ttyS1 at I/O 0xdf28 (irq = 209) is a 16450 I *think* the 16450 UART is there to generate interrupts and allow 16550-unaware software to work with the 16550s (or, in your case, the 16C950s) -- but corrections to my hypothesis are welcome! Still, what leaps out at me in your verbose lspci listings (below) is that the card with PCI ID 0a:0a:[01] (IRQs 177/193) is showing up while card 0a:0c.[01] (IRQs 217/225) isn't showing up at all. I don't understand why each card is getting two IRQs, but I'd expect to see something like ttySX at I/O 0xXXXX (irq = 217) is a 16C950/954 show up in your dmesg. Instead, all the ttySX listings from your dmesg have IRQs from only one of the cards. Have you verified that each card works properly if installed by itself, without the other?> 0a:0a.0 Serial controller: Oxford Semiconductor Ltd OX16PCI954 (Quad 16950 > UART) function 0 (Uart) (prog-if 06 [16950]) > Subsystem: Oxford Semiconductor Ltd: Unknown device 0000 > Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- > Stepping- SERR+ FastB2B- > Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- > <TAbort- <MAbort- >SERR- <PERR- > Interrupt: pin A routed to IRQ 177 > Region 0: I/O ports at 5020 [size=32] > Region 1: Memory at d2101000 (32-bit, non-prefetchable) [size=4K] > Region 2: I/O ports at 5000 [size=32] > Region 3: Memory at d2100000 (32-bit, non-prefetchable) [size=4K] > Capabilities: [40] Power Management version 1 > Flags: PMEClk- DSI- D1- D2+ AuxCurrent=0mA > PME(D0+,D1-,D2+,D3hot+,D3cold-) > Status: D0 PME-Enable- DSel=0 DScale=0 PME- > > 0a:0a.1 Bridge: Oxford Semiconductor Ltd OX16PCI954 (Quad 16950 UART) > function 1 (8bit bus) > Subsystem: Oxford Semiconductor Ltd: Unknown device 0000 > Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- > Stepping- SERR+ FastB2B- > Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- > <TAbort- <MAbort- >SERR- <PERR- > Interrupt: pin B routed to IRQ 193 > Region 0: I/O ports at 5060 [size=32] > Region 1: Memory at d2103000 (32-bit, non-prefetchable) [size=4K] > Region 2: I/O ports at 5040 [size=32] > Region 3: Memory at d2102000 (32-bit, non-prefetchable) [size=4K] > Capabilities: [40] Power Management version 1 > Flags: PMEClk- DSI- D1- D2+ AuxCurrent=0mA > PME(D0+,D1-,D2+,D3hot+,D3cold-) > Status: D0 PME-Enable- DSel=0 DScale=0 PME- > > 0a:0c.0 Serial controller: Oxford Semiconductor Ltd OX16PCI954 (Quad 16950 > UART) function 0 (Uart) (prog-if 06 [16950]) > Subsystem: Oxford Semiconductor Ltd: Unknown device 0000 > Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- > Stepping- SERR+ FastB2B- > Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- > <TAbort- <MAbort- >SERR- <PERR- > Interrupt: pin A routed to IRQ 217 > Region 0: I/O ports at 50a0 [size=32] > Region 1: Memory at d2105000 (32-bit, non-prefetchable) [size=4K] > Region 2: I/O ports at 5080 [size=32] > Region 3: Memory at d2104000 (32-bit, non-prefetchable) [size=4K] > Capabilities: [40] Power Management version 1 > Flags: PMEClk- DSI- D1- D2+ AuxCurrent=0mA > PME(D0+,D1-,D2+,D3hot+,D3cold-) > Status: D0 PME-Enable- DSel=0 DScale=0 PME- > > 0a:0c.1 Bridge: Oxford Semiconductor Ltd OX16PCI954 (Quad 16950 UART) > function 1 (8bit bus) > Subsystem: Oxford Semiconductor Ltd: Unknown device 0000 > Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- > Stepping- SERR+ FastB2B- > Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- > <TAbort- <MAbort- >SERR- <PERR- > Interrupt: pin B routed to IRQ 225 > Region 0: I/O ports at 50e0 [size=32] > Region 1: Memory at d2107000 (32-bit, non-prefetchable) [size=4K] > Region 2: I/O ports at 50c0 [size=32] > Region 3: Memory at d2106000 (32-bit, non-prefetchable) [size=4K] > Capabilities: [40] Power Management version 1 > Flags: PMEClk- DSI- D1- D2+ AuxCurrent=0mA > PME(D0+,D1-,D2+,D3hot+,D3cold-) > Status: D0 PME-Enable- DSel=0 DScale=0 PME--- Paul Heinlein <> heinlein at madboa.com <> www.madboa.com