PDA

View Full Version : Serial port problem



0l0
22nd January 2008, 09:34 PM
Hi

I used google and searched forums but nothing.
So im posting this here.

Problem is that a some serial ports wont work.

I have RS232 barcode scanner for testing that.

Part of dmesg output:

Serial: 8250/16550 driver $Revision: 1.90 $ 6 ports, IRQ sharing enabled
serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
serial8250: ttyS2 at I/O 0x3e8 (irq = 10) is a 16550A
serial8250: ttyS3 at I/O 0x2e8 (irq = 10) is a 16550A
00:06: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
00:07: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
00:09: ttyS2 at I/O 0x3e8 (irq = 10) is a 16550A
00:0a: ttyS3 at I/O 0x2e8 (irq = 10) is a 16550A
00:0b: ttyS4 at I/O 0x4f8 (irq = 10) is a 16550A
00:0c: ttyS5 at I/O 0x4e8 (irq = 10) is a 16550A

As you see ports 2-5 share irq 10
In port 4 there is built in touch screen that works ok.
Also port 1 and 2 work ok, but ports 2 and 3 do not work.

Tested using:
od -s -w10 </dev/ttyS2

Now, when i do:
setserial /dev/ttyS2 irq 0
then port 2 works ok.
Same thing done to port 3, it works ok.

I read some forum that this (setserial irq 0) results a device to operate without an irq and could result a high system load.
Is this true?


What could be a problem?
IRQ sharing does not work?
Port parameters problem?
Out of ideas. Help! Help!

some outputs:
Kernel command line: ro root=LABEL=/ rhgb quiet 8250.nr_uarts=6

[root@dhcppc17 ~]# uname -a
Linux dhcppc17 2.6.23.9-85.fc8 #1 SMP Fri Dec 7 15:49:59 EST 2007 i686 i686 i386 GNU/Linux

[root@dhcppc17 ~]# setserial -G /dev/ttyS0
/dev/ttyS0 uart 16550A port 0x03f8 irq 4 baud_base 115200 spd_normal skip_test
[root@dhcppc17 ~]# setserial -G /dev/ttyS1
/dev/ttyS1 uart 16550A port 0x02f8 irq 3 baud_base 115200 spd_normal skip_test
[root@dhcppc17 ~]# setserial -G /dev/ttyS2
/dev/ttyS2 uart 16550A port 0x03e8 irq 10 baud_base 115200 spd_normal skip_test
[root@dhcppc17 ~]# setserial -G /dev/ttyS3
/dev/ttyS3 uart 16550A port 0x02e8 irq 10 baud_base 115200 spd_normal skip_test
[root@dhcppc17 ~]# setserial -G /dev/ttyS4
/dev/ttyS4 uart 16550A port 0x04f8 irq 10 baud_base 115200 spd_normal skip_test
[root@dhcppc17 ~]# setserial -G /dev/ttyS5
/dev/ttyS5 uart 16550A port 0x04e8 irq 10 baud_base 115200 spd_normal skip_test

[root@dhcppc17 ~]# cat /proc/interrupts
CPU0
0: 92275 XT-PIC-XT timer
1: 2 XT-PIC-XT i8042
2: 0 XT-PIC-XT cascade
5: 3 XT-PIC-XT ehci_hcd:usb1
6: 82 XT-PIC-XT uhci_hcd:usb3
7: 0 XT-PIC-XT parport0
8: 3 XT-PIC-XT rtc
9: 0 XT-PIC-XT acpi, uhci_hcd:usb4
10: 11 XT-PIC-XT serial
11: 1854 XT-PIC-XT uhci_hcd:usb2, eth0, i915@pci:0000:00:02.0
12: 0 XT-PIC-XT Intel 82801DB-ICH4
14: 4758 XT-PIC-XT libata
15: 0 XT-PIC-XT libata
NMI: 0
LOC: 40291
ERR: 0
MIS: 0