| 607 | } |
| 608 | |
| 609 | rt_inline rt_bool_t only_one_child(struct rt_pci_bus *bus) |
| 610 | { |
| 611 | struct rt_pci_device *pdev; |
| 612 | |
| 613 | if (rt_pci_is_root_bus(bus)) |
| 614 | { |
| 615 | return RT_FALSE; |
| 616 | } |
| 617 | |
| 618 | pdev = bus->self; |
| 619 | |
| 620 | if (rt_pci_is_pcie(pdev)) |
| 621 | { |
| 622 | rt_uint16_t exp_type = pdev->exp_flags & PCIEM_FLAGS_TYPE; |
| 623 | |
| 624 | if (exp_type == PCIEM_TYPE_ROOT_PORT || |
| 625 | exp_type == PCIEM_TYPE_DOWNSTREAM_PORT || |
| 626 | exp_type == PCIEM_TYPE_PCIE_BRIDGE) |
| 627 | { |
| 628 | return RT_TRUE; |
| 629 | } |
| 630 | } |
| 631 | |
| 632 | return RT_FALSE; |
| 633 | } |
| 634 | |
| 635 | static int next_fn(struct rt_pci_bus *bus, struct rt_pci_device *pdev, int fn) |
| 636 | { |
no test coverage detected