Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
pci.h File Reference
#include <linux/mod_devicetable.h>
#include <linux/types.h>
#include <linux/init.h>
#include <linux/ioport.h>
#include <linux/list.h>
#include <linux/compiler.h>
#include <linux/errno.h>
#include <linux/kobject.h>
#include <linux/atomic.h>
#include <linux/device.h>
#include <linux/io.h>
#include <linux/irqreturn.h>
#include <uapi/linux/pci.h>
#include <linux/pci_ids.h>
#include <asm/pci.h>

Go to the source code of this file.

Data Structures

struct  pci_slot
 
struct  pci_cap_saved_data
 
struct  pci_cap_saved_state
 
struct  pci_dev
 
struct  pci_host_bridge_window
 
struct  pci_host_bridge
 
struct  pci_bus_resource
 
struct  pci_bus
 
struct  pci_ops
 
struct  pci_bus_region
 
struct  pci_dynids
 
struct  pci_error_handlers
 
struct  pci_driver
 
struct  pci_fixup
 

Macros

#define PCI_DMA_BIDIRECTIONAL   0
 
#define PCI_DMA_TODEVICE   1
 
#define PCI_DMA_FROMDEVICE   2
 
#define PCI_DMA_NONE   3
 
#define PCI_BRIDGE_RESOURCE_NUM   4
 
#define PCI_D0   ((pci_power_t __force) 0)
 
#define PCI_D1   ((pci_power_t __force) 1)
 
#define PCI_D2   ((pci_power_t __force) 2)
 
#define PCI_D3hot   ((pci_power_t __force) 3)
 
#define PCI_D3cold   ((pci_power_t __force) 4)
 
#define PCI_UNKNOWN   ((pci_power_t __force) 5)
 
#define PCI_POWER_ERROR   ((pci_power_t __force) -1)
 
#define PCI_PM_D2_DELAY   200
 
#define PCI_PM_D3_WAIT   10
 
#define PCI_PM_D3COLD_WAIT   100
 
#define PCI_PM_BUS_WAIT   50
 
#define to_pci_dev(n)   container_of(n, struct pci_dev, dev)
 
#define for_each_pci_dev(d)   while ((d = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, d)) != NULL)
 
#define to_pci_host_bridge(n)   container_of(n, struct pci_host_bridge, dev)
 
#define PCI_SUBTRACTIVE_DECODE   0x1
 
#define PCI_REGION_FLAG_MASK   0x0fU /* These bits of resource flags tell us the PCI region flags */
 
#define pci_bus_b(n)   list_entry(n, struct pci_bus, node)
 
#define to_pci_bus(n)   container_of(n, struct pci_bus, dev)
 
#define PCIBIOS_SUCCESSFUL   0x00
 
#define PCIBIOS_FUNC_NOT_SUPPORTED   0x81
 
#define PCIBIOS_BAD_VENDOR_ID   0x83
 
#define PCIBIOS_DEVICE_NOT_FOUND   0x86
 
#define PCIBIOS_BAD_REGISTER_NUMBER   0x87
 
#define PCIBIOS_SET_FAILED   0x88
 
#define PCIBIOS_BUFFER_TOO_SMALL   0x89
 
#define to_pci_driver(drv)   container_of(drv, struct pci_driver, driver)
 
#define DEFINE_PCI_DEVICE_TABLE(_table)   const struct pci_device_id _table[] __devinitconst
 
#define PCI_DEVICE(vend, dev)
 
#define PCI_DEVICE_CLASS(dev_class, dev_class_mask)
 
#define PCI_VDEVICE(vendor, device)
 
#define _PCI_NOP(o, s, t)
 
#define _PCI_NOP_ALL(o, x)
 
#define pci_dev_present(ids)   (0)
 
#define no_pci_devices()   (1)
 
#define pci_dev_put(dev)   do { } while (0)
 
#define pci_dma_burst_advice(pdev, strat, strategy_parameter)   do { } while (0)
 
#define dev_is_pci(d)   (false)
 
#define dev_is_pf(d)   (false)
 
#define dev_num_vf(d)   (0)
 
#define PCIBIOS_MAX_MEM_32   (-1)
 
#define pci_resource_start(dev, bar)   ((dev)->resource[(bar)].start)
 
#define pci_resource_end(dev, bar)   ((dev)->resource[(bar)].end)
 
#define pci_resource_flags(dev, bar)   ((dev)->resource[(bar)].flags)
 
#define pci_resource_len(dev, bar)
 
#define DECLARE_PCI_FIXUP_SECTION(section, name, vendor, device, class, class_shift, hook)
 
#define DECLARE_PCI_FIXUP_CLASS_EARLY(vendor, device, class,class_shift, hook)
 
