Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/pci/pci_subr.c
Show First 20 Lines • Show All 127 Lines • ▼ Show 20 Lines | host_pcib_get_busno(pci_read_config_fn read_config, int bus, int slot, int func, | ||||
default: | default: | ||||
/* Don't know how to read bus number. */ | /* Don't know how to read bus number. */ | ||||
return 0; | return 0; | ||||
} | } | ||||
return 1; | return 1; | ||||
} | } | ||||
#ifdef NEW_PCIB | |||||
/* | /* | ||||
* Return a pointer to a pretty name for a PCI device. If the device | * Return a pointer to a pretty name for a PCI device. If the device | ||||
* has a driver attached, the device's name is used, otherwise a name | * has a driver attached, the device's name is used, otherwise a name | ||||
* is generated from the device's PCI address. | * is generated from the device's PCI address. | ||||
*/ | */ | ||||
const char * | const char * | ||||
pcib_child_name(device_t child) | pcib_child_name(device_t child) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 232 Lines • ▼ Show 20 Lines | if (domain < 0 || domain > PCI_DOMAINMAX) | ||||
return (EINVAL); | return (EINVAL); | ||||
#ifdef INVARIANTS | #ifdef INVARIANTS | ||||
d = pci_find_domain(domain); | d = pci_find_domain(domain); | ||||
KASSERT(rman_is_region_manager(r, &d->pd_bus_rman), ("bad resource")); | KASSERT(rman_is_region_manager(r, &d->pd_bus_rman), ("bad resource")); | ||||
#endif | #endif | ||||
return (rman_release_resource(r)); | return (rman_release_resource(r)); | ||||
} | } | ||||
#endif /* PCI_RES_BUS */ | #endif /* PCI_RES_BUS */ | ||||
#endif /* NEW_PCIB */ |