免费注册 查看新帖 |

Chinaunix

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

[硬件及驱动] pci dev check的疑问。。。 [复制链接]

论坛徽章:
4
酉鸡
日期:2014-03-21 23:19:50狮子座
日期:2014-08-01 22:11:40酉鸡
日期:2015-01-10 21:31:442015年辞旧岁徽章
日期:2015-03-03 16:54:15
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2014-07-01 16:23 |只看该作者 |倒序浏览
  1. bool pci_bus_read_dev_vendor_id(struct pci_bus *bus, int devfn, u32 *l,
  2.                  int crs_timeout)
  3. {
  4.     int delay = 1;

  5.     if (pci_bus_read_config_dword(bus, devfn, PCI_VENDOR_ID, l))
  6.         return false;

  7.     /* some broken boards return 0 or ~0 if a slot is empty: */
  8.     if (*l == 0xffffffff || *l == 0x00000000 ||
  9.         *l == 0x0000ffff || *l == 0xffff0000)
  10.         return false;

  11.     /* Configuration request Retry Status */
  12.     while (*l == 0xffff0001) {------------>0xffff0001 哪里来的?
  13.         if (!crs_timeout)
  14.             return false;

  15.         msleep(delay);
  16.         delay *= 2;
  17.         if (pci_bus_read_config_dword(bus, devfn, PCI_VENDOR_ID, l))
  18.             return false;
  19.         /* Card hasn't responded in 60 seconds?  Must be stuck. */
  20.         if (delay > crs_timeout) {
  21.             printk(KERN_WARNING "pci %04x:%02x:%02x.%d: not "
  22.                     "responding\n", pci_domain_nr(bus),
  23.                     bus->number, PCI_SLOT(devfn),
  24.                     PCI_FUNC(devfn));
  25.             return false;
  26.         }
  27.     }

  28.     return true;
  29. }
  30. EXPORT_SYMBOL(pci_bus_read_dev_vendor_id);
复制代码
求解,谢谢!

论坛徽章:
0
2 [报告]
发表于 2014-07-01 19:47 |只看该作者
求解什么》》?

论坛徽章:
4
酉鸡
日期:2014-03-21 23:19:50狮子座
日期:2014-08-01 22:11:40酉鸡
日期:2015-01-10 21:31:442015年辞旧岁徽章
日期:2015-03-03 16:54:15
3 [报告]
发表于 2014-07-02 08:07 |只看该作者
回复 2# EZWORD


    while (*l == 0xffff0001) {------------>0xffff0001 哪里来的?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP