Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 189470 - [2.6.22 regression] serial ports are switched (16550A, A8V Deluxe)
Summary: [2.6.22 regression] serial ports are switched (16550A, A8V Deluxe)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: High trivial (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard: linux-2.6.22-regression
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-19 14:05 UTC by Stefan Bergler
Modified: 2007-09-02 22:45 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
current configuration for 2.6.21-r4 kernel (working OK) (config-2.6.21-r4,40.07 KB, text/plain)
2007-08-19 14:08 UTC, Stefan Bergler
Details
configuration for 2.6.22-r2 kernel, switching serial ports (config-2.6.22-r2,40.72 KB, text/plain)
2007-08-19 14:09 UTC, Stefan Bergler
Details
dmesg 2.6.21-r4 while booting (dmesg-2.6.21-gentoo-r4-current,14.98 KB, text/plain)
2007-08-19 14:12 UTC, Stefan Bergler
Details
dmesg 2.6.22-r2 while booting (dmesg-2.6.22-gentoo-r2,15.00 KB, text/plain)
2007-08-19 14:12 UTC, Stefan Bergler
Details
fix_serial_ports_order.patch (fix_serial_ports_order.patch,7.17 KB, patch)
2007-08-21 16:51 UTC, Carlos Silva (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Bergler 2007-08-19 14:05:26 UTC
After booting up the system the serial ports are switched (compared to gentoo-sources-2.6.21-r4 and earlier).
The new port order also is contrary to the portorder (io/irq) specified in 'man setserial'.
Output of: 'setserial -g setserial -g /dev/ttyS?'
 /dev/ttyS0, UART: 16550A, Port: 0x02f8, IRQ: 3
 /dev/ttyS1, UART: unknown, Port: 0x03f8, IRQ: 4
 /dev/ttyS2, UART: unknown, Port: 0x0000, IRQ: 0
 /dev/ttyS3, UART: unknown, Port: 0x0000, IRQ: 0

The Hardware is a ASUS A8V Deluxe, AMD64 without additional serial hardware. (1 FF DVB Card, 1 Budget, Radeon7000/VE, RaLink RT2500) The serial ports system is setup as per defaults (external serial as first serial 0x3f8/4, internal as second 0x2f8/3)

The setup of the kernel is mainly migrated with copying over '.config' and calling 'make oldconfig'. Changes to .config (make xconfig) did not make a difference. The difference must be in the code modifications to the kernel source.



Reproducible: Always

Steps to Reproduce:
1. Have a hardware with two standard serial ports (tested for AMD64 only now)
2. Compile the new kernel
3. Check with 'setserial -g /dev/ttyS?'.

Actual Results:  
# setserial -g /dev/ttyS?
/dev/ttyS0, UART: 16550A, Port: 0x02f8, IRQ: 3
/dev/ttyS1, UART: 16550A, Port: 0x03f8, IRQ: 4
/dev/ttyS2, UART: unknown, Port: 0x0000, IRQ: 0
/dev/ttyS3, UART: unknown, Port: 0x0000, IRQ: 0


Expected Results:  
# setserial -g /dev/ttyS?
/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4
/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3
/dev/ttyS2, UART: unknown, Port: 0x0000, IRQ: 0
/dev/ttyS3, UART: unknown, Port: 0x0000, IRQ: 0


Is this an expected behaviour (is it a bug or a feature)?

I reuse the serial port for lirc. That is why the UART is not set in the description above:
# grep serial /etc/modprobe.conf
options lirc_serial irq=3 io=0x2f8
install lirc_serial { setserial /dev/ttyS1 uart none; } ; /sbin/modprobe --first-time --ignore-install lirc_serial
Comment 1 Stefan Bergler 2007-08-19 14:08:33 UTC
Created attachment 128591 [details]
current configuration for 2.6.21-r4 kernel (working OK)
Comment 2 Stefan Bergler 2007-08-19 14:09:34 UTC
Created attachment 128592 [details]
configuration for 2.6.22-r2 kernel, switching serial ports
Comment 3 Stefan Bergler 2007-08-19 14:12:12 UTC
Created attachment 128593 [details]
dmesg 2.6.21-r4 while booting
Comment 4 Stefan Bergler 2007-08-19 14:12:42 UTC
Created attachment 128594 [details]
dmesg 2.6.22-r2 while booting
Comment 5 Carlos Silva (RETIRED) gentoo-dev 2007-08-21 16:51:59 UTC
Created attachment 128793 [details, diff]
fix_serial_ports_order.patch

Ok, do you mind testing this patch and see if it works?
To apply the patch do like this:
 - Copy it to any directory
 - cd /usr/src/linux
 - patch -p1 < <path_to_the_patch_file>

Then recompile the kernel and reboot to your new kernel to test the serial ports order.
Comment 6 Stefan Bergler 2007-08-21 21:20:47 UTC
(In reply to comment #5)
> Then recompile the kernel and reboot to your new kernel to test the serial
> ports order.
> 
The patch works quite well:
# setserial -g /dev/ttyS?
/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4
/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3
/dev/ttyS2, UART: unknown, Port: 0x03e8, IRQ: 4
/dev/ttyS3, UART: unknown, Port: 0x02e8, IRQ: 3

Please tell me if / where this patch will be included, when closing this bug report.

Thanks a lot
 Stefan
Comment 7 Carlos Silva (RETIRED) gentoo-dev 2007-08-21 23:47:59 UTC
we'll close it when the patch is merge to gentoo-sources :)
Comment 8 Maarten Bressers (RETIRED) gentoo-dev 2007-09-02 22:45:03 UTC
The patch is in gentoo-sources-2.6.22-r6, closing this bug.