The Intel536 code has once again become the victim of kernel retooling, this
time at the 2.6.28 mark. The changes from the working 2.6.27.x to non-working
2.6.28.x appear to be small:
In softserial_ioctl.c:
n_tty_ioctl doesn't seem to exist anymore. Several patches I found for other
stuff broken by 2.6.28 look like they are using n_tty_ioctl_helper in its
place; this is what I did, around line 113
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
return(n_tty_ioctl(ptty,pfile,ioctl,ioctl_parameter));
#else
return(n_tty_ioctl_helper(ptty,pfile,ioctl,ioctl_parameter));
#endif
Indeed, the Arch Linux guys
( http://repos.archlinux.org/viewvc.cgi/intel-536ep/repos/extra-i686/ )
did similar w/o the version check for older kernels to still compile:
--- coredrv/softserial_ioctl.c~ 2008-12-26 23:35:56.000000000 +0000
+++ coredrv/softserial_ioctl.c 2008-12-26 23:35:56.000000000 +0000
@@ -109,7 +109,7 @@
case TIOCGSOFTCAR:
case TIOCSSOFTCAR:
// return (-ENOIOCTLCMD);
- return(n_tty_ioctl(ptty,pfile,ioctl,ioctl_parameter));
+ return(n_tty_ioctl_helper(ptty,pfile,ioctl,ioctl_parameter));
//CASES FOR ONLY 2.1 KERNEL, IGNORE, RETURN AS DEFALUT
case TCSBRK:
case TCSBRKP:
From
http://repos.archlinux.org/viewvc.cgi/intel-536ep/repos/extra-i686/kernel-2.6.28.patch?r1=22532&view=log
It compiles and loads fine, yet on start of pppd....Ka-Boom!
2009-01-21T02:24:52.171129-05:00 atr2 pppd[1702]: pppd 2.4.4 started by root, uid 0
2009-01-21T02:24:52.588451-05:00 atr2 kernel:<4>------------[ cut here ]------------
2009-01-21T02:24:52.588551-05:00 atr2 kernel:<4>WARNING: at lib/kref.c:43 kref_get+0x17/0x1b()
2009-01-21T02:24:52.588673-05:00 atr2 kernel:<4>Modules linked in: Intel536 ipv6 twofish_i586 twofish_common aes_i586 aes_generic msr cpuid microcode blowfish cbc cryptd md5 hangcheck_timer pcspkr btusb ppp_generic bluetooth slhc tulip parport_pc parport rtc_cmos rtc_core rtc_lib ehci_hcd uhci_hcd nfnetlink snd_dummy snd_pcm snd_timer snd snd_page_alloc soundcore configfs
2009-01-21T02:24:52.588722-05:00 atr2 kernel:<4>Pid: 1702, comm: pppd Not tainted 2.6.28.1 #1
2009-01-21T02:24:52.588762-05:00 atr2 kernel:<4>Call Trace:
2009-01-21T02:24:52.588827-05:00 atr2 kernel:<4> [<c0114808>] warn_on_slowpath+0x40/0x60
2009-01-21T02:24:52.588884-05:00 atr2 kernel:<4> [<c0164b60>] generic_write_end+0x24/0x73
2009-01-21T02:24:52.588937-05:00 atr2 kernel:<4> [<c0164ba8>] generic_write_end+0x6c/0x73
2009-01-21T02:24:52.588992-05:00 atr2 kernel:<4> [<c0132b34>] generic_file_buffered_write+0x137/0x24a
2009-01-21T02:24:52.589047-05:00 atr2 kernel:<4> [<c0132b8d>] generic_file_buffered_write+0x190/0x24a
2009-01-21T02:24:52.589097-05:00 atr2 kernel:<4> [<c0159b83>] __d_lookup+0x93/0xc1
2009-01-21T02:24:52.589148-05:00 atr2 kernel:<4> [<c0153a5a>] do_lookup+0x47/0x116
2009-01-21T02:24:52.589199-05:00 atr2 kernel:<4> [<c01afeba>] kobject_get+0xf/0x13
2009-01-21T02:24:52.589249-05:00 atr2 kernel:<4> [<c01b08c8>] kref_get+0x17/0x1b
2009-01-21T02:24:52.589299-05:00 atr2 kernel:<4> [<c01de691>] tty_open+0x120/0x353
2009-01-21T02:24:52.589350-05:00 atr2 kernel:<4> [<c014fdb5>] chrdev_open+0xdb/0xf1
2009-01-21T02:24:52.589401-05:00 atr2 kernel:<4> [<c014fcda>] chrdev_open+0x0/0xf1
2009-01-21T02:24:52.589453-05:00 atr2 kernel:<4> [<c014c9b1>] __dentry_open+0xfe/0x1e6
2009-01-21T02:24:52.589505-05:00 atr2 kernel:<4> [<c014cb16>] nameidata_to_filp+0x1c/0x2c
2009-01-21T02:24:52.589556-05:00 atr2 kernel:<4> [<c01556d8>] do_filp_open+0x33d/0x63d
2009-01-21T02:24:52.589611-05:00 atr2 kernel:<4> [<c0121c27>] autoremove_wake_function+0x0/0x2d
2009-01-21T02:24:52.589661-05:00 atr2 kernel:<4> [<c015c09d>] alloc_fd+0x49/0xab
2009-01-21T02:24:52.589712-05:00 atr2 kernel:<4> [<c014c7b3>] do_sys_open+0x46/0xe7
2009-01-21T02:24:52.589762-05:00 atr2 kernel:<4> [<c014c898>] sys_open+0x1e/0x23
2009-01-21T02:24:52.589814-05:00 atr2 kernel:<4> [<c0102bd9>] sysenter_do_call+0x12/0x25
2009-01-21T02:24:52.589861-05:00 atr2 kernel:<4>---[ end trace 6b74db362f7b8f82 ]---
2009-01-21T02:24:52.589915-05:00 atr2 kernel:<1>BUG: unable to handle kernel NULL pointer dereference at 00000001
2009-01-21T02:24:52.589973-05:00 atr2 kernel:<1>IP: [<cedcafdd>] softserial_open+0xad/0x150 [Intel536]
2009-01-21T02:24:52.590015-05:00 atr2 kernel:<4>*pde = 00000000
Further complicating the problem is that, even when I left the module out,
this kernel still had Oops issues involving ide_tape.ko, so maybe the kernel
is not so stable itself. I later left out the ide_tape.ko and verified that
the Intel536 issue still occurs regardless. That is, the two may be related,
but don't depend on each other.
IP: [<cedcafdd>] softserial_open+0xad/0x150
Perhaps the problem was introduced with a change prior to this one, as
softserial_open wasn't touched from the working 2.6.27.x code to now, and the
kernel devs have been turning the tty layer upside down for several kernel
versions.
Testing further, I used only the base + Arch Linux patches (none of the code I
worked on) and get similar results. There's actually several "Intel536" code
bases right now since Intel themselves aren't updating the code anymore. At
some point the two codebases diverged while still doing the same thing, only
in a slightly different way with slightly different coding style.
Using only Arch Linux's codebase & patches, starting pppd the operation
actually completes, and I do get a connection this time despite the error
message...
WARNING: at lib/kref.c:43 kref_get+0x17/0x1b()
Modules linked in: ipv6 twofish_i586 twofish_common aes_i586 aes_generic msr cpuid microcode blowfish cbc cryptd md5 hangcheck_timer Intel536 btusb pcspkr bluetooth ppp_generic slhc tulip parport_pc parport rtc_cmos rtc_core rtc_lib ehci_hcd uhci_hcd nfnetlink snd_dummy snd_pcm snd_timer snd snd_page_alloc soundcore configfs
Pid: 1400, comm: pppd Not tainted 2.6.28.1 #1
Call Trace:
[<c0114808>] warn_on_slowpath+0x40/0x60
[<c0164b60>] generic_write_end+0x24/0x73
[<c0164ba8>] generic_write_end+0x6c/0x73
[<c0132b34>] generic_file_buffered_write+0x137/0x24a
[<c0132b8d>] generic_file_buffered_write+0x190/0x24a
[<c0159b83>] __d_lookup+0x93/0xc1
[<c0153a5a>] do_lookup+0x47/0x116
[<c01afeba>] kobject_get+0xf/0x13
[<c01b08c8>] kref_get+0x17/0x1b
[<c01de691>] tty_open+0x120/0x353
[<c014fdb5>] chrdev_open+0xdb/0xf1
[<c014fcda>] chrdev_open+0x0/0xf1
[<c014c9b1>] __dentry_open+0xfe/0x1e6
[<c014cb16>] nameidata_to_filp+0x1c/0x2c
[<c01556d8>] do_filp_open+0x33d/0x63d
[<c0121c27>] autoremove_wake_function+0x0/0x2d
[<c015c09d>] alloc_fd+0x49/0xab
[<c014c7b3>] do_sys_open+0x46/0xe7
[<c014c898>] sys_open+0x1e/0x23
[<c0102bd9>] sysenter_do_call+0x12/0x25
but, the minute it disconnects, Kernel Oops:
BUG: unable to handle kernel paging request at 632e6474
IP: [<c0149673>] constant_test_bit+0xb/0x17
*pde = 00000000
Oops: 0000 [#1]
last sysfs file:
Modules linked in: ipt_MASQUERADE iptable_nat nf_nat xt_comment xt_iprange xt_multiport ipt_REJECT ipt_LOG xt_limit nf_conntrack_ipv4 nf_defrag_ipv4 xt_state iptable_filter rfcomm bridge stp llc bnep l2cap ppp_deflate bsd_comp ppp_async crc_ccitt ipv6 twofish_i586 twofish_common aes_i586 aes_generic msr cpuid microcode blowfish cbc cryptd md5 hangcheck_timer Intel536 btusb pcspkr bluetooth ppp_generic slhc tulip parport_pc parport rtc_cmos rtc_core rtc_lib ehci_hcd uhci_hcd nfnetlink snd_dummy snd_pcm snd_timer snd snd_page_alloc soundcore configfs
Pid: 1400, comm: pppd Tainted: G W (2.6.28.1 #1) Gateway 2000 PC
EIP: 0060:[<c0149673>] EFLAGS: 00010202 CPU: 0
EIP is at constant_test_bit+0xb/0x17
EAX: 00000000 EBX: 632e6474 ECX: 00000020 EDX: 00000007
ESI: 632e6474 EDI: cebc3300 EBP: 00000000 ESP: c8de5ebc
DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
Process pppd (pid: 1400, ti=c8de5000 task=c988fc00 task.ti=c8de5000)
Stack:
cebc3304 c014b7eb cebc3304 c01dc9f0 cebc3300 00000000 c01b08a7 c99ca400
c99ca404 c01de438 c99ca404 c01de402 00000000 c01b08a7 c99ca400 00000000
c01de3c1 c8ddff00 00000000 00000001 00000000 00000000 c944c240 c99ca4e0
Call Trace:
[<c014b7eb>] kfree+0x1e/0x86
[<c01dc9f0>] destruct_tty_driver+0x0/0x81
[<c01b08a7>] kref_put+0x35/0x3f
[<c01de438>] release_one_tty+0x36/0x6b
[<c01de402>] release_one_tty+0x0/0x6b
[<c01b08a7>] kref_put+0x35/0x3f
[<c01de3c1>] tty_release_dev+0x376/0x390
[<c01dda39>] tty_ioctl+0x0/0x5f8
[<c0156bb6>] vfs_ioctl+0x16/0x4a
[<c015705e>] do_vfs_ioctl+0x38d/0x3bb
[<c01de3e2>] tty_release+0x7/0xa
[<c014eb27>] __fput+0xb8/0x16c
[<c014c6ed>] filp_close+0x4d/0x53
[<c014c73f>] sys_close+0x4c/0x7a
[<c0102bd9>] sysenter_do_call+0x12/0x25
Code: 0b 0f 94 c0 84 c0 74 07 89 d8 e8 76 21 00 00 89 f0 5b 5e c3 b9 98 7a 34 c0 e9 dd a7 02 00 90 90 53 b9 20 00 00 00 89 d3 99 f7 f9 <8b> 04 83 89 d1 5b d3 e8 83 e0 01 c3 53 8d 98 00 00 00 40 b8 0e
EIP: [<c0149673>] constant_test_bit+0xb/0x17 SS:ESP 0068:c8de5ebc
I'm asking for help with:
- confirm the Intel536 code as-is does work at the 2.6.28.x kernel versions,
and this some strange local issue
and/or
- getting a working, non-Oops'ing Intel536 code
Hopefully someone has a way to get Intel536 working with 2.6.28.x, as it's
blocking my kernel upgrades (again). In the meanwhile, I think I'll go looking
for a real, serial modem today so I don't have to keep going thru this every
time the kernel guys touch the linux kernel code. ;)