当前位置: 技术问答>linux和unix
PL2303HX驱动问题,每次open ttyUSB0时 设备就挂了
来源: 互联网 发布时间:2016-12-29
本文导语: 我采用的是linux2.6以上版本了,网上好多人都反馈说 linux2.6以上版本自带的PL2303.c驱动PL2303HX是没有问题的, 我现在一样用这个驱动,也能挂载到/dev/ttyUSB0上,但是每次open这个ttyUSB0时,设备就挂了。挂掉的打印...
我采用的是linux2.6以上版本了,网上好多人都反馈说 linux2.6以上版本自带的PL2303.c驱动PL2303HX是没有问题的,
我现在一样用这个驱动,也能挂载到/dev/ttyUSB0上,但是每次open这个ttyUSB0时,设备就挂了。挂掉的打印信息如下。
希望有人指导一下我。
[520]
[520] Pid: 1329, comm: com.datajni
[520] CPU: 0 Not tainted (2.6.25 #96)
[520] PC is at dwc_otg_hcd_irq+0x34/0x40
[520] LR is at queue_transaction+0x8c/0x10c
[520] pc : [] lr : [] psr: 60000013
[520] sp : c2f75ea8 ip : c1412c80 fp : c2f75ebc
[520] r10: c047475c r9 : c4a54920 r8 : c0438f70
[520] r7 : 00000000 r6 : 00000008 r5 : 00000000 r4 : 20000013
[520] r3 : cc7e65e0 r2 : 00000005 r1 : 00180000 r0 : 00000001
[520] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
[520] Control: 0005317f Table: 62fd4000 DAC: 00000015
[520] [] (show_regs+0x0/0x50) from [] (softlockup_tick+0x130/0x158)
[520] r5:00000079 r4:409815d0
[520] [] (softlockup_tick+0x0/0x158) from [] (run_local_timers+0x1c/0x20)
[520] r8:c0438f70 r7:00000208 r6:2de54480 r5:00000000 r4:c2fb8360
[520] [] (run_local_timers+0x0/0x20) from [] (update_process_times+0x30/0x5c)
[520] [] (update_process_times+0x0/0x5c) from [] (tick_periodic.clone.0+0x38/0xcc)
[520] r5:00000000 r4:c04735f0
[520] [] (tick_periodic.clone.0+0x0/0xcc) from [] (tick_handle_periodic+0x18/0xec)
[520] r9:c4a54920 r8:c0438f70 r7:00000000 r6:c043a7a8 r5:00000000
[520] r4:c043a850
[520] [] (tick_handle_periodic+0x0/0xec) from [] (rockchip_timer_clockevent_interrupt+0x34/0x40)
[520] [] (rockchip_timer_clockevent_interrupt+0x0/0x40) from [] (handle_IRQ_event+0x44/0x84)
[520] [] (handle_IRQ_event+0x0/0x84) from [] (handle_level_irq+0x78/0x110)
[520] r7:c2f75f30 r6:c043e6b4 r5:00000010 r4:c043e6b4
[520] [] (handle_level_irq+0x0/0x110) from [] (__exception_text_start+0x50/0x68)
[520] r5:c0482530 r4:00000010
[520] [] (__exception_text_start+0x0/0x68) from [] (__irq_svc+0x34/0x80)
[520] Exception stack(0xc2f75e60 to 0xc2f75ea8)
[520] 5e60: 00000001 00180000 00000005 cc7e65e0 20000013 00000000 00000008 00000000
[520] 5e80: c0438f70 c4a54920 c047475c c2f75ebc c1412c80 c2f75ea8 c02576b4 c0258780
[520] 5ea0: 60000013 ffffffff
[520] r7:00000000 r6:00010000 r5:ff0aa000 r4:ffffffff
[520] [] (dwc_otg_hcd_irq+0x0/0x40) from [] (usb_hcd_irq+0x38/0x84)
[520] r5:00000000 r4:cc5b4800
[520] [] (usb_hcd_irq+0x0/0x84) from [] (handle_IRQ_event+0x44/0x84)
[520] r5:00000000 r4:cc51fec0
[520] [] (handle_IRQ_event+0x0/0x84) from [] (handle_level_irq+0x78/0x110)
[521] r7:00000000 r6:c043e4f4 r5:00000008 r4:c043e4f4
[521] [] (handle_level_irq+0x0/0x110) from [] (__exception_text_start+0x50/0x68)
[521] r5:c0482530 r4:00000008
[521] [] (__exception_text_start+0x0/0x68) from [] (__irq_svc+0x34/0x80)
[521] Exception stack(0xc2f75f30 to 0xc2f75f78)
[521] 5f20: 649dc000 cbcfee60 00000000 00000000
[521] 5f40: c2fb8360 c046cfe0 c2f74000 cbc03320 c0438f70 c4a54920 c047475c c2f75fac
[521] 5f60: 00000000 c2f75f78 c0345ac0 c0034d88 00000013 ffffffff
[521] r7:cbc03320 r6:00000100 r5:ff0aa000 r4:ffffffff
[521] [] (schedule+0x0/0x2b8) from [] (ret_slow_syscall+0x0/0x10)
我现在一样用这个驱动,也能挂载到/dev/ttyUSB0上,但是每次open这个ttyUSB0时,设备就挂了。挂掉的打印信息如下。
希望有人指导一下我。
[520]
[520] Pid: 1329, comm: com.datajni
[520] CPU: 0 Not tainted (2.6.25 #96)
[520] PC is at dwc_otg_hcd_irq+0x34/0x40
[520] LR is at queue_transaction+0x8c/0x10c
[520] pc : [] lr : [] psr: 60000013
[520] sp : c2f75ea8 ip : c1412c80 fp : c2f75ebc
[520] r10: c047475c r9 : c4a54920 r8 : c0438f70
[520] r7 : 00000000 r6 : 00000008 r5 : 00000000 r4 : 20000013
[520] r3 : cc7e65e0 r2 : 00000005 r1 : 00180000 r0 : 00000001
[520] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
[520] Control: 0005317f Table: 62fd4000 DAC: 00000015
[520] [] (show_regs+0x0/0x50) from [] (softlockup_tick+0x130/0x158)
[520] r5:00000079 r4:409815d0
[520] [] (softlockup_tick+0x0/0x158) from [] (run_local_timers+0x1c/0x20)
[520] r8:c0438f70 r7:00000208 r6:2de54480 r5:00000000 r4:c2fb8360
[520] [] (run_local_timers+0x0/0x20) from [] (update_process_times+0x30/0x5c)
[520] [] (update_process_times+0x0/0x5c) from [] (tick_periodic.clone.0+0x38/0xcc)
[520] r5:00000000 r4:c04735f0
[520] [] (tick_periodic.clone.0+0x0/0xcc) from [] (tick_handle_periodic+0x18/0xec)
[520] r9:c4a54920 r8:c0438f70 r7:00000000 r6:c043a7a8 r5:00000000
[520] r4:c043a850
[520] [] (tick_handle_periodic+0x0/0xec) from [] (rockchip_timer_clockevent_interrupt+0x34/0x40)
[520] [] (rockchip_timer_clockevent_interrupt+0x0/0x40) from [] (handle_IRQ_event+0x44/0x84)
[520] [] (handle_IRQ_event+0x0/0x84) from [] (handle_level_irq+0x78/0x110)
[520] r7:c2f75f30 r6:c043e6b4 r5:00000010 r4:c043e6b4
[520] [] (handle_level_irq+0x0/0x110) from [] (__exception_text_start+0x50/0x68)
[520] r5:c0482530 r4:00000010
[520] [] (__exception_text_start+0x0/0x68) from [] (__irq_svc+0x34/0x80)
[520] Exception stack(0xc2f75e60 to 0xc2f75ea8)
[520] 5e60: 00000001 00180000 00000005 cc7e65e0 20000013 00000000 00000008 00000000
[520] 5e80: c0438f70 c4a54920 c047475c c2f75ebc c1412c80 c2f75ea8 c02576b4 c0258780
[520] 5ea0: 60000013 ffffffff
[520] r7:00000000 r6:00010000 r5:ff0aa000 r4:ffffffff
[520] [] (dwc_otg_hcd_irq+0x0/0x40) from [] (usb_hcd_irq+0x38/0x84)
[520] r5:00000000 r4:cc5b4800
[520] [] (usb_hcd_irq+0x0/0x84) from [] (handle_IRQ_event+0x44/0x84)
[520] r5:00000000 r4:cc51fec0
[520] [] (handle_IRQ_event+0x0/0x84) from [] (handle_level_irq+0x78/0x110)
[521] r7:00000000 r6:c043e4f4 r5:00000008 r4:c043e4f4
[521] [] (handle_level_irq+0x0/0x110) from [] (__exception_text_start+0x50/0x68)
[521] r5:c0482530 r4:00000008
[521] [] (__exception_text_start+0x0/0x68) from [] (__irq_svc+0x34/0x80)
[521] Exception stack(0xc2f75f30 to 0xc2f75f78)
[521] 5f20: 649dc000 cbcfee60 00000000 00000000
[521] 5f40: c2fb8360 c046cfe0 c2f74000 cbc03320 c0438f70 c4a54920 c047475c c2f75fac
[521] 5f60: 00000000 c2f75f78 c0345ac0 c0034d88 00000013 ffffffff
[521] r7:cbc03320 r6:00000100 r5:ff0aa000 r4:ffffffff
[521] [] (schedule+0x0/0x2b8) from [] (ret_slow_syscall+0x0/0x10)
|
仅仅凭这个OOPS的提示信息,要准确诊断问题所在,还是挺有难度的。所以只能给你一些建议:
1. 自己debug下这个USB驱动,比如在其中加入一些打印信息便于调试,同时建议你配置内核的时候可以把usb子系统的调试信息放开;
2. 既然你是在open的时候出的问题,所以你可以在open对应的内核部分里面加一些答应或者注释掉一些代码来做调试,逐步把问题定位到具体的代码段上去;如果定位到具体代码段了,再来分析就强多了。
3. 另外,根据OOPS的提示,出错的时候PC在dwc_otg_hcd_irq+0x34/0x40这个位置,可以具体看看这个函数;另外,LR=queue_transaction+0x8c/0x10c,应该是在这个函数里面调用dwc_otg_hcd_irq的;
4. 最后,Check下硬件上有没有什么没考虑到或者不妥的地方;
这种问题,要结合环境,主要还是看你自己去调试。 GOOD LUCK!
1. 自己debug下这个USB驱动,比如在其中加入一些打印信息便于调试,同时建议你配置内核的时候可以把usb子系统的调试信息放开;
2. 既然你是在open的时候出的问题,所以你可以在open对应的内核部分里面加一些答应或者注释掉一些代码来做调试,逐步把问题定位到具体的代码段上去;如果定位到具体代码段了,再来分析就强多了。
3. 另外,根据OOPS的提示,出错的时候PC在dwc_otg_hcd_irq+0x34/0x40这个位置,可以具体看看这个函数;另外,LR=queue_transaction+0x8c/0x10c,应该是在这个函数里面调用dwc_otg_hcd_irq的;
4. 最后,Check下硬件上有没有什么没考虑到或者不妥的地方;
这种问题,要结合环境,主要还是看你自己去调试。 GOOD LUCK!