#define DECLARE_PCI_FIXUP_CLASS_HEADER(vendor, device, class,class_shift, hook)
 
#define DECLARE_PCI_FIXUP_CLASS_FINAL(vendor, device, class,class_shift, hook)
 
#define DECLARE_PCI_FIXUP_CLASS_ENABLE(vendor, device, class,class_shift, hook)
 
#define DECLARE_PCI_FIXUP_CLASS_RESUME(vendor, device, class,class_shift, hook)
 
#define DECLARE_PCI_FIXUP_CLASS_RESUME_EARLY(vendor, device, class, class_shift, hook)
 
#define DECLARE_PCI_FIXUP_CLASS_SUSPEND(vendor, device, class,class_shift, hook)
 
#define DECLARE_PCI_FIXUP_EARLY(vendor, device, hook)
 
#define DECLARE_PCI_FIXUP_HEADER(vendor, device, hook)
 
#define DECLARE_PCI_FIXUP_FINAL(vendor, device, hook)
 
#define DECLARE_PCI_FIXUP_ENABLE(vendor, device, hook)
 
#define DECLARE_PCI_FIXUP_RESUME(vendor, device, hook)
 
#define DECLARE_PCI_FIXUP_RESUME_EARLY(vendor, device, hook)
 
#define DECLARE_PCI_FIXUP_SUSPEND(vendor, device, hook)
 
#define PCIPCI_FAIL   1 /* No PCI PCI DMA */
 
#define PCIPCI_TRITON   2
 
#define PCIPCI_NATOMA   4
 
#define PCIPCI_VIAETBF   8
 
#define PCIPCI_VSFX   16
 
#define PCIPCI_ALIMAGIK   32 /* Need low latency setting */
 
#define PCIAGP_FAIL   64 /* No PCI to AGP DMA */
 
#define PCI_VPD_LRDT   0x80 /* Large Resource Data Type */
 
#define PCI_VPD_LRDT_ID(x)   (x | PCI_VPD_LRDT)
 
#define PCI_VPD_LTIN_ID_STRING   0x02 /* Identifier String */
 
#define PCI_VPD_LTIN_RO_DATA   0x10 /* Read-Only Data */
 
#define PCI_VPD_LTIN_RW_DATA   0x11 /* Read-Write Data */
 
#define PCI_VPD_LRDT_ID_STRING   PCI_VPD_LRDT_ID(PCI_VPD_LTIN_ID_STRING)
 
#define PCI_VPD_LRDT_RO_DATA   PCI_VPD_LRDT_ID(PCI_VPD_LTIN_RO_DATA)
 
#define PCI_VPD_LRDT_RW_DATA   PCI_VPD_LRDT_ID(PCI_VPD_LTIN_RW_DATA)
 
#define PCI_VPD_STIN_END   0x78 /* End */
 
#define PCI_VPD_SRDT_END   PCI_VPD_STIN_END
 
#define PCI_VPD_SRDT_TIN_MASK   0x78
 
#define PCI_VPD_SRDT_LEN_MASK   0x07
 
#define PCI_VPD_LRDT_TAG_SIZE   3
 
#define PCI_VPD_SRDT_TAG_SIZE   1
 
#define PCI_VPD_INFO_FLD_HDR_SIZE   3
 
#define PCI_VPD_RO_KEYWORD_PARTNO   "PN"
 
#define PCI_VPD_RO_KEYWORD_MFR_ID   "MN"
 
#define PCI_VPD_RO_KEYWORD_VENDOR0   "V0"
 
#define PCI_VPD_RO_KEYWORD_CHKSUM   "RV"
 

Typedefs

typedef int __bitwise pci_power_t
 
typedef unsigned int __bitwise pci_channel_state_t
 
typedef unsigned int __bitwise pcie_reset_state_t
 
typedef unsigned short __bitwise pci_dev_flags_t
 
typedef unsigned short __bitwise pci_bus_flags_t
 
typedef unsigned int __bitwise pci_ers_result_t
 

Enumerations

enum  pci_mmap_state { pci_mmap_io, pci_mmap_mem }
 
enum  {
  PCI_STD_RESOURCES, PCI_STD_RESOURCE_END = 5, PCI_ROM_RESOURCE, PCI_BRIDGE_RESOURCES,
  PCI_BRIDGE_RESOURCE_END, PCI_NUM_RESOURCES, DEVICE_COUNT_RESOURCE = PCI_NUM_RESOURCES
}
 
enum  pci_channel_state { pci_channel_io_normal = (__force pci_channel_state_t) 1, pci_channel_io_frozen = (__force pci_channel_state_t) 2, pci_channel_io_perm_failure = (__force pci_channel_state_t) 3 }
 
