Linux Kernel
3.7.1
|
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include "pci.h"
Go to the source code of this file.
DECLARE_RWSEM | ( | pci_bus_sem | ) |
EXPORT_SYMBOL | ( | pci_get_domain_bus_and_slot | ) |
EXPORT_SYMBOL | ( | pci_dev_present | ) |
EXPORT_SYMBOL | ( | pci_find_bus | ) |
EXPORT_SYMBOL | ( | pci_find_next_bus | ) |
EXPORT_SYMBOL | ( | pci_get_device | ) |
EXPORT_SYMBOL | ( | pci_get_subsys | ) |
EXPORT_SYMBOL | ( | pci_get_slot | ) |
EXPORT_SYMBOL | ( | pci_get_class | ) |
EXPORT_SYMBOL_GPL | ( | pci_bus_sem | ) |
int pci_dev_present | ( | const struct pci_device_id * | ids | ) |
pci_dev_present - Returns 1 if device matching the device list is present, 0 if not. : A pointer to a null terminated list of struct pci_device_id structures that describe the type of PCI device the caller is trying to find.
Obvious fact: You do not have a reference to any device that might be found by this function, so if that device is removed from the system right after this function is finished, the value will be stale. Use this function to find devices that are usually built into a system, or for a general hint as to if another device happens to be present at this specific moment in time.
pci_find_bus - locate PCI bus from a given domain and bus number : number of PCI domain to search : number of desired PCI bus
Given a PCI bus number and domain number, the desired PCI bus is located in the global list of PCI buses. If the bus is found, a pointer to its data structure is returned. If no bus is found, NULL is returned.
|
read |
pci_get_device - begin or continue searching for a PCI device by vendor/device id : PCI vendor id to match, or PCI_ANY_ID to match all vendor ids : PCI device id to match, or PCI_ANY_ID to match all device ids : Previous PCI device found in search, or NULL for new search.
Iterates through the list of known PCI devices. If a PCI device is found with a matching and , the reference count to the device is incremented and a pointer to its device structure is returned. Otherwise, NULL is returned. A new search is initiated by passing NULL as the argument. Otherwise if is not NULL, searches continue from next device on the global list. The reference count for is always decremented if it is not NULL.
|
read |
pci_get_domain_bus_and_slot - locate PCI device for a given PCI domain (segment), bus, and slot : PCI domain/segment on which the PCI device resides. : PCI bus on which desired PCI device resides : 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.
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.
pci_get_slot - locate PCI device for a given PCI slot : PCI bus on which desired PCI device resides : 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.
Given a PCI 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.
|
read |
pci_get_subsys - begin or continue searching for a PCI device by vendor/subvendor/device/subdevice id : PCI vendor id to match, or PCI_ANY_ID to match all vendor ids : PCI device id to match, or PCI_ANY_ID to match all device ids : PCI subsystem vendor id to match, or PCI_ANY_ID to match all vendor ids : PCI subsystem device id to match, or PCI_ANY_ID to match all device ids : Previous PCI device found in search, or NULL for new search.
Iterates through the list of known PCI devices. If a PCI device is found with a matching , , and , 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 argument. Otherwise if is not NULL, searches continue from next device on the global list. The reference count for is always decremented if it is not NULL.