LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1391|回复: 3

2.6.18以上内核下USB驱动问题

[复制链接]
发表于 2007-6-18 11:11:48 | 显示全部楼层 |阅读模式
手头的一个USB驱动程序,在2.6.18及其以下版本上都可正常运行。但是在2.6.18以上版本上却在insmode时,出现错误。
我认为是dump_trace的问题,但是若真是这样,那么驱动程序该如何修改,才能使其正常工作呢?2.6.21/fc 7 内核,insmode信息如下:
=========================================
Jun 15 17:25:35 ssw kernel: BUG: unable to handle kernel NULL pointer dereference at virtual address 00000005
Jun 15 17:25:35 kernel:  printing eip:
Jun 15 17:25:35 kernel: c0405fbd
Jun 15 17:25:35 kernel: *pde = 16b22067
Jun 15 17:25:35 kernel: Oops: 0000 [#2]
Jun 15 17:25:36 kernel: SMP
Jun 15 17:25:36 kernel: last sysfs file: /class/usb_endpoint/usbdev4.3_ep00/dev
Jun 15 17:25:36 kernel: Modules linked in: my_usb(U) ipt_MASQUERADE iptable_nat nf_nat bridge autofs4 hidp rfcomm l2cap bluetooth sunrpc nf_conntrack_ftp nf_conntrack_netbios_ns nf_conntrack_ipv4 xt_state nf_conntrack nfnetlink ipt_REJECT iptable_filter ip_tables xt_tcpudp ip6t_REJECT ip6table_filter ip6_tables x_tables dm_mirror dm_multipath dm_mod video sbs i2c_ec button dock battery ac ipv6 lp loop parport_pc snd_intel8x0 snd_ac97_codec parport ac97_bus serio_raw snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd pcspkr soundcore 8139cp i2c_i801 snd_page_alloc 8139too i2c_core mii iTCO_wdt iTCO_vendor_support floppy sg ata_piix ata_generic libata sd_mod scsi_mod ext3 jbd mbcache ehci_hcd ohci_hcd uhci_hcd
Jun 15 17:25:36 kernel: CPU:    0
Jun 15 17:25:36 kernel: EIP:    0060:[<c0405fbd>]    Not tainted VLI
Jun 15 17:25:36 kernel: EFLAGS: 00010093   (2.6.21-1.3194.fc7 #1)
Jun 15 17:25:36 kernel: EIP is at dump_trace+0x5c/0x93
Jun 15 17:25:36 kernel: eax: 00000ffd   ebx: 00000005   ecx: fffce831   edx: 00cafe00
Jun 15 17:25:36 kernel: esi: cd444444   edi: 00000000   ebp: c06884de   esp: c14d7bb4
Jun 15 17:25:36 kernel: ds: 007b   es: 007b   fs: 00d8  gs: 0000  ss: 0068
Jun 15 17:25:36 kernel: Process khubd (pid: 145, ti=c14d7000 task=c14eacb0 task.ti=c14d7000)
Jun 15 17:25:36 kernel: Stack: c0427769 c06884de 00000018 00000000 c06884de c040600c c06d9ba0 c06884de
Jun 15 17:25:36 kernel:        c14d7d5b c04060bb c06884de c06884de c14d7cc0 c14d7cf8 00000002 00010293
Jun 15 17:25:36 kernel:        c14d7cc0 0000002b c040627b c06884de 00000010 c14eae44 00000091 c14d7000
Jun 15 17:25:36 kernel: Call Trace:
Jun 15 17:25:36 kernel:  [<c0427769>] printk+0x1f/0x92
Jun 15 17:25:36 kernel:  [<c040600c>] show_trace_log_lvl+0x18/0x2c
Jun 15 17:25:36 kernel:  [<c04060bb>] show_stack_log_lvl+0x9b/0xa3
Jun 15 17:25:36 kernel:  [<c040627b>] show_registers+0x1b8/0x27e
Jun 15 17:25:36 kernel:  [<c040646f>] die+0x12e/0x240
Jun 15 17:25:36 kernel:  [<c060310c>] do_page_fault+0x3fe/0x4d1
Jun 15 17:25:36 kernel:  [<c0419c45>] smp_apic_timer_interrupt+0x74/0x80
Jun 15 17:25:36 kernel:  [<c0602d0e>] do_page_fault+0x0/0x4d1
Jun 15 17:25:36 kernel:  [<c060190c>] error_code+0x7c/0x84
Jun 15 17:25:36 kernel:  [<c04200d8>] find_busiest_group+0x264/0x4c5
Jun 15 17:25:36 kernel:  [<c0405fbd>] dump_trace+0x5c/0x93
Jun 15 17:25:36 kernel:  [<c040600c>] show_trace_log_lvl+0x18/0x2c
Jun 15 17:25:36 kernel:  [<c04065bb>] show_trace+0xf/0x11
Jun 15 17:25:36 kernel:  [<c040662d>] dump_stack+0x12/0x14
Jun 15 17:25:36 kernel:  [<c04e376b>] kobject_shadow_add+0x153/0x185
Jun 15 17:25:36 kernel:  [<c04e3939>] kobject_set_name+0x2b/0x92
Jun 15 17:25:36 kernel:  [<c0550b86>] device_add+0xa7/0x62d
Jun 15 17:25:36 kernel:  [<c04e3424>] kobject_get+0xf/0x13
Jun 15 17:25:36 kernel:  [<c056becc>] usb_create_ep_files+0x20d/0x2b2
Jun 15 17:25:36 kernel:  [<c056b7d7>] usb_create_sysfs_intf_files+0x74/0x87
Jun 15 17:25:36 kernel:  [<c056859e>] usb_set_configuration+0x3b1/0x3e9
Jun 15 17:25:36 kernel:  [<c056eb84>] generic_probe+0x18f/0x1df
Jun 15 17:25:36 kernel:  [<c05699c9>] usb_probe_device+0x32/0x37
Jun 15 17:25:36 kernel:  [<c05529ab>] really_probe+0xc6/0x14f
Jun 15 17:25:36 kernel:  [<c0552a78>] driver_probe_device+0x44/0xa5
Jun 15 17:25:36 kernel:  [<c05ff789>] klist_next+0x4b/0x6c
Jun 15 17:25:36 kernel:  [<c0552ad9>] __device_attach+0x0/0x5
Jun 15 17:25:36 kernel:  [<c0551f2a>] bus_for_each_drv+0x37/0x5e
Jun 15 17:25:36 kernel:  [<c0552b5e>] device_attach+0x65/0x79
Jun 15 17:25:36 kernel:  [<c0552ad9>] __device_attach+0x0/0x5
Jun 15 17:25:36 kernel:  [<c0551ea4>] bus_attach_device+0x1e/0x3e
Jun 15 17:25:36 kernel:  [<c0550e7f>] device_add+0x3a0/0x62d
Jun 15 17:25:36 kernel:  [<c05681d3>] usb_cache_string+0x76/0x90
Jun 15 17:25:36 kernel:  [<c05647ed>] usb_new_device+0x82/0xcf
Jun 15 17:25:36 kernel:  [<c056591b>] hub_thread+0x701/0xa6e
Jun 15 17:25:36 kernel:  [<c0436e71>] autoremove_wake_function+0x0/0x35
Jun 15 17:25:36 kernel:  [<c056521a>] hub_thread+0x0/0xa6e
Jun 15 17:25:36 kernel:  [<c0436da8>] kthread+0xb0/0xd8
Jun 15 17:25:36 kernel:  [<c0436cf8>] kthread+0x0/0xd8
Jun 15 17:25:36 kernel:  [<c0405b3f>] kernel_thread_helper+0x7/0x10
Jun 15 17:25:36 kernel:  [<c0410380>] powernow_acpi_init+0x5f/0x2e7
Jun 15 17:25:36 kernel:  [<e0f08730>] sample_callback+0x0/0x10 [shdusb]
Jun 15 17:25:36 kernel:  [<c0567b2f>] usb_api_blocking_completion+0x0/0x8
Jun 15 17:25:36 kernel:  [<c05e1cc8>] igmp_timer_expire+0x0/0x99
Jun 15 17:25:36 kernel:  [<c05e1cc8>] igmp_timer_expire+0x0/0x99
Jun 15 17:25:36 kernel: BUG: unable to handle kernel NULL pointer dereference at virtual address 00000005
Jun 15 17:25:36 kernel:  printing eip:
Jun 15 17:25:36 kernel: c0405fbd
Jun 15 17:25:36 kernel: *pde = 16b22067
Jun 15 17:25:36 kernel: Recursive die() failure, output suppresse
发表于 2007-6-25 06:21:18 | 显示全部楼层
有了源代码看这个都不一定能说清楚。。。
回复 支持 反对

使用道具 举报

发表于 2007-6-25 10:31:51 | 显示全部楼层
似乎2.6.18 2.6.19+ 内核变化有点大,特别是for arm。
回复 支持 反对

使用道具 举报

发表于 2007-6-30 19:55:06 | 显示全部楼层
EIP: c0405fbd  在System.map文件中找可能出错的entry.

2.6.17 above以上,很多驱动都做了大幅度的修改,USB这块不太清楚,SD/MMC增加了对high speed SD card的支持,以致于有些不支持high speed SD/MMC的机器无法load SD卡。

建议你看看ChangeLog
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表