Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/pci/pcib_support.c
Show First 20 Lines • Show All 53 Lines • ▼ Show 20 Lines | pcib_maxfuncs(device_t dev) | ||||
return (PCI_FUNCMAX); | return (PCI_FUNCMAX); | ||||
} | } | ||||
int | int | ||||
pcib_get_id(device_t pcib, device_t dev, enum pci_id_type type, uintptr_t *id) | pcib_get_id(device_t pcib, device_t dev, enum pci_id_type type, uintptr_t *id) | ||||
{ | { | ||||
uint8_t bus, slot, func; | uint8_t bus, slot, func; | ||||
if (type == PCI_ID_OFW_IOMMU) | |||||
return (PCI_GET_ID(device_get_parent(pcib), dev, type, id)); | |||||
if (type != PCI_ID_RID) | if (type != PCI_ID_RID) | ||||
return (ENXIO); | return (ENXIO); | ||||
bus = pci_get_bus(dev); | bus = pci_get_bus(dev); | ||||
slot = pci_get_slot(dev); | slot = pci_get_slot(dev); | ||||
func = pci_get_function(dev); | func = pci_get_function(dev); | ||||
*id = (PCI_RID(bus, slot, func)); | *id = (PCI_RID(bus, slot, func)); | ||||
Show All 12 Lines |