| 608 | } |
| 609 | |
| 610 | int |
| 611 | dmar_dev_depth(device_t child) |
| 612 | { |
| 613 | devclass_t pci_class; |
| 614 | device_t bus, pcib; |
| 615 | int depth; |
| 616 | |
| 617 | pci_class = devclass_find("pci"); |
| 618 | for (depth = 1; ; depth++) { |
| 619 | bus = device_get_parent(child); |
| 620 | pcib = device_get_parent(bus); |
| 621 | if (device_get_devclass(device_get_parent(pcib)) != |
| 622 | pci_class) |
| 623 | return (depth); |
| 624 | child = pcib; |
| 625 | } |
| 626 | } |
| 627 | |
| 628 | void |
| 629 | dmar_dev_path(device_t child, int *busno, void *path1, int depth) |
no test coverage detected