---
name: "pci_get_subsys"
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_subsys"
---

# pci\_get\_subsys(9)

begin or continue searching for a PCI device by vendor/subvendor/device/subdevice id

## NAME

pci\_get\_subsys - begin or continue searching for a PCI device by vendor/subvendor/device/subdevice id

## SYNOPSIS

**struct pci\_dev \* pci\_get\_subsys(unsigned int** *vendor***, unsigned int** *device***, unsigned int** *ss\_vendor***, unsigned int** *ss\_device***, struct pci\_dev \*** *from***);**

## ARGUMENTS

*vendor*

PCI vendor id to match, or **PCI\_ANY\_ID** to match all vendor ids

*device*

PCI device id to match, or **PCI\_ANY\_ID** to match all device ids

*ss\_vendor*

PCI subsystem vendor id to match, or **PCI\_ANY\_ID** to match all vendor ids

*ss\_device*

PCI subsystem device id to match, or **PCI\_ANY\_ID** to match all device ids

*from*

Previous PCI device found in search, or **NULL** for new search.

## DESCRIPTION

Iterates through the list of known PCI devices. If a PCI device is found with a matching *vendor*, *device*, *ss\_vendor* and *ss\_device*, a pointer to its device structure is returned, and the reference count to the device is incremented. Otherwise, **NULL** is returned. A new search is initiated by passing **NULL** as the *from* argument. Otherwise if *from* is not **NULL**, searches continue from next device on the global list. The reference count for *from* is always decremented if it is not **NULL**.

## COPYRIGHT