enum  pcie_reset_state { pcie_deassert_reset = (__force pcie_reset_state_t) 1, pcie_warm_reset = (__force pcie_reset_state_t) 2, pcie_hot_reset = (__force pcie_reset_state_t) 3 }
 
enum  pci_dev_flags { PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG = (__force pci_dev_flags_t) 1, PCI_DEV_FLAGS_NO_D3 = (__force pci_dev_flags_t) 2, PCI_DEV_FLAGS_ASSIGNED = (__force pci_dev_flags_t) 4 }
 
enum  pci_irq_reroute_variant { INTEL_IRQ_REROUTE_VARIANT = 1, MAX_IRQ_REROUTE_VARIANTS = 3 }
 
enum  pci_bus_flags { PCI_BUS_FLAGS_NO_MSI = (__force pci_bus_flags_t) 1, PCI_BUS_FLAGS_NO_MMRBC = (__force pci_bus_flags_t) 2 }
 
enum  pci_bus_speed {
  PCI_SPEED_33MHz = 0x00, PCI_SPEED_66MHz = 0x01, PCI_SPEED_66MHz_PCIX = 0x02, PCI_SPEED_100MHz_PCIX = 0x03,
  PCI_SPEED_133MHz_PCIX = 0x04, PCI_SPEED_66MHz_PCIX_ECC = 0x05, PCI_SPEED_100MHz_PCIX_ECC = 0x06, PCI_SPEED_133MHz_PCIX_ECC = 0x07,
  PCI_SPEED_66MHz_PCIX_266 = 0x09, PCI_SPEED_100MHz_PCIX_266 = 0x0a, PCI_SPEED_133MHz_PCIX_266 = 0x0b, AGP_UNKNOWN = 0x0c,
  AGP_1X = 0x0d, AGP_2X = 0x0e, AGP_4X = 0x0f, AGP_8X = 0x10,
  PCI_SPEED_66MHz_PCIX_533 = 0x11, PCI_SPEED_100MHz_PCIX_533 = 0x12, PCI_SPEED_133MHz_PCIX_533 = 0x13, PCIE_SPEED_2_5GT = 0x14,
  PCIE_SPEED_5_0GT = 0x15, PCIE_SPEED_8_0GT = 0x16, PCI_SPEED_UNKNOWN = 0xff
}
 
enum  pci_ers_result {
  PCI_ERS_RESULT_NONE = (__force pci_ers_result_t) 1, PCI_ERS_RESULT_CAN_RECOVER = (__force pci_ers_result_t) 2, PCI_ERS_RESULT_NEED_RESET = (__force pci_ers_result_t) 3, PCI_ERS_RESULT_DISCONNECT = (__force pci_ers_result_t) 4,
  PCI_ERS_RESULT_RECOVERED = (__force pci_ers_result_t) 5
}
 
enum  pci_fixup_pass {
  pci_fixup_early, pci_fixup_header, pci_fixup_final, pci_fixup_enable,
  pci_fixup_resume, pci_fixup_suspend, pci_fixup_resume_early
}
 

Functions

struct pci_devalloc_pci_dev (void)
 
void pci_set_host_bridge_release (struct pci_host_bridge *bridge, void(*release_fn)(struct pci_host_bridge *), void *release_data)
 
int raw_pci_read (unsigned int domain, unsigned int bus, unsigned int devfn, int reg, int len, u32 *val)
 
int raw_pci_write (unsigned int domain, unsigned int bus, unsigned int devfn, int reg, int len, u32 val)
 
void __iomempcim_iomap (struct pci_dev *pdev, int bar, unsigned long maxlen)
 
void pcim_iounmap (struct pci_dev *pdev, void __iomem *addr)
 
void __iomem *constpcim_iomap_table (struct pci_dev *pdev)
 
int pcim_iomap_regions (struct pci_dev *pdev, int mask, const char *name)
 
int pcim_iomap_regions_request_all (struct pci_dev *pdev, int mask, const char *name)
 
void pcim_iounmap_regions (struct pci_dev *pdev, int mask)
 
int pcibios_add_platform_entries (struct pci_dev *dev)
 
void pcibios_disable_device (struct pci_dev *dev)
 
void pcibios_set_master (struct pci_dev *dev)
 
int pcibios_set_pcie_reset_state (struct pci_dev *dev, enum pcie_reset_state state)
 
int pci_ext_cfg_avail (struct pci_dev *dev)
 
void __iomempci_ioremap_bar (struct pci_dev *pdev, int bar)
 
void pci_request_acs (void)
 
bool pci_acs_enabled (struct pci_dev *pdev, u16 acs_flags)
 
bool pci_acs_path_enabled (struct pci_dev *start, struct pci_dev *end, u16 acs_flags)
 
int pci_vpd_find_tag (const u8 *buf, unsigned int off, unsigned int len, u8 rdt)
 
int pci_vpd_find_info_keyword (const u8 *buf, unsigned int off, unsigned int len, const char *kw)
 
struct pci_devpci_find_upstream_pcie_bridge (struct pci_dev *pdev)
 

Variables

const charpci_power_names []
 
struct resource busn_resource
 
int pci_pci_problems
 
unsigned long pci_cardbus_io_size
 
unsigned long pci_cardbus_mem_size
 
u8 __devinitdata pci_dfl_cache_line_size
 
u8 pci_cache_line_size
 
unsigned long pci_hotplug_io_size
 
unsigned long pci_hotplug_mem_size
 

Macro Definition Documentation

#define _PCI_NOP (   o,
  s,
  t 
)
Value:
static inline int pci_##o##_config_##s(struct pci_dev *dev, \
int where, t val) \

Definition at line 1205 of file pci.h.

#define _PCI_NOP_ALL (   o,
  x 
)
Value:
_PCI_NOP(o, byte, u8 x) \
_PCI_NOP(o, word, u16 x) \
_PCI_NOP(o, dword, u32 x)

Definition at line 1210 of file pci.h.

#define DECLARE_PCI_FIXUP_CLASS_EARLY (   vendor,
  device,
  class,
  class_shift,
  hook 
)
Value:

Definition at line 1489 of file pci.h.

#define DECLARE_PCI_FIXUP_CLASS_ENABLE (   vendor,
  device,
  class,
  class_shift,
  hook 
)
Value:

Definition at line 1501 of file pci.h.

#define DECLARE_PCI_FIXUP_CLASS_FINAL (   vendor,
  device,
  class,
  class_shift,
  hook 
)
Value:

Definition at line 1497 of file pci.h.

#define DECLARE_PCI_FIXUP_CLASS_HEADER (   vendor,
  device,
  class,
  class_shift,
  hook 
)
Value:

Definition at line 1493 of file pci.h.

#define DECLARE_PCI_FIXUP_CLASS_RESUME (   vendor,
  device,
  class,
  class_shift,
  hook 
)
Value:

Definition at line 1505 of file pci.h.

#define DECLARE_PCI_FIXUP_CLASS_RESUME_EARLY (   vendor,
  device,
  class,
  class_shift,
  hook 
)
Value:
resume_early##vendor##device##hook, vendor, device, \
class, class_shift, hook)

Definition at line 1510 of file pci.h.

#define DECLARE_PCI_FIXUP_CLASS_SUSPEND (   vendor,
  device,
  class,
  class_shift,
  hook 
)
Value:

Definition at line 1515 of file pci.h.

#define DECLARE_PCI_FIXUP_EARLY (   vendor,
  device,
  hook 
)
Value:

Definition at line 1521 of file pci.h.

#define DECLARE_PCI_FIXUP_ENABLE (   vendor,
  device,
  hook 
)
Value:

Definition at line 1530 of file pci.h.

#define DECLARE_PCI_FIXUP_FINAL (   vendor,
  device,
  hook 
)
Value:

Definition at line 1527 of file pci.h.

#define DECLARE_PCI_FIXUP_HEADER (   vendor,
  device,
  hook 
)
Value:

Definition at line 1524 of file pci.h.

#define DECLARE_PCI_FIXUP_RESUME (   vendor,
  device,
  hook 
)
Value:

Definition at line 1533 of file pci.h.

#define DECLARE_PCI_FIXUP_RESUME_EARLY (   vendor,
  device,
  hook 
)
Value:

Definition at line 1537 of file pci.h.

