Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
pci.h File Reference
#include <linux/workqueue.h>

Go to the source code of this file.

Data Structures

struct  pci_platform_pm_ops
 
struct  pci_vpd_ops
 
struct  pci_vpd
 
struct  pci_slot_attribute
 
struct  pci_sriov
 
struct  pci_dev_reset_methods
 

Macros

#define PCI_CFG_SPACE_SIZE   256
 
#define PCI_CFG_SPACE_EXP_SIZE   4096
 
#define pci_bus_attrs   NULL
 
#define to_pci_slot(s)   container_of(s, struct pci_slot, kobj)
 
#define to_pci_slot_attr(s)   container_of(s, struct pci_slot_attribute, attr)
 

Enumerations

enum  pci_bar_type { pci_bar_unknown, pci_bar_io, pci_bar_mem32, pci_bar_mem64 }
 

Functions

int pci_uevent (struct device *dev, struct kobj_uevent_env *env)
 
int pci_create_sysfs_dev_files (struct pci_dev *pdev)
 
void pci_remove_sysfs_dev_files (struct pci_dev *pdev)
 
void pci_cleanup_rom (struct pci_dev *dev)
 
int pci_probe_reset_function (struct pci_dev *dev)
 
int pci_set_platform_pm (struct pci_platform_pm_ops *ops)
 
void pci_update_current_state (struct pci_dev *dev, pci_power_t state)
 
void pci_power_up (struct pci_dev *dev)
 
void pci_disable_enabled_device (struct pci_dev *dev)
 
int pci_finish_runtime_suspend (struct pci_dev *dev)
 
int __pci_pme_wakeup (struct pci_dev *dev, void *ign)
 
void pci_wakeup_bus (struct pci_bus *bus)
 
void pci_config_pm_runtime_get (struct pci_dev *dev)
 
void pci_config_pm_runtime_put (struct pci_dev *dev)
 
void pci_pm_init (struct pci_dev *dev)
 
void platform_pci_wakeup_init (struct pci_dev *dev)
 
void pci_allocate_cap_save_buffers (struct pci_dev *dev)
 
void pci_free_cap_save_buffers (struct pci_dev *dev)
 
int pci_vpd_pci22_init (struct pci_dev *dev)
 
int pci_hp_add_bridge (struct pci_dev *dev)
 
void pci_realloc_get_opt (char *)
 
bool pci_bus_read_dev_vendor_id (struct pci_bus *bus, int devfn, u32 *pl, int crs_timeout)
 
int pci_setup_device (struct pci_dev *dev)
 
int __pci_read_base (struct pci_dev *dev, enum pci_bar_type type, struct resource *res, unsigned int reg)
 
int pci_resource_bar (struct pci_dev *dev, int resno, enum pci_bar_type *type)
 
int pci_bus_add_child (struct pci_bus *bus)
 
void pci_enable_ari (struct pci_dev *dev)
 
void pci_reassigndev_resource_alignment (struct pci_dev *dev)
 
void pci_disable_bridge_window (struct pci_dev *dev)
 
unsigned long pci_cardbus_resource_alignment (struct resource *)
 
void pci_enable_acs (struct pci_dev *dev)
 

Variables

struct rw_semaphore pci_bus_sem
 
raw_spinlock_t pci_lock
 
unsigned int pci_pm_d3_delay
 
struct device_attribute pci_dev_attrs []
 
struct device_attribute pcibus_dev_attrs []
 
struct ksetpci_slots_kset
 

Macro Definition Documentation

#define pci_bus_attrs   NULL

Definition at line 165 of file pci.h.

#define PCI_CFG_SPACE_EXP_SIZE   4096

Definition at line 7 of file pci.h.

#define PCI_CFG_SPACE_SIZE   256

Definition at line 6 of file pci.h.

#define to_pci_slot (   s)    container_of(s, struct pci_slot, kobj)

Definition at line 190 of file pci.h.

#define to_pci_slot_attr (   s)    container_of(s, struct pci_slot_attribute, attr)

Definition at line 199 of file pci.h.

Enumeration Type Documentation

Enumerator:
pci_bar_unknown 
pci_bar_io 
pci_bar_mem32 
pci_bar_mem64 

Definition at line 201 of file pci.h.

Function Documentation

int __pci_pme_wakeup ( struct pci_dev dev,
void ign 
)
int __pci_read_base ( struct pci_dev dev,
enum pci_bar_type  type,
struct resource res,
unsigned int  pos 
)

pci_read_base - read a PCI BAR : the PCI device : type of the BAR : resource buffer to be filled in : BAR position in the config space

Returns 1 if the BAR is 64-bit, or 0 if 32-bit.

Definition at line 168 of file probe.c.

void pci_allocate_cap_save_buffers ( struct pci_dev dev)

pci_allocate_cap_save_buffers - allocate buffers for saving capabilities : the PCI device

Definition at line 2019 of file pci.c.

int pci_bus_add_child ( struct pci_bus bus)

pci_bus_add_child - add a child bus : bus to add

This adds sysfs entries for a single bus

Definition at line 189 of file bus.c.

bool pci_bus_read_dev_vendor_id ( struct pci_bus bus,
int  devfn,
u32 pl,
int  crs_timeout 
)

Definition at line 1202 of file probe.c.

unsigned long pci_cardbus_resource_alignment ( struct resource )

Definition at line 945 of file setup-bus.c.

void pci_cleanup_rom ( struct pci_dev pdev)

