LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Multiport PCIx Serial Card (https://www.linuxquestions.org/questions/linux-hardware-18/multiport-pcix-serial-card-761413/)

poctob 10-12-2009 11:54 AM

Multiport PCIx Serial Card
 
Has anyone had any experience getting Sealevel 7161e 16 Port RS-232 card to work under Linux? Here is what I've done so far:

I have followed installation instructions found at the following link:
http://www.sealevel.com/uploads/soft...m_1.2.8.tar.gz

Here is system info, this is a vanilla Fedora 11 install:
Code:

Linux localhost.localdomain 2.6.29.4-167.fc11.i686.PAE #1 SMP Wed May 27 17:28:22 EDT 2009 i686 i686 i386 GNU/Linux
It looks like the default kernel has extended serial port support built in, here is the configuration file:
Code:

#
# Serial drivers
#
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_FIX_EARLYCON_MEM=y
CONFIG_SERIAL_8250_PCI=y
CONFIG_SERIAL_8250_PNP=y
CONFIG_SERIAL_8250_CS=m
CONFIG_SERIAL_8250_NR_UARTS=32
CONFIG_SERIAL_8250_RUNTIME_UARTS=4
CONFIG_SERIAL_8250_EXTENDED=y
CONFIG_SERIAL_8250_MANY_PORTS=y
# CONFIG_SERIAL_8250_FOURPORT is not set
# CONFIG_SERIAL_8250_ACCENT is not set
# CONFIG_SERIAL_8250_BOCA is not set
# CONFIG_SERIAL_8250_EXAR_ST16C554 is not set
# CONFIG_SERIAL_8250_HUB6 is not set
CONFIG_SERIAL_8250_SHARE_IRQ=y
CONFIG_SERIAL_8250_DETECT_IRQ=y
CONFIG_SERIAL_8250_RSA=y

I have added the following line to the kernel boot parameters to enable 16 serial ports at the start up time:
Code:

8250.nr_uarts=16
Here is a list of the ports as shown by setserial query.

Code:

[root@localhost BC3]# setserial -g /dev/ttyS*
/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4
/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3
/dev/ttyS10, UART: unknown, Port: 0x0000, IRQ: 0
/dev/ttyS11, UART: unknown, Port: 0x0000, IRQ: 0
/dev/ttyS12, UART: unknown, Port: 0x0000, IRQ: 0
/dev/ttyS13, UART: unknown, Port: 0x0000, IRQ: 0
/dev/ttyS14, UART: unknown, Port: 0x0000, IRQ: 0
/dev/ttyS15, UART: unknown, Port: 0x0000, IRQ: 0
/dev/ttyS2, UART: unknown, Port: 0x03e8, IRQ: 4
/dev/ttyS3, UART: unknown, Port: 0x02e8, IRQ: 3
/dev/ttyS4, UART: unknown, Port: 0x0000, IRQ: 0
/dev/ttyS5, UART: unknown, Port: 0x0000, IRQ: 0
/dev/ttyS6, UART: unknown, Port: 0x0000, IRQ: 0
/dev/ttyS7, UART: unknown, Port: 0x0000, IRQ: 0
/dev/ttyS8, UART: unknown, Port: 0x0000, IRQ: 0
/dev/ttyS9, UART: unknown, Port: 0x0000, IRQ: 0


Below is the output of lspci with card info:
Code:

[root@localhost BC3]# lspci -d 135E:E161 -vv
08:04.0 Bridge: Sealevel Systems Inc Device e161 (rev aa)
Subsystem: Sealevel Systems Inc Device e161
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr+ Stepping- SERR+ FastB2B- DisINTx-
Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 32, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 15
Region 0: Memory at dfcffe00 (32-bit, non-prefetchable) [size=512]
Region 2: I/O ports at dc80 [size=128]
Region 3: Memory at dfcffdf0 (32-bit, non-prefetchable) [size=16]
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-
Capabilities: [48] #00 [0000]
Capabilities: [4c] Vital Product Data
Unknown small resource type 0b
Unknown small resource type 00
Unknown small resource type 00
Unknown small resource type 00
Unknown small resource type 00
Unknown small resource type 00
Unknown small resource type 00
Unknown small resource type 00
No end tag found

If I am reading this correctly, the following is the information I need: IRQ 15, I/O ports memory address starts at 0xdc80.

So I attempted to use setserial to manually configure the port as suggested by the manufacturer:
Code:

[root@localhost BC3]# setserial /dev/ttyS4 port 0xdc80 irq 15 autoconfigure baud_base 460800
Cannot set serial info: Invalid argument

Apparently setserial can't or doesn't want to auto set uart type. If I attempt to set uart manually:
Code:

[root@localhost BC3]# setserial /dev/ttyS4 port 0xdc80 irq 15 uart 16850 baud_base 460800
My machine completely locks up. I understand that the lockup is usually due to the wrong port address being supplied. Is that the case here?

Thanks in advance

AwesomeMachine 10-12-2009 10:17 PM

It sounds like the serial board piggy backs 7 ports to each uart main port. That means you just set ttyS0 and ttyS1, and the other ports are all set. You may also need/be able to set ttyS2 and ttyS3.

poctob 10-13-2009 05:25 AM

Quote:

Originally Posted by AwesomeMachine (Post 3717184)
It sounds like the serial board piggy backs 7 ports to each uart main port. That means you just set ttyS0 and ttyS1, and the other ports are all set. You may also need/be able to set ttyS2 and ttyS3.

Thank you for the reply.

Actually this box already has a serial port on the motherboard and that is what ttyS0 corresponds to. Usually ttyS0 through ttyS3 are automatically set on any Linux box regardless whether there are 4 serial ports or not. In any case, if I just set only one or two ports as you are suggesting how will I be able to use remaining ones? If I pull up gtkterm right now all I get is ttyS0 through ttyS3, i.e. only those devices that have port address assigned. That is why I think that I need to configure all 16 in order to use them.

poctob 10-13-2009 03:29 PM

Upgraded kernel to 2.6.30, that solved the lockup issue.
Command to configure serial port for the sealevel card is as follows:
Code:

setserial /dev/ttyS4 port 0xdc80 auto_irq uart 16850 baud_base 460800
repeat for remaining ports by adding 8 to the port address, last address will be 0xdcf8.

setserial autoassigns interrupt 0 to all ports and it works!
I've added the setserial commands to the /etc/rc.local script, otherwise all ports will be gone upon the reboot.


All times are GMT -5. The time now is 10:58 AM.