#define DECLARE_PCI_FIXUP_SECTION (   section,
  name,
  vendor,
  device,
  class,
  class_shift,
  hook 
)
Value:
static const struct pci_fixup __pci_fixup_##name __used \
__attribute__((__section__(#section), aligned((sizeof(void *))))) \
= { vendor, device, class, class_shift, hook };

Definition at line 1483 of file pci.h.

#define DECLARE_PCI_FIXUP_SUSPEND (   vendor,
  device,
  hook 
)
Value:

Definition at line 1541 of file pci.h.

#define DEFINE_PCI_DEVICE_TABLE (   _table)    const struct pci_device_id _table[] __devinitconst

DEFINE_PCI_DEVICE_TABLE - macro used to describe a pci device table : device table name

This macro is used to create a struct pci_device_id array (a device table) in a generic manner.

Definition at line 590 of file pci.h.

#define dev_is_pci (   d)    (false)

Definition at line 1394 of file pci.h.

#define dev_is_pf (   d)    (false)

Definition at line 1395 of file pci.h.

#define dev_num_vf (   d)    (0)

Definition at line 1396 of file pci.h.

#define for_each_pci_dev (   d)    while ((d = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, d)) != NULL)

Definition at line 351 of file pci.h.

#define no_pci_devices (   void)    (1)

Definition at line 1239 of file pci.h.

#define PCI_BRIDGE_RESOURCE_NUM   4

Definition at line 82 of file pci.h.

#define pci_bus_b (   n)    list_entry(n, struct pci_bus, node)

Definition at line 433 of file pci.h.

#define PCI_D0   ((pci_power_t __force) 0)

Definition at line 97 of file pci.h.

#define PCI_D1   ((pci_power_t __force) 1)

Definition at line 98 of file pci.h.

#define PCI_D2   ((pci_power_t __force) 2)

Definition at line 99 of file pci.h.

#define PCI_D3cold   ((pci_power_t __force) 4)

Definition at line 101 of file pci.h.

#define PCI_D3hot   ((pci_power_t __force) 3)

Definition at line 100 of file pci.h.

#define pci_dev_present (   ids)    (0)

Definition at line 1238 of file pci.h.

#define pci_dev_put (   dev)    do { } while (0)

Definition at line 1240 of file pci.h.

#define PCI_DEVICE (   vend,
  dev 
)
Value:
.vendor = (vend), .device = (dev), \
.subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID

PCI_DEVICE - macro used to describe a specific pci device : the 16 bit PCI Vendor ID : the 16 bit PCI Device ID

This macro is used to create a struct pci_device_id that matches a specific device. The subvendor and subdevice fields will be set to PCI_ANY_ID.

Definition at line 602 of file pci.h.

#define PCI_DEVICE_CLASS (   dev_class,
  dev_class_mask 
)
Value:
.class = (dev_class), .class_mask = (dev_class_mask), \
.vendor = PCI_ANY_ID, .device = PCI_ANY_ID, \
.subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID

PCI_DEVICE_CLASS - macro used to describe a specific pci device class : the class, subclass, prog-if triple for this device : the class mask for this device

This macro is used to create a struct pci_device_id that matches a specific PCI class. The vendor, device, subvendor, and subdevice fields will be set to PCI_ANY_ID.

Definition at line 615 of file pci.h.

#define PCI_DMA_BIDIRECTIONAL   0

Definition at line 59 of file pci.h.

#define pci_dma_burst_advice (   pdev,
  strat,
  strategy_parameter 
)    do { } while (0)

Definition at line 1366 of file pci.h.

#define PCI_DMA_FROMDEVICE   2

Definition at line 61 of file pci.h.

#define PCI_DMA_NONE   3

Definition at line 62 of file pci.h.

#define PCI_DMA_TODEVICE   1

Definition at line 60 of file pci.h.

#define PCI_PM_BUS_WAIT   50

Definition at line 116 of file pci.h.

#define PCI_PM_D2_DELAY   200

Definition at line 113 of file pci.h.

#define PCI_PM_D3_WAIT   10

Definition at line 114 of file pci.h.

#define PCI_PM_D3COLD_WAIT   100

Definition at line 115 of file pci.h.

#define PCI_POWER_ERROR   ((pci_power_t __force) -1)

Definition at line 103 of file pci.h.

#define PCI_REGION_FLAG_MASK   0x0fU /* These bits of resource flags tell us the PCI region flags */

Definition at line 400 of file pci.h.

#define pci_resource_end (   dev,
  bar 
)    ((dev)->resource[(bar)].end)

Definition at line 1410 of file pci.h.

#define pci_resource_flags (   dev,
  bar 
)    ((dev)->resource[(bar)].flags)

Definition at line 1411 of file pci.h.

#define pci_resource_len (   dev,
  bar 
)
Value:
((pci_resource_start((dev), (bar)) == 0 && \
pci_resource_end((dev), (bar)) == \
pci_resource_start((dev), (bar))) ? 0 : \
\
(pci_resource_end((dev), (bar)) - \
pci_resource_start((dev), (bar)) + 1))

Definition at line 1412 of file pci.h.

#define pci_resource_start (   dev,
  bar 
)    ((dev)->resource[(bar)].start)

Definition at line 1409 of file pci.h.

#define PCI_SUBTRACTIVE_DECODE   0x1

Definition at line 392 of file pci.h.

#define PCI_UNKNOWN   ((pci_power_t __force) 5)

Definition at line 102 of file pci.h.

#define PCI_VDEVICE (   vendor,
  device 
)
Value:
PCI_VENDOR_ID_##vendor, (device), \

PCI_VDEVICE - macro used to describe a specific pci device in short form : the vendor name : the 16 bit PCI Device ID

This macro is used to create a struct pci_device_id that matches a specific PCI device. The subvendor, and subdevice fields will be set to PCI_ANY_ID. The macro allows the next field to follow as the device private data.

