免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2311 | 回复: 2
打印 上一主题 下一主题

[硬件及驱动] USB鼠标工作时出现unlink,设备未移除,但却主机不再查询鼠标状态 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2012-10-12 13:53 |只看该作者 |倒序浏览
鼠标不动作时,查看设备仍然在线,如下信息:


~ # cat /proc/bus/usb/devices

T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2
B: Alloc= 28/900 us ( 3%), #Int= 2, #Iso= 0
D: Ver= 1.10 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=0000 ProdID=0000 Rev= 2.06
S: Manufacturer=Linux 2.6.13 ohci_hcd
S: Product=AT91RM9200 OHCI
S: SerialNumber=at91rm9200
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr= 0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 2 Ivl=255ms

T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=1.5 MxCh= 0
D: Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=8e06 ProdID=f700 Rev= 0.00
S: Manufacturer=CH PRODUCTS
S: Product=CH USB TRACKBALL
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=100mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=02 Driver=usbhid
E: Ad=81(I) Atr=03(Int.) MxPS= 3 Ivl=10ms

T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#= 3 Spd=1.5 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=04d9 ProdID=1400 Rev= 1.43
C:* #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr=100mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=01 Driver=usbhid
E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=10ms
I: If#= 1 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=02 Driver=usbhid
E: Ad=82(I) Atr=03(Int.) MxPS= 8 Ivl=10ms
~ #  


故障情况下
B: Alloc= 28/900 us ( 3%), #Int= 2, #Iso= 0
正常情况下
B: Alloc= 38/900 us ( 4%), #Int= 3, #Iso= 0


跟踪驱动打印发现执行unlink操作,打印如下:

drivers/usb/host/ohci-q.c ed_halted at91rm9200-ohci at91rm9200-ohci: urb c3dc5c80 path 1 ep1in 3c160000 cc 3 --> status -84
drivers/usb/host/ohci-q.c td_done at91rm9200-ohci at91rm9200-ohci: urb c3dc5c80 td ffc07100 (1) cc 3, len=0/3
drivers/usb/host/ohci-q.c finish_urb 70: bandwidth_int_reqs=2
drivers/usb/host/ohci-dbg.c: RET c3dc5c80 dev=7 ep=1in-intr flags=14 len=0/3 stat=-84
drivers/usb/host/ohci-dbg.c: data(0/3): stat:-84
drivers/usb/host/ohci-q.c periodic_unlink at91rm9200-ohci at91rm9200-ohci: unlink ed ffc06100 branch 2 [86us.], interval 8
drivers/usb/host/ohci-hcd.c ohci_irq 757: irq
at91rm9200-ohci at91rm9200-ohci: OHCI controller state
at91rm9200-ohci at91rm9200-ohci: OHCI 1.0, NO legacy support registers
at91rm9200-ohci at91rm9200-ohci: control 0x08f HCFS=operational IE PLE CBSR=3
at91rm9200-ohci at91rm9200-ohci: cmdstatus 0x20000 SOC=2
at91rm9200-ohci at91rm9200-ohci: intrstatus 0x00000061 RHSC FNO SO
at91rm9200-ohci at91rm9200-ohci: intrenable 0x8000001e MIE UE RD SF WDH
at91rm9200-ohci at91rm9200-ohci: ed_controlhead 23dbc040
at91rm9200-ohci at91rm9200-ohci: fminterval a7782edf
at91rm9200-ohci at91rm9200-ohci: hcca frame #e63c
at91rm9200-ohci at91rm9200-ohci: roothub.a 02000202 POTPGT=2 NPS NDP=2
at91rm9200-ohci at91rm9200-ohci: roothub.b 00000000 PPCM=0000 DR=0000
at91rm9200-ohci at91rm9200-ohci: roothub.status 00008000 DRWE
at91rm9200-ohci at91rm9200-ohci: roothub.portstatus [0] 0x00000303 LSDA PPS PES CCS
at91rm9200-ohci at91rm9200-ohci: roothub.portstatus [1] 0x00000303 LSDA PPS PES CCS
drivers/usb/host/ohci-hcd.c ohci_irq 757: irq
at91rm9200-ohci at91rm9200-ohci: OHCI controller state
at91rm9200-ohci at91rm9200-ohci: OHCI 1.0, NO legacy support registers
at91rm9200-ohci at91rm9200-ohci: control 0x08f HCFS=operational IE PLE CBSR=3
at91rm9200-ohci at91rm9200-ohci: cmdstatus 0x20000 SOC=2
at91rm9200-ohci at91rm9200-ohci: intrstatus 0x00000061 RHSC FNO SO
at91rm9200-ohci at91rm9200-ohci: intrenable 0x8000001a MIE UE RD WDH
at91rm9200-ohci at91rm9200-ohci: ed_controlhead 23dbc040
at91rm9200-ohci at91rm9200-ohci: fminterval a7782edf
at91rm9200-ohci at91rm9200-ohci: hcca frame #e63c
at91rm9200-ohci at91rm9200-ohci: roothub.a 02000202 POTPGT=2 NPS NDP=2
at91rm9200-ohci at91rm9200-ohci: roothub.b 00000000 PPCM=0000 DR=0000
at91rm9200-ohci at91rm9200-ohci: roothub.status 00008000 DRWE
at91rm9200-ohci at91rm9200-ohci: roothub.portstatus [0] 0x00000303 LSDA PPS PES CCS
at91rm9200-ohci at91rm9200-ohci: roothub.portstatus [1] 0x00000303 LSDA PPS PES CCS


不知道目前是进入什么流程分支,请大家帮忙分析下,万分感谢!
linux kernel 2.6.13



附上详细打印信息

http://www.refree.cn/log/real_unlink.txt

论坛徽章:
0
2 [报告]
发表于 2012-10-12 15:26 |只看该作者
同病相怜啊   我自己写了个鼠标驱动,这是我的Log。。。   
如果鼠标不停的动得话,一切正常,有个reuse ... schedule的过程;但是鼠标停下来的话,就没有reuse的过程,就在也不能用了。。。
这个unlink的信息是由 ECHI打印出来的,至于原因。 我也在找。
  1. [   92.285000] my_mouse: my_mouse open
  2. [   92.290000] my_mouse: new thread created
  3. [   92.300000] my_mouse: new thread handling urb
  4. [   92.330000] my_mouse probe
  5. [   92.390000] drivers/usb/core/inode.c: creating file '004'
  6. [   92.400000] hub 1-1:1.0: state 7 ports 4 chg 0000 evt 0008
  7. [   92.885000] my_mouse: schedule_timeout
  8. [   92.890000] usb 1-1.3: link qh8-0e01/cfc92040 start 2 [1/2 us]
  9. [   92.900000] my_mouse: submit urb success
  10. [   93.130000] my_mouse: input all mouse position
  11. [   93.130000] usb 1-1.3: unlink qh8-0e01/cfc92040 start 2 [1/2 us]
  12. [   93.400000] my_mouse: schedule_timeout
  13. [   93.400000] s5p-ehci s5p-ehci: reused qh cfc92040 schedule
  14. [   93.400000] usb 1-1.3: link qh8-0e01/cfc92040 start 2 [1/2 us]
  15. [   93.405000] my_mouse: submit urb success
  16. [   93.410000] my_mouse: input all mouse position
  17. [   93.410000] usb 1-1.3: unlink qh8-0e01/cfc92040 start 2 [1/2 us]
复制代码

论坛徽章:
0
3 [报告]
发表于 2012-10-12 18:28 |只看该作者
互勉
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP