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
Created attachment 128591 [details] current configuration for 2.6.21-r4 kernel (working OK)
Created attachment 128592 [details] configuration for 2.6.22-r2 kernel, switching serial ports
Created attachment 128593 [details] dmesg 2.6.21-r4 while booting
Created attachment 128594 [details] dmesg 2.6.22-r2 while booting
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.
(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
we'll close it when the patch is merge to gentoo-sources :)
The patch is in gentoo-sources-2.6.22-r6, closing this bug.