Definition at line 631 of file pci.h.

#define PCI_VPD_INFO_FLD_HDR_SIZE   3

Definition at line 1700 of file pci.h.

#define PCI_VPD_LRDT   0x80 /* Large Resource Data Type */

Definition at line 1677 of file pci.h.

#define PCI_VPD_LRDT_ID (   x)    (x | PCI_VPD_LRDT)

Definition at line 1678 of file pci.h.

#define PCI_VPD_LRDT_ID_STRING   PCI_VPD_LRDT_ID(PCI_VPD_LTIN_ID_STRING)

Definition at line 1685 of file pci.h.

#define PCI_VPD_LRDT_RO_DATA   PCI_VPD_LRDT_ID(PCI_VPD_LTIN_RO_DATA)

Definition at line 1686 of file pci.h.

#define PCI_VPD_LRDT_RW_DATA   PCI_VPD_LRDT_ID(PCI_VPD_LTIN_RW_DATA)

Definition at line 1687 of file pci.h.

#define PCI_VPD_LRDT_TAG_SIZE   3

Definition at line 1697 of file pci.h.

#define PCI_VPD_LTIN_ID_STRING   0x02 /* Identifier String */

Definition at line 1681 of file pci.h.

#define PCI_VPD_LTIN_RO_DATA   0x10 /* Read-Only Data */

Definition at line 1682 of file pci.h.

#define PCI_VPD_LTIN_RW_DATA   0x11 /* Read-Write Data */

Definition at line 1683 of file pci.h.

#define PCI_VPD_RO_KEYWORD_CHKSUM   "RV"

Definition at line 1705 of file pci.h.

#define PCI_VPD_RO_KEYWORD_MFR_ID   "MN"

Definition at line 1703 of file pci.h.

#define PCI_VPD_RO_KEYWORD_PARTNO   "PN"

Definition at line 1702 of file pci.h.

#define PCI_VPD_RO_KEYWORD_VENDOR0   "V0"

Definition at line 1704 of file pci.h.

#define PCI_VPD_SRDT_END   PCI_VPD_STIN_END

Definition at line 1692 of file pci.h.

#define PCI_VPD_SRDT_LEN_MASK   0x07

Definition at line 1695 of file pci.h.

#define PCI_VPD_SRDT_TAG_SIZE   1

Definition at line 1698 of file pci.h.

#define PCI_VPD_SRDT_TIN_MASK   0x78

Definition at line 1694 of file pci.h.

#define PCI_VPD_STIN_END   0x78 /* End */

Definition at line 1690 of file pci.h.

#define PCIAGP_FAIL   64 /* No PCI to AGP DMA */

Definition at line 1579 of file pci.h.

#define PCIBIOS_BAD_REGISTER_NUMBER   0x87

Definition at line 461 of file pci.h.

#define PCIBIOS_BAD_VENDOR_ID   0x83

Definition at line 459 of file pci.h.

#define PCIBIOS_BUFFER_TOO_SMALL   0x89

Definition at line 463 of file pci.h.

#define PCIBIOS_DEVICE_NOT_FOUND   0x86

Definition at line 460 of file pci.h.

#define PCIBIOS_FUNC_NOT_SUPPORTED   0x81

Definition at line 458 of file pci.h.

#define PCIBIOS_MAX_MEM_32   (-1)

Definition at line 1404 of file pci.h.

#define PCIBIOS_SET_FAILED   0x88

Definition at line 462 of file pci.h.

#define PCIBIOS_SUCCESSFUL   0x00

Definition at line 457 of file pci.h.

#define PCIPCI_ALIMAGIK   32 /* Need low latency setting */

Definition at line 1578 of file pci.h.

#define PCIPCI_FAIL   1 /* No PCI PCI DMA */

Definition at line 1573 of file pci.h.

#define PCIPCI_NATOMA   4

Definition at line 1575 of file pci.h.

#define PCIPCI_TRITON   2

Definition at line 1574 of file pci.h.

#define PCIPCI_VIAETBF   8

Definition at line 1576 of file pci.h.

#define PCIPCI_VSFX   16

Definition at line 1577 of file pci.h.

#define to_pci_bus (   n)    container_of(n, struct pci_bus, dev)

Definition at line 434 of file pci.h.

#define to_pci_dev (   n)    container_of(n, struct pci_dev, dev)

Definition at line 350 of file pci.h.

#define to_pci_driver (   drv)    container_of(drv, struct pci_driver, driver)

Definition at line 581 of file pci.h.

#define to_pci_host_bridge (   n)    container_of(n, struct pci_host_bridge, dev)

Definition at line 374 of file pci.h.

Typedef Documentation

typedef unsigned short __bitwise pci_bus_flags_t

Definition at line 165 of file pci.h.

