---
name: "pci_get_domain_bus_and_slot"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/pci_get_domain_bus_and_slot"
---

# pci\_get\_domain\_bus\_and\_slot(9)

locate PCI device for a given PCI domain (segment), bus, and slot

## NAME

pci\_get\_domain\_bus\_and\_slot - locate PCI device for a given PCI domain (segment), bus, and slot

## SYNOPSIS

**struct pci\_dev \* pci\_get\_domain\_bus\_and\_slot(int** *domain***, unsigned int** *bus***, unsigned int** *devfn***);**

## ARGUMENTS

*domain*

PCI domain/segment on which the PCI device resides.

*bus*

PCI bus on which desired PCI device resides

*devfn*

encodes number of PCI slot in which the desired PCI device resides and the logical device number within that slot in case of multi-function devices.

## DESCRIPTION

Given a PCI domain, bus, and slot/function number, the desired PCI device is located in the list of PCI devices. If the device is found, its reference count is increased and this function returns a pointer to its data structure. The caller must decrement the reference count by calling **pci\_dev\_put**. If no device is found, **NULL** is returned.

## COPYRIGHT
