flywithlove
驱动小牛
驱动小牛
  • 注册日期2002-11-05
  • 最后登录2009-10-09
  • 粉丝0
  • 关注0
  • 积分8分
  • 威望18点
  • 贡献值0点
  • 好评度10点
  • 原创分0分
  • 专家分0分
阅读:1167回复:6

关于调试信息的问题!

楼主#
更多 发布于:2003-04-17 15:44
我加载驱动模块后,然后插入usb,这个时候,只能显示module_init,module_exit中的调试信息,但是并没有probe的调试信息。(printk调试)
痛并快乐着!
dos
dos
驱动小牛
驱动小牛
  • 注册日期2001-06-13
  • 最后登录2010-02-24
  • 粉丝0
  • 关注0
  • 积分90分
  • 威望9点
  • 贡献值0点
  • 好评度9点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2003-04-27 01:38
我加载驱动模块后,然后插入usb,这个时候,只能显示module_init,module_exit中的调试信息,但是并没有probe的调试信息。(printk调试)


设备匹配信息不对,系统不认为你的driver可以用在这个设备上,所以也就没有调用你的probe。
flywithlove
驱动小牛
驱动小牛
  • 注册日期2002-11-05
  • 最后登录2009-10-09
  • 粉丝0
  • 关注0
  • 积分8分
  • 威望18点
  • 贡献值0点
  • 好评度10点
  • 原创分0分
  • 专家分0分
板凳#
发布于:2003-04-23 12:54
我就是连probe函数都没有进去,我怀疑是因为我的usb是HID的,所以一插入就自动加载了HID驱动,不知道对不对
痛并快乐着!
hometown
驱动大牛
驱动大牛
  • 注册日期2002-10-24
  • 最后登录2004-05-21
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
地板#
发布于:2003-04-21 08:58
(1)可检测是否进入PROBE
(2)在端口探测处前后检查是否读写正确的端口
(3)如果前两步都是正确的, 看是否正确的读写了寄存器

希望对你有所帮助
How fair and how pleasant art thou, O love, for delights!This thy stature is like to a palm tree, and thy breasts to clusters of grapes.I said, I will go up to the palm tree, I will take hold of the boughs thereof: now also thy breasts shall be as clusters of the vine, and the smell of thy nose like apples;And the roof of thy mouth like the best wine for my beloved, that goeth down sweetly, causing the lips of those that are asleep to speak.
flywithlove
驱动小牛
驱动小牛
  • 注册日期2002-11-05
  • 最后登录2009-10-09
  • 粉丝0
  • 关注0
  • 积分8分
  • 威望18点
  • 贡献值0点
  • 好评度10点
  • 原创分0分
  • 专家分0分
地下室#
发布于:2003-04-18 10:14
注:我是参考了本站的文章how to write a linux usb module。
痛并快乐着!
flywithlove
驱动小牛
驱动小牛
  • 注册日期2002-11-05
  • 最后登录2009-10-09
  • 粉丝0
  • 关注0
  • 积分8分
  • 威望18点
  • 贡献值0点
  • 好评度10点
  • 原创分0分
  • 专家分0分
5楼#
发布于:2003-04-18 09:57
当我insmod并且插入usb后,/var/log/messages显示为:
Apr 18 17:29:55 sunrnp kernel: usb.c: deregistering driver cd
Apr 18 17:30:00 sunrnp kernel: Module is loaded!
Apr 18 17:30:00 sunrnp kernel: usb.c: registered new driver cd
Apr 18 17:30:12 sunrnp kernel: hub.c: new USB device 00:07.2-1, assigned address  22
Apr 18 17:30:12 sunrnp kernel: usb-uhci.c: interrupt, status 2, frame# 326


   运行hotplug后,/var/log/messages显示为:
tail: 10: 没有那个文件或目录
==> /var/log/messages <==
Apr 18 17:30:21 sunrnp kernel: sda : READ CAPACITY failed.
Apr 18 17:30:21 sunrnp kernel: sda : status = 1, message = 00, host = 0, driver
= 08
Apr 18 17:30:21 sunrnp kernel: Info fld=0xa00 (nonstd), Current sd00:00: sense k
ey Not Ready
Apr 18 17:30:21 sunrnp kernel: sda : block size assumed to be 512 bytes, disk si
ze 1GB.
Apr 18 17:30:21 sunrnp kernel:  sda: I/O error: dev 08:00, sector 0
Apr 18 17:30:21 sunrnp kernel:  I/O error: dev 08:00, sector 2
Apr 18 17:30:21 sunrnp kernel:  I/O error: dev 08:00, sector 0
Apr 18 17:30:21 sunrnp kernel:  unable to read partition table
Apr 18 17:30:21 sunrnp devlabel: devlabel service started/restarted
Apr 18 17:31:01 sunrnp  4月 18 17:31:01 /etc/hotplug/usb.agent: Bad USB agent in
vocation


这个时候就出现错误了。
注:我的linxu内核是2.4.20,usb是hid兼容的,在windows下运行良好。
痛并快乐着!
hometown
驱动大牛
驱动大牛
  • 注册日期2002-10-24
  • 最后登录2004-05-21
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
6楼#
发布于:2003-04-17 19:25
那是你的DRIVER中的probe有问题, 这个问题往往是由于没有正确的使用USB的端口地址或直接内存映射地址造成的。 检查你probe的地址
How fair and how pleasant art thou, O love, for delights!This thy stature is like to a palm tree, and thy breasts to clusters of grapes.I said, I will go up to the palm tree, I will take hold of the boughs thereof: now also thy breasts shall be as clusters of the vine, and the smell of thy nose like apples;And the roof of thy mouth like the best wine for my beloved, that goeth down sweetly, causing the lips of those that are asleep to speak.
游客

返回顶部