typedef unsigned int __bitwise pci_channel_state_t

The pci_channel state describes connectivity between the CPU and the pci device. If some PCI bus between here and the pci device has crashed or locked up, this info is reflected here.

Definition at line 122 of file pci.h.

typedef unsigned short __bitwise pci_dev_flags_t

Definition at line 148 of file pci.h.

typedef unsigned int __bitwise pci_ers_result_t

PCI Error Recovery System (PCI-ERS). If a PCI device driver provides a set of callbacks in struct pci_error_handlers, then that device driver will be notified of PCI bus errors, and will be driven to recovery when an error occurs.

Definition at line 524 of file pci.h.

Definition at line 95 of file pci.h.

typedef unsigned int __bitwise pcie_reset_state_t

Definition at line 135 of file pci.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
PCI_STD_RESOURCES 
PCI_STD_RESOURCE_END 
PCI_ROM_RESOURCE 
PCI_BRIDGE_RESOURCES 
PCI_BRIDGE_RESOURCE_END 
PCI_NUM_RESOURCES 
DEVICE_COUNT_RESOURCE 

Definition at line 67 of file pci.h.

Enumerator:
PCI_BUS_FLAGS_NO_MSI 
PCI_BUS_FLAGS_NO_MMRBC 

Definition at line 166 of file pci.h.

Enumerator:
PCI_SPEED_33MHz 
PCI_SPEED_66MHz 
PCI_SPEED_66MHz_PCIX 
PCI_SPEED_100MHz_PCIX 
PCI_SPEED_133MHz_PCIX 
PCI_SPEED_66MHz_PCIX_ECC 
PCI_SPEED_100MHz_PCIX_ECC 
PCI_SPEED_133MHz_PCIX_ECC 
PCI_SPEED_66MHz_PCIX_266 
PCI_SPEED_100MHz_PCIX_266 
PCI_SPEED_133MHz_PCIX_266 
AGP_UNKNOWN 
AGP_1X 
AGP_2X 
AGP_4X 
AGP_8X 
PCI_SPEED_66MHz_PCIX_533 
PCI_SPEED_100MHz_PCIX_533 
PCI_SPEED_133MHz_PCIX_533 
PCIE_SPEED_2_5GT 
PCIE_SPEED_5_0GT 
PCIE_SPEED_8_0GT 
PCI_SPEED_UNKNOWN 

Definition at line 172 of file pci.h.

Enumerator:
pci_channel_io_normal 
pci_channel_io_frozen 
pci_channel_io_perm_failure 

Definition at line 124 of file pci.h.

Enumerator:
PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG 
PCI_DEV_FLAGS_NO_D3 
PCI_DEV_FLAGS_ASSIGNED 

Definition at line 149 of file pci.h.

Enumerator:
PCI_ERS_RESULT_NONE 
PCI_ERS_RESULT_CAN_RECOVER 
PCI_ERS_RESULT_NEED_RESET 
PCI_ERS_RESULT_DISCONNECT 
PCI_ERS_RESULT_RECOVERED 

Definition at line 526 of file pci.h.

Enumerator:
pci_fixup_early 
pci_fixup_header 
pci_fixup_final 
pci_fixup_enable 
pci_fixup_resume 
pci_fixup_suspend 
pci_fixup_resume_early 

Definition at line 1472 of file pci.h.

Enumerator:
INTEL_IRQ_REROUTE_VARIANT 
MAX_IRQ_REROUTE_VARIANTS 

Definition at line 160 of file pci.h.

Enumerator:
pci_mmap_io 
pci_mmap_mem 

Definition at line 53 of file pci.h.

Enumerator:
pcie_deassert_reset 
pcie_warm_reset 
pcie_hot_reset 

Definition at line 137 of file pci.h.

Function Documentation

struct pci_dev* alloc_pci_dev ( void  )
read

Definition at line 1188 of file probe.c.

bool pci_acs_enabled ( struct pci_dev pdev,
u16  acs_flags 
)

pci_acs_enabled - test ACS against required flags for a given device : device to test : required PCI ACS flags

Return true if the device supports the provided flags. Automatically filters out flags that are not implemented on multifunction devices.

Definition at line 2357 of file pci.c.

bool pci_acs_path_enabled ( struct pci_dev start,
struct pci_dev end,
u16  acs_flags 
)

pci_acs_path_enable - test ACS flags from start to end in a hierarchy : starting downstream device : ending upstream device or NULL to search to the root bus : required flags

Walk up a device tree from start to end testing PCI ACS support. If any step along the way does not support the required flags, return false.

Definition at line 2398 of file pci.c.

int pci_ext_cfg_avail ( struct pci_dev dev)

pci_ext_cfg_enabled - can we access extended PCI config space? : The PCI device of the root bridge.

