Summary: | gentoo-sources-2.6.19-r5 - Specialix SX board does not work any more | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Graham Murray <gmurray> |
Component: | [OLD] Core system | Assignee: | Daniel Drake (RETIRED) <dsd> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | kernel |
Priority: | High | ||
Version: | 2006.1 | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | linux-2.6.19-regression | ||
Package list: | Runtime testing required: | --- | |
Attachments: |
Kernel config for working 2.6.17-r7
Kernel config for failing 2.6.19-r5 |
Description
Graham Murray
2007-03-12 11:36:03 UTC
Created attachment 113057 [details]
Kernel config for working 2.6.17-r7
Created attachment 113058 [details]
Kernel config for failing 2.6.19-r5
Further investigation has shown 1) The same problem occurs with vanilla-sources-2.6.19-r5 2) The ports are actually working but at 9600bps instead of the configured 115200bps. Strace of one of the applications shows that the IOCTL is called with a B115200 value and that the syscall returns a 0 result code and stty shows them as configured for 115200. If you're really keen and have some time on your hands you can track down the exact commit which introduced the bug with: http://www.reactivated.net/weblog/archives/2006/01/using-git-bisect-to-find-buggy-kernel-patches/ It's actually fairly obvious that one commit from a certain small group of patches would have added this bug (SX had a series of cleanups merged for this release), but I don't have time to start formatting the patches right now. With a bit of looking around and judicious use of printk, I think I have found the problem in gentoo-sources-2.6.19-r5. In drivers/char/generic_serial.c in routine gs_set_termios(), it calls tty_get_baud_rate() and then uses the return value to index into the gs_baudrates array. The problem being that tty_get_baud_rate() returns the actual baud rate but gs_set_termios() is treating the result as an index to the baud rate table. Commenting out the line baudrate = gs_baudrates[baudrate]; and just using the result of tty_get_baud_rate() seems to have fixed the problem and all is working properly now. Thanks for digging into this, that is indeed the correct fix. patch accepted upstream fixed in Linux 2.6.20.5 / genpatches-2.6.20-6 / gentoo-sources-2.6.20-r5 |