aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-10-20 16:40:47 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-20 16:40:47 -0400
commita0bfb673dca8a2b4324fe11e678ec6d6a9ad67e0 (patch)
treeb5a473c95d671e6a62fc4520d01a7a4721820794 /include
parent92b29b86fe2e183d44eb467e5e74a5f718ef2e43 (diff)
parent96499871f45b9126157b1a5c512d6e30f1635225 (diff)
Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6
* 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (41 commits) PCI: fix pci_ioremap_bar() on s390 PCI: fix AER capability check PCI: use pci_find_ext_capability everywhere PCI: remove #ifdef DEBUG around dev_dbg call PCI hotplug: fix get_##name return value problem PCI: document the pcie_aspm kernel parameter PCI: introduce an pci_ioremap(pdev, barnr) function powerpc/PCI: Add legacy PCI access via sysfs PCI: Add ability to mmap legacy_io on some platforms PCI: probing debug message uniformization PCI: support PCIe ARI capability PCI: centralize the capabilities code in probe.c PCI: centralize the capabilities code in pci-sysfs.c PCI: fix 64-vbit prefetchable memory resource BARs PCI: replace cfg space size (256/4096) by macros. PCI: use resource_size() everywhere. PCI: use same arg names in PCI_VDEVICE comment PCI hotplug: rpaphp: make debug var unique PCI: use %pF instead of print_fn_descriptor_symbol() in quirks.c PCI: fix hotplug get_##name return value problem ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/aer.h5
-rw-r--r--include/linux/pci.h22
-rw-r--r--include/linux/pci_ids.h6
-rw-r--r--include/linux/pci_regs.h14
4 files changed, 36 insertions, 11 deletions
diff --git a/include/linux/aer.h b/include/linux/aer.h
index f2518141de88..f7df1eefc107 100644
--- a/include/linux/aer.h
+++ b/include/linux/aer.h
@@ -10,7 +10,6 @@
10#if defined(CONFIG_PCIEAER) 10#if defined(CONFIG_PCIEAER)
11/* pci-e port driver needs this function to enable aer */ 11/* pci-e port driver needs this function to enable aer */
12extern int pci_enable_pcie_error_reporting(struct pci_dev *dev); 12extern int pci_enable_pcie_error_reporting(struct pci_dev *dev);
13extern int pci_find_aer_capability(struct pci_dev *dev);
14extern int pci_disable_pcie_error_reporting(struct pci_dev *dev); 13extern int pci_disable_pcie_error_reporting(struct pci_dev *dev);
15extern int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev); 14extern int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev);
16#else 15#else
@@ -18,10 +17,6 @@ static inline int pci_enable_pcie_error_reporting(struct pci_dev *dev)
18{ 17{
19 return -EINVAL; 18 return -EINVAL;
20} 19}
21static inline int pci_find_aer_capability(struct pci_dev *dev)
22{
23 return 0;
24}
25static inline int pci_disable_pcie_error_reporting(struct pci_dev *dev) 20static inline int pci_disable_pcie_error_reporting(struct pci_dev *dev)
26{ 21{
27 return -EINVAL; 22 return -EINVAL;
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 7f3f65ee4da7..085187be29c7 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -214,6 +214,7 @@ struct pci_dev {
214 unsigned int broken_parity_status:1; /* Device generates false positive parity */ 214 unsigned int broken_parity_status:1; /* Device generates false positive parity */
215 unsigned int msi_enabled:1; 215 unsigned int msi_enabled:1;
216 unsigned int msix_enabled:1; 216 unsigned int msix_enabled:1;
217 unsigned int ari_enabled:1; /* ARI forwarding */
217 unsigned int is_managed:1; 218 unsigned int is_managed:1;
218 unsigned int is_pcie:1; 219 unsigned int is_pcie:1;
219 pci_dev_flags_t dev_flags; 220 pci_dev_flags_t dev_flags;
@@ -347,7 +348,6 @@ struct pci_bus_region {
347struct pci_dynids { 348struct pci_dynids {
348 spinlock_t lock; /* protects list, index */ 349 spinlock_t lock; /* protects list, index */
349 struct list_head list; /* for IDs added at runtime */ 350 struct list_head list; /* for IDs added at runtime */
350 unsigned int use_driver_data:1; /* pci_device_id->driver_data is used */
351}; 351};
352 352
353/* ---------------------------------------------------------------- */ 353/* ---------------------------------------------------------------- */
@@ -456,8 +456,8 @@ struct pci_driver {
456 456
457/** 457/**
458 * PCI_VDEVICE - macro used to describe a specific pci device in short form 458 * PCI_VDEVICE - macro used to describe a specific pci device in short form
459 * @vend: the vendor name 459 * @vendor: the vendor name
460 * @dev: the 16 bit PCI Device ID 460 * @device: the 16 bit PCI Device ID
461 * 461 *
462 * This macro is used to create a struct pci_device_id that matches a 462 * This macro is used to create a struct pci_device_id that matches a
463 * specific PCI device. The subvendor, and subdevice fields will be set 463 * specific PCI device. The subvendor, and subdevice fields will be set
@@ -645,6 +645,7 @@ pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state);
645bool pci_pme_capable(struct pci_dev *dev, pci_power_t state); 645bool pci_pme_capable(struct pci_dev *dev, pci_power_t state);
646void pci_pme_active(struct pci_dev *dev, bool enable); 646void pci_pme_active(struct pci_dev *dev, bool enable);
647int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable); 647int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable);
648int pci_wake_from_d3(struct pci_dev *dev, bool enable);
648pci_power_t pci_target_state(struct pci_dev *dev); 649pci_power_t pci_target_state(struct pci_dev *dev);
649int pci_prepare_to_sleep(struct pci_dev *dev); 650int pci_prepare_to_sleep(struct pci_dev *dev);
650int pci_back_from_sleep(struct pci_dev *dev); 651int pci_back_from_sleep(struct pci_dev *dev);
@@ -1118,5 +1119,20 @@ static inline void pci_mmcfg_early_init(void) { }
1118static inline void pci_mmcfg_late_init(void) { } 1119static inline void pci_mmcfg_late_init(void) { }
1119#endif 1120#endif
1120 1121
1122#ifdef CONFIG_HAS_IOMEM
1123static inline void * pci_ioremap_bar(struct pci_dev *pdev, int bar)
1124{
1125 /*
1126 * Make sure the BAR is actually a memory resource, not an IO resource
1127 */
1128 if (!(pci_resource_flags(pdev, bar) & IORESOURCE_MEM)) {
1129 WARN_ON(1);
1130 return NULL;
1131 }
1132 return ioremap_nocache(pci_resource_start(pdev, bar),
1133 pci_resource_len(pdev, bar));
1134}
1135#endif
1136
1121#endif /* __KERNEL__ */ 1137#endif /* __KERNEL__ */
1122#endif /* LINUX_PCI_H */ 1138#endif /* LINUX_PCI_H */
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 8edddc240e4f..e5d344bfcb7e 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -2454,9 +2454,9 @@
2454#define PCI_DEVICE_ID_INTEL_ICH10_3 0x3a1a 2454#define PCI_DEVICE_ID_INTEL_ICH10_3 0x3a1a
2455#define PCI_DEVICE_ID_INTEL_ICH10_4 0x3a30 2455#define PCI_DEVICE_ID_INTEL_ICH10_4 0x3a30
2456#define PCI_DEVICE_ID_INTEL_ICH10_5 0x3a60 2456#define PCI_DEVICE_ID_INTEL_ICH10_5 0x3a60
2457#define PCI_DEVICE_ID_INTEL_PCH_0 0x3b10 2457#define PCI_DEVICE_ID_INTEL_PCH_LPC_MIN 0x3b00
2458#define PCI_DEVICE_ID_INTEL_PCH_1 0x3b11 2458#define PCI_DEVICE_ID_INTEL_PCH_LPC_MAX 0x3b1f
2459#define PCI_DEVICE_ID_INTEL_PCH_2 0x3b30 2459#define PCI_DEVICE_ID_INTEL_PCH_SMBUS 0x3b30
2460#define PCI_DEVICE_ID_INTEL_IOAT_SNB 0x402f 2460#define PCI_DEVICE_ID_INTEL_IOAT_SNB 0x402f
2461#define PCI_DEVICE_ID_INTEL_5100_16 0x65f0 2461#define PCI_DEVICE_ID_INTEL_5100_16 0x65f0
2462#define PCI_DEVICE_ID_INTEL_5100_21 0x65f5 2462#define PCI_DEVICE_ID_INTEL_5100_21 0x65f5
diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h
index 450684f7eaac..eb6686b88f9a 100644
--- a/include/linux/pci_regs.h
+++ b/include/linux/pci_regs.h
@@ -419,6 +419,10 @@
419#define PCI_EXP_RTCTL_CRSSVE 0x10 /* CRS Software Visibility Enable */ 419#define PCI_EXP_RTCTL_CRSSVE 0x10 /* CRS Software Visibility Enable */
420#define PCI_EXP_RTCAP 30 /* Root Capabilities */ 420#define PCI_EXP_RTCAP 30 /* Root Capabilities */
421#define PCI_EXP_RTSTA 32 /* Root Status */ 421#define PCI_EXP_RTSTA 32 /* Root Status */
422#define PCI_EXP_DEVCAP2 36 /* Device Capabilities 2 */
423#define PCI_EXP_DEVCAP2_ARI 0x20 /* Alternative Routing-ID */
424#define PCI_EXP_DEVCTL2 40 /* Device Control 2 */
425#define PCI_EXP_DEVCTL2_ARI 0x20 /* Alternative Routing-ID */
422 426
423/* Extended Capabilities (PCI-X 2.0 and Express) */ 427/* Extended Capabilities (PCI-X 2.0 and Express) */
424#define PCI_EXT_CAP_ID(header) (header & 0x0000ffff) 428#define PCI_EXT_CAP_ID(header) (header & 0x0000ffff)
@@ -429,6 +433,7 @@
429#define PCI_EXT_CAP_ID_VC 2 433#define PCI_EXT_CAP_ID_VC 2
430#define PCI_EXT_CAP_ID_DSN 3 434#define PCI_EXT_CAP_ID_DSN 3
431#define PCI_EXT_CAP_ID_PWR 4 435#define PCI_EXT_CAP_ID_PWR 4
436#define PCI_EXT_CAP_ID_ARI 14
432 437
433/* Advanced Error Reporting */ 438/* Advanced Error Reporting */
434#define PCI_ERR_UNCOR_STATUS 4 /* Uncorrectable Error Status */ 439#define PCI_ERR_UNCOR_STATUS 4 /* Uncorrectable Error Status */
@@ -536,5 +541,14 @@
536#define HT_CAPTYPE_GEN3 0xD0 /* Generation 3 hypertransport configuration */ 541#define HT_CAPTYPE_GEN3 0xD0 /* Generation 3 hypertransport configuration */
537#define HT_CAPTYPE_PM 0xE0 /* Hypertransport powermanagement configuration */ 542#define HT_CAPTYPE_PM 0xE0 /* Hypertransport powermanagement configuration */
538 543
544/* Alternative Routing-ID Interpretation */
545#define PCI_ARI_CAP 0x04 /* ARI Capability Register */
546#define PCI_ARI_CAP_MFVC 0x0001 /* MFVC Function Groups Capability */
547#define PCI_ARI_CAP_ACS 0x0002 /* ACS Function Groups Capability */
548#define PCI_ARI_CAP_NFN(x) (((x) >> 8) & 0xff) /* Next Function Number */
549#define PCI_ARI_CTRL 0x06 /* ARI Control Register */
550#define PCI_ARI_CTRL_MFVC 0x0001 /* MFVC Function Groups Enable */
551#define PCI_ARI_CTRL_ACS 0x0002 /* ACS Function Groups Enable */
552#define PCI_ARI_CTRL_FG(x) (((x) >> 4) & 7) /* Function Group */
539 553
540#endif /* LINUX_PCI_REGS_H */ 554#endif /* LINUX_PCI_REGS_H */