pci_cleanup_rom - free the ROM copy created by pci_map_rom_copy : pointer to pci device struct

Free the copied ROM if we allocated one.

Definition at line 197 of file rom.c.

void pci_config_pm_runtime_get ( struct pci_dev dev)

Definition at line 1861 of file pci.c.

void pci_config_pm_runtime_put ( struct pci_dev dev)

Definition at line 1883 of file pci.c.

int pci_create_sysfs_dev_files ( struct pci_dev pdev)

Definition at line 1226 of file pci-sysfs.c.

void pci_disable_bridge_window ( struct pci_dev dev)

Definition at line 135 of file setup-res.c.

void pci_disable_enabled_device ( struct pci_dev dev)

pci_disable_enabled_device - Disable device without updating enable_cnt : PCI device to disable

NOTE: This function is a backend of PCI power management routines and is not supposed to be called drivers.

Definition at line 1366 of file pci.c.

void pci_enable_acs ( struct pci_dev dev)

pci_enable_acs - enable ACS if hardware support it : the PCI device

Definition at line 2318 of file pci.c.

void pci_enable_ari ( struct pci_dev dev)

pci_enable_ari - enable ARI forwarding if hardware support it : the PCI device

Definition at line 2048 of file pci.c.

int pci_finish_runtime_suspend ( struct pci_dev dev)

pci_finish_runtime_suspend - Carry out PCI-specific part of runtime suspend. : PCI device being suspended.

Prepare to generate wake-up events at run time and put it into a low power state.

Definition at line 1804 of file pci.c.

void pci_free_cap_save_buffers ( struct pci_dev dev)

Definition at line 2035 of file pci.c.

int pci_hp_add_bridge ( struct pci_dev dev)

Definition at line 7 of file hotplug-pci.c.

void pci_pm_init ( struct pci_dev dev)

pci_pm_init - Initialize PM functions of given PCI device : PCI device to handle.

Definition at line 1897 of file pci.c.

void pci_power_up ( struct pci_dev dev)

pci_power_up - Put the given device into D0 forcibly : PCI device to power up

Definition at line 632 of file pci.c.

int pci_probe_reset_function ( struct pci_dev dev)

pci_probe_reset_function - check whether the device can be safely reset : PCI device to reset

Some devices allow an individual function to be reset without affecting other functions in the same device. The PCI device must be responsive to PCI config space in order to use this function.

Returns 0 if the device function can be reset or negative if the device doesn't support resetting a single function.

Definition at line 3336 of file pci.c.

void pci_realloc_get_opt ( char )

Definition at line 1350 of file setup-bus.c.

void pci_reassigndev_resource_alignment ( struct pci_dev dev)

Definition at line 3763 of file pci.c.

void pci_remove_sysfs_dev_files ( struct pci_dev pdev)

pci_remove_sysfs_dev_files - cleanup PCI specific sysfs files : device whose entries we should free

Cleanup when is removed from sysfs.

Definition at line 1332 of file pci-sysfs.c.

int pci_resource_bar ( struct pci_dev dev,
int  resno,
enum pci_bar_type type 
)

pci_resource_bar - get position of the BAR associated with a resource : the PCI device : the resource number : the BAR type to be filled in

Returns BAR position in config space, or 0 if the BAR is invalid.

Definition at line 3592 of file pci.c.

int pci_set_platform_pm ( struct pci_platform_pm_ops ops)

Definition at line 450 of file pci.c.

int pci_setup_device ( struct pci_dev dev)

pci_setup_device - fill in class and map information of a device : the device structure to fill

Initialize the device structure with information about the device's vendor,class,memory and IO-space addresses,IRQ lines etc. Called at initialisation of the PCI subsystem and by CardBus services. Returns 0 on success and negative if unknown type of device (not normal, bridge or CardBus).

Definition at line 963 of file probe.c.

int pci_uevent ( struct device dev,
struct kobj_uevent_env env 
)

Definition at line 6 of file hotplug.c.

void pci_update_current_state ( struct pci_dev dev,
pci_power_t  state 
)

pci_update_current_state - Read PCI power state of given device from its PCI PM registers and cache it : PCI device to handle. : State to cache in case the device doesn't have the PM capability

Definition at line 606 of file pci.c.

int pci_vpd_pci22_init ( struct pci_dev dev)

Definition at line 362 of file access.c.

void pci_wakeup_bus ( struct pci_bus bus)

pci_wakeup_bus - Walk given bus and wake up devices on it : Top bus of the subtree to walk.

Definition at line 1508 of file pci.c.

void platform_pci_wakeup_init ( struct pci_dev dev)

platform_pci_wakeup_init - init platform wakeup if present : PCI device

Some devices don't have PCI PM caps but can still generate wakeup events through platform methods (like ACPI events). If supports platform wakeup events, set the device flag to indicate as much. This may be redundant if the device also supports PCI PM caps, but double initialization should be safe in that case.

Definition at line 1973 of file pci.c.

Variable Documentation

struct rw_semaphore pci_bus_sem
struct device_attribute pci_dev_attrs[]

Definition at line 407 of file pci-sysfs.c.

raw_spinlock_t pci_lock
unsigned int pci_pm_d3_delay

Definition at line 40 of file pci.c.

struct kset* pci_slots_kset

Definition at line 15 of file slot.c.

struct device_attribute pcibus_dev_attrs[]

Definition at line 437 of file pci-sysfs.c.