Lines Matching refs:dev
77 struct pci_device *dev=NULL; in get_module_name_from_pcimap() local
81 for_each_pci_func(dev, domain) { in get_module_name_from_pcimap()
83 if (! dev->dev_info) { in get_module_name_from_pcimap()
84 dev->dev_info = zalloc(sizeof *dev->dev_info); in get_module_name_from_pcimap()
85 if (!dev->dev_info) in get_module_name_from_pcimap()
89 if (strlen(dev->dev_info->linux_kernel_module[i])==0) in get_module_name_from_pcimap()
90 strlcpy(dev->dev_info->linux_kernel_module[i], "unknown",7); in get_module_name_from_pcimap()
141 for_each_pci_func(dev, domain) { in get_module_name_from_pcimap()
142 if (int_vendor_id == dev->vendor && in get_module_name_from_pcimap()
143 int_product_id == dev->product && in get_module_name_from_pcimap()
144 (int_sub_product_id & dev->sub_product) in get_module_name_from_pcimap()
145 == dev->sub_product && in get_module_name_from_pcimap()
146 (int_sub_vendor_id & dev->sub_vendor) in get_module_name_from_pcimap()
147 == dev->sub_vendor) { in get_module_name_from_pcimap()
151 for (int i=0; i<dev->dev_info->linux_kernel_module_count; i++) { in get_module_name_from_pcimap()
154 if (strstr(dev->dev_info->linux_kernel_module[i], module_name)) { in get_module_name_from_pcimap()
161 strcpy(dev->dev_info->linux_kernel_module[dev->dev_info->linux_kernel_module_count], module_name); in get_module_name_from_pcimap()
162 dev->dev_info->linux_kernel_module_count++; in get_module_name_from_pcimap()
181 struct pci_device *dev; in get_class_name_from_pci_ids() local
186 for_each_pci_func(dev, domain) { in get_class_name_from_pci_ids()
188 if (!dev->dev_info) { in get_class_name_from_pci_ids()
189 dev->dev_info = zalloc(sizeof *dev->dev_info); in get_class_name_from_pci_ids()
190 if (!dev->dev_info) in get_class_name_from_pci_ids()
193 strlcpy(dev->dev_info->class_name, "unknown", 7); in get_class_name_from_pci_ids()
227 for_each_pci_func(dev, domain) { in get_class_name_from_pci_ids()
228 if (int_class_id_str == dev->class[2]) { in get_class_name_from_pci_ids()
229 strlcpy(dev->dev_info->class_name, class_name, in get_class_name_from_pci_ids()
232 strlcpy(dev->dev_info->category_name, class_name + 4, in get_class_name_from_pci_ids()
251 for_each_pci_func(dev, domain) { in get_class_name_from_pci_ids()
252 if (int_class_id_str == dev->class[2] && in get_class_name_from_pci_ids()
253 int_sub_class_id_str == dev->class[1]) in get_class_name_from_pci_ids()
254 strlcpy(dev->dev_info->class_name, sub_class_name, in get_class_name_from_pci_ids()
276 struct pci_device *dev; in get_name_from_pci_ids() local
285 for_each_pci_func(dev, domain) { in get_name_from_pci_ids()
287 if (!dev->dev_info) { in get_name_from_pci_ids()
288 dev->dev_info = zalloc(sizeof *dev->dev_info); in get_name_from_pci_ids()
289 if (!dev->dev_info) in get_name_from_pci_ids()
292 strlcpy(dev->dev_info->vendor_name, "unknown", 7); in get_name_from_pci_ids()
293 strlcpy(dev->dev_info->product_name, "unknown", 7); in get_name_from_pci_ids()
335 for_each_pci_func(dev, domain) { in get_name_from_pci_ids()
337 if (int_vendor_id == dev->vendor) { in get_name_from_pci_ids()
339 strlcpy(dev->dev_info->vendor_name, vendor, in get_name_from_pci_ids()
367 for_each_pci_func(dev, domain) { in get_name_from_pci_ids()
368 if (int_vendor_id == dev->vendor && in get_name_from_pci_ids()
369 int_product_id == dev->product) { in get_name_from_pci_ids()
370 strlcpy(dev->dev_info->vendor_name, vendor, in get_name_from_pci_ids()
372 strlcpy(dev->dev_info->product_name, product, in get_name_from_pci_ids()
402 for_each_pci_func(dev, domain) { in get_name_from_pci_ids()
403 if (int_vendor_id == dev->vendor && in get_name_from_pci_ids()
404 int_product_id == dev->product && in get_name_from_pci_ids()
405 int_sub_product_id == dev->sub_product && in get_name_from_pci_ids()
406 int_sub_vendor_id == dev->sub_vendor) { in get_name_from_pci_ids()
407 strlcpy(dev->dev_info->vendor_name, vendor, in get_name_from_pci_ids()
409 strlcpy(dev->dev_info->product_name, product, in get_name_from_pci_ids()
425 const struct pci_device *dev; in find_pci_device() local
430 for_each_pci_func(dev, domain) { in find_pci_device()
433 sid = dev->svid_sdid; in find_pci_device()
434 did = dev->vid_did; in find_pci_device()
438 dev->revision >= m->rid_min && dev->revision <= m->rid_max) { in find_pci_device()
441 dev->vendor, dev->product, dev->sub_vendor, in find_pci_device()
442 dev->sub_product, dev->revision); in find_pci_device()
541 struct pci_device *dev; in gather_additional_pci_config() local
549 for_each_pci_func3(dev, domain, pci_addr) { in gather_additional_pci_config()
550 if (!dev->dev_info) { in gather_additional_pci_config()
551 dev->dev_info = zalloc(sizeof *dev->dev_info); in gather_additional_pci_config()
552 if (!dev->dev_info) { in gather_additional_pci_config()
556 dev->dev_info->irq = pci_readb(pci_addr + 0x3c); in gather_additional_pci_config()
557 dev->dev_info->latency = pci_readb(pci_addr + 0x0d); in gather_additional_pci_config()
605 struct pci_device *dev=NULL; in get_module_name_from_alias() local
609 for_each_pci_func(dev, domain) { in get_module_name_from_alias()
611 if (! dev->dev_info) { in get_module_name_from_alias()
612 dev->dev_info = zalloc(sizeof *dev->dev_info); in get_module_name_from_alias()
613 if (!dev->dev_info) in get_module_name_from_alias()
617 if (strlen(dev->dev_info->linux_kernel_module[i])==0) in get_module_name_from_alias()
618 strlcpy(dev->dev_info->linux_kernel_module[i], "unknown",7); in get_module_name_from_alias()
701 for_each_pci_func(dev, domain) { in get_module_name_from_alias()
702 if (int_vendor_id == dev->vendor && in get_module_name_from_alias()
703 int_product_id == dev->product && in get_module_name_from_alias()
704 (int_sub_product_id & dev->sub_product) in get_module_name_from_alias()
705 == dev->sub_product && in get_module_name_from_alias()
706 (int_sub_vendor_id & dev->sub_vendor) in get_module_name_from_alias()
707 == dev->sub_vendor) { in get_module_name_from_alias()
711 for (int i=0; i<dev->dev_info->linux_kernel_module_count; i++) { in get_module_name_from_alias()
714 if (strstr(dev->dev_info->linux_kernel_module[i], module_name)) { in get_module_name_from_alias()
721 strcpy(dev->dev_info->linux_kernel_module[dev->dev_info->linux_kernel_module_count], module_name); in get_module_name_from_alias()
722 dev->dev_info->linux_kernel_module_count++; in get_module_name_from_alias()