Returns 1 if we can access PCI extended config space (offsets greater than 0xff). This is the default implementation. Architecture implementations can override this.

Definition at line 629 of file common.c.

struct pci_dev* pci_find_upstream_pcie_bridge ( struct pci_dev pdev)
read

pci_find_upstream_pcie_bridge - find upstream PCIe-to-PCI bridge of a device : the PCI device

if the device is PCIE, return NULL if the device isn't connected to a PCIe bridge (that is its parent is a legacy PCI bridge and the bridge is directly connected to bus 0), return its parent

Definition at line 28 of file search.c.

void __iomem* pci_ioremap_bar ( struct pci_dev pdev,
int  bar 
)
void pci_request_acs ( void  )

pci_request_acs - ask for ACS to be enabled if supported

Definition at line 2309 of file pci.c.

void pci_set_host_bridge_release ( struct pci_host_bridge bridge,
void(*)(struct pci_host_bridge *)  release_fn,
void release_data 
)

Definition at line 30 of file host-bridge.c.

int pci_vpd_find_info_keyword ( const u8 buf,
unsigned int  off,
unsigned int  len,
const char kw 
)

pci_vpd_find_info_keyword - Locates an information field keyword in the VPD : Pointer to buffered vpd data : The offset into the buffer at which to begin the search : The length of the buffer area, relative to off, in which to search : The keyword to search for

Returns the index where the information field keyword was found or -ENOENT otherwise.

Definition at line 46 of file vpd.c.

int pci_vpd_find_tag ( const u8 buf,
unsigned int  off,
unsigned int  len,
u8  rdt 
)

pci_vpd_find_tag - Locates the Resource Data Type tag provided : Pointer to buffered vpd data : The offset into the buffer at which to begin the search : The length of the vpd buffer : The Resource Data Type to search for

Returns the index where the Resource Data Type was found or -ENOENT otherwise.

Definition at line 11 of file vpd.c.

int pcibios_add_platform_entries ( struct pci_dev dev)

Definition at line 185 of file pci-common.c.

void pcibios_disable_device ( struct pci_dev dev)

pcibios_disable_device - disable arch specific PCI resources for device dev : the PCI device to disable

Disables architecture specific PCI resources for the device. This is the default implementation. Architecture implementations can override this.

Definition at line 478 of file pci.c.

void pcibios_set_master ( struct pci_dev dev)

pcibios_set_master - enable PCI bus-mastering for device dev : the PCI device to enable

Enables PCI bus-mastering for the device. This is the default implementation. Architecture specific implementations can override this if necessary.

Definition at line 271 of file pci.c.

int pcibios_set_pcie_reset_state ( struct pci_dev dev,
enum pcie_reset_state  state 
)

pcibios_set_pcie_slot_reset - Set PCI-E reset state : pci device struct : reset state to enter

Return value: 0 if success

pcibios_set_pcie_reset_state - set reset state for device dev : the PCIe device reset : Reset state to enter into

Sets the PCIe reset state for the device. This is the default implementation. Architecture implementations can override this.

Definition at line 462 of file eeh.c.

void __iomem* pcim_iomap ( struct pci_dev pdev,
int  bar,
unsigned long  maxlen 
)
int pcim_iomap_regions ( struct pci_dev pdev,
int  mask,
const char name 
)
int pcim_iomap_regions_request_all ( struct pci_dev pdev,
int  mask,
const char name 
)
void __iomem* const* pcim_iomap_table ( struct pci_dev pdev)
void pcim_iounmap ( struct pci_dev pdev,
void __iomem addr 
)
void pcim_iounmap_regions ( struct pci_dev pdev,
int  mask 
)
int raw_pci_read ( unsigned int  domain,
unsigned int  bus,
unsigned int  devfn,
int  reg,
int  len,
u32 val 
)

Definition at line 47 of file pci.c.

int raw_pci_write ( unsigned int  domain,
unsigned int  bus,
unsigned int  devfn,
int  reg,
int  len,
u32  val 
)

Definition at line 74 of file pci.c.

Variable Documentation

struct resource busn_resource

Definition at line 19 of file probe.c.

u8 pci_cache_line_size

Definition at line 90 of file pci.c.

unsigned long pci_cardbus_io_size

Definition at line 72 of file pci.c.

unsigned long pci_cardbus_mem_size

Definition at line 73 of file pci.c.

u8 __devinitdata pci_dfl_cache_line_size
unsigned long pci_hotplug_io_size

Definition at line 78 of file pci.c.

unsigned long pci_hotplug_mem_size

Definition at line 79 of file pci.c.

int pci_pci_problems

Definition at line 37 of file pci.c.

const char* pci_power_names[]

Definition at line 29 of file pci.c.