Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 3598  / 1 Year ago, tue, february 7, 2023, 12:05:44

Ubuntu 12.04.2 LTS 3.2.0-39-generic-pae



Hi there, the PC I'm working on has 4 serial ports.



ttyS0 and ttyS1 function properly straight from startup,



ttyS2 and ttyS3 do not.



here is the relevant dmesg messages:



Serial: 8250/16550 driver, 32 ports, IRQ sharing enabled
[ 1.050346] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[ 1.100595] serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
[ 1.144567] serial8250: ttyS2 at I/O 0x3e8 (irq = 4) is a 16550A
[ 1.188577] serial8250: ttyS3 at I/O 0x2e8 (irq = 3) is a 16550A
[ 1.383941] isapnp: No Plug & Play device found
[ 1.449179] 00:06: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[ 1.477192] 00:07: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
[ 1.498296] 00:08: ttyS2 at I/O 0x3e8 (irq = 7) is a 16550A
[ 1.524994] 00:09: ttyS3 at I/O 0x2e8 (irq = 7) is a 16550A


to get them to function I have to re-configure them by invoking:



setserial /dev/ttyS3 baud_base 115200 auto_irq skip_test autoconfig


which I found here



Before re-configuring the serial port, setserial reports the following for the serial ports:



/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4
/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3
/dev/ttyS2, UART: 16550A, Port: 0x03e8, IRQ: 7
/dev/ttyS3, UART: 16550A, Port: 0x02e8, IRQ: 7


After re-configuring the fllowing is reported:



/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4
/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3
/dev/ttyS2, UART: 16550A, Port: 0x03e8, IRQ: 0
/dev/ttyS3, UART: 16550A, Port: 0x02e8, IRQ: 0


The serial ports are provided by a fintek f81866 chip which supports IRQ shareing so having the initial IRQs set to 7 should not be a problem. while having the IRQs set to 0 is a problem from what I understand as according to the setserial man page IRQ 0 is reserved for Timer channel 0.



The fintek f81866 chip supports up to 6 serial ports.



So I tried adding 8250.nr_uarts=8 to the bootline but, this did nothing (as far as I know, I don't know of a way to confirm what boot parameters have been passed).



Whats is going wrong?
Why isn't ttyS2 and ttyS3 being configured correctly at startup?



How can I fix this?
What would I need to do so that they are configured correctly at startup (short of making my own init script)?



Thanks in advance!


More From » 12.04

 Answers
5

If you want to boot with this configuration applied on the serial port you can modify the



/var/lib/setserial/autoserial.conf



to modify the configuration of the ttyS3, including the sentence you used to reconfigure it correctly.



The autoserial.conf file is used on the boot process by /etc/rc0.d/K19setserial script.



Here's my own file



/dev/ttyS0 uart 16550A port 0x03f8 irq 4 baud_base 115200 spd_normal skip_test
/dev/ttyS1 uart 16550A port 0x02f8 irq 3 baud_base 115200 spd_normal skip_test
/dev/ttyS2 uart 16550A port 0x03e8 irq 4 baud_base 115200 spd_normal skip_test
#/dev/ttyS3 uart 16550A port 0x02e8 irq 3 baud_base 115200 spd_normal
/dev/ttyS3 baud_base 115200 auto_irq skip_test autoconfig spd_normal

[#31825] Tuesday, February 7, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
teromato

Total Points: 139
Total Questions: 102
Total Answers: 100

Location: Liechtenstein
Member since Mon, May 15, 2023
1 Year ago
;