aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-01-07 18:41:01 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-07 18:41:01 -0500
commitb424e8d3b438e841cd1700f6433a100a5d611e4a (patch)
tree545638d0b925de4c7f740286760767cca86cb91e /include
parent7c7758f99d39d529a64d4f60d22129bbf2f16d74 (diff)
parentf6dc1e5e3d4b523e1616b43beddb04e4fb1d376a (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: (98 commits) PCI PM: Put PM callbacks in the order of execution PCI PM: Run default PM callbacks for all devices using new framework PCI PM: Register power state of devices during initialization PCI PM: Call pci_fixup_device from legacy routines PCI PM: Rearrange code in pci-driver.c PCI PM: Avoid touching devices behind bridges in unknown state PCI PM: Move pci_has_legacy_pm_support PCI PM: Power-manage devices without drivers during suspend-resume PCI PM: Add suspend counterpart of pci_reenable_device PCI PM: Fix poweroff and restore callbacks PCI: Use msleep instead of cpu_relax during ASPM link retraining PCI: PCIe portdrv: Add kerneldoc comments to remining core funtions PCI: PCIe portdrv: Rearrange code so that related things are together PCI: PCIe portdrv: Fix suspend and resume of PCI Express port services PCI: PCIe portdrv: Add kerneldoc comments to some core functions x86/PCI: Do not use interrupt links for devices using MSI-X net: sfc: Use pci_clear_master() to disable bus mastering PCI: Add pci_clear_master() as opposite of pci_set_master() PCI hotplug: remove redundant test in cpq hotplug PCI: pciehp: cleanup register and field definitions ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/ioport.h11
-rw-r--r--include/linux/pci-acpi.h23
-rw-r--r--include/linux/pci.h90
-rw-r--r--include/linux/pci_hotplug.h2
-rw-r--r--include/linux/pci_regs.h76
5 files changed, 153 insertions, 49 deletions
diff --git a/include/linux/ioport.h b/include/linux/ioport.h
index 041e95aac2bf..f6bb2ca8e3ba 100644
--- a/include/linux/ioport.h
+++ b/include/linux/ioport.h
@@ -49,6 +49,7 @@ struct resource_list {
49#define IORESOURCE_SIZEALIGN 0x00020000 /* size indicates alignment */ 49#define IORESOURCE_SIZEALIGN 0x00020000 /* size indicates alignment */
50#define IORESOURCE_STARTALIGN 0x00040000 /* start field is alignment */ 50#define IORESOURCE_STARTALIGN 0x00040000 /* start field is alignment */
51 51
52#define IORESOURCE_EXCLUSIVE 0x08000000 /* Userland may not map this resource */
52#define IORESOURCE_DISABLED 0x10000000 53#define IORESOURCE_DISABLED 0x10000000
53#define IORESOURCE_UNSET 0x20000000 54#define IORESOURCE_UNSET 0x20000000
54#define IORESOURCE_AUTO 0x40000000 55#define IORESOURCE_AUTO 0x40000000
@@ -133,13 +134,16 @@ static inline unsigned long resource_type(struct resource *res)
133} 134}
134 135
135/* Convenience shorthand with allocation */ 136/* Convenience shorthand with allocation */
136#define request_region(start,n,name) __request_region(&ioport_resource, (start), (n), (name)) 137#define request_region(start,n,name) __request_region(&ioport_resource, (start), (n), (name), 0)
137#define request_mem_region(start,n,name) __request_region(&iomem_resource, (start), (n), (name)) 138#define __request_mem_region(start,n,name, excl) __request_region(&iomem_resource, (start), (n), (name), excl)
139#define request_mem_region(start,n,name) __request_region(&iomem_resource, (start), (n), (name), 0)
140#define request_mem_region_exclusive(start,n,name) \
141 __request_region(&iomem_resource, (start), (n), (name), IORESOURCE_EXCLUSIVE)
138#define rename_region(region, newname) do { (region)->name = (newname); } while (0) 142#define rename_region(region, newname) do { (region)->name = (newname); } while (0)
139 143
140extern struct resource * __request_region(struct resource *, 144extern struct resource * __request_region(struct resource *,
141 resource_size_t start, 145 resource_size_t start,
142 resource_size_t n, const char *name); 146 resource_size_t n, const char *name, int relaxed);
143 147
144/* Compatibility cruft */ 148/* Compatibility cruft */
145#define release_region(start,n) __release_region(&ioport_resource, (start), (n)) 149#define release_region(start,n) __release_region(&ioport_resource, (start), (n))
@@ -175,6 +179,7 @@ extern struct resource * __devm_request_region(struct device *dev,
175extern void __devm_release_region(struct device *dev, struct resource *parent, 179extern void __devm_release_region(struct device *dev, struct resource *parent,
176 resource_size_t start, resource_size_t n); 180 resource_size_t start, resource_size_t n);
177extern int iomem_map_sanity_check(resource_size_t addr, unsigned long size); 181extern int iomem_map_sanity_check(resource_size_t addr, unsigned long size);
182extern int iomem_is_exclusive(u64 addr);
178 183
179#endif /* __ASSEMBLY__ */ 184#endif /* __ASSEMBLY__ */
180#endif /* _LINUX_IOPORT_H */ 185#endif /* _LINUX_IOPORT_H */
diff --git a/include/linux/pci-acpi.h b/include/linux/pci-acpi.h
index 8837928fbf33..042c166f65d5 100644
--- a/include/linux/pci-acpi.h
+++ b/include/linux/pci-acpi.h
@@ -8,6 +8,8 @@
8#ifndef _PCI_ACPI_H_ 8#ifndef _PCI_ACPI_H_
9#define _PCI_ACPI_H_ 9#define _PCI_ACPI_H_
10 10
11#include <linux/acpi.h>
12
11#define OSC_QUERY_TYPE 0 13#define OSC_QUERY_TYPE 0
12#define OSC_SUPPORT_TYPE 1 14#define OSC_SUPPORT_TYPE 1
13#define OSC_CONTROL_TYPE 2 15#define OSC_CONTROL_TYPE 2
@@ -48,15 +50,7 @@
48 50
49#ifdef CONFIG_ACPI 51#ifdef CONFIG_ACPI
50extern acpi_status pci_osc_control_set(acpi_handle handle, u32 flags); 52extern acpi_status pci_osc_control_set(acpi_handle handle, u32 flags);
51extern acpi_status __pci_osc_support_set(u32 flags, const char *hid); 53int pci_acpi_osc_support(acpi_handle handle, u32 flags);
52static inline acpi_status pci_osc_support_set(u32 flags)
53{
54 return __pci_osc_support_set(flags, PCI_ROOT_HID_STRING);
55}
56static inline acpi_status pcie_osc_support_set(u32 flags)
57{
58 return __pci_osc_support_set(flags, PCI_EXPRESS_ROOT_HID_STRING);
59}
60static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev) 54static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev)
61{ 55{
62 /* Find root host bridge */ 56 /* Find root host bridge */
@@ -66,6 +60,15 @@ static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev)
66 return acpi_get_pci_rootbridge_handle(pci_domain_nr(pdev->bus), 60 return acpi_get_pci_rootbridge_handle(pci_domain_nr(pdev->bus),
67 pdev->bus->number); 61 pdev->bus->number);
68} 62}
63
64static inline acpi_handle acpi_pci_get_bridge_handle(struct pci_bus *pbus)
65{
66 int seg = pci_domain_nr(pbus), busnr = pbus->number;
67 struct pci_dev *bridge = pbus->self;
68 if (bridge)
69 return DEVICE_ACPI_HANDLE(&(bridge->dev));
70 return acpi_get_pci_rootbridge_handle(seg, busnr);
71}
69#else 72#else
70#if !defined(AE_ERROR) 73#if !defined(AE_ERROR)
71typedef u32 acpi_status; 74typedef u32 acpi_status;
@@ -73,8 +76,6 @@ typedef u32 acpi_status;
73#endif 76#endif
74static inline acpi_status pci_osc_control_set(acpi_handle handle, u32 flags) 77static inline acpi_status pci_osc_control_set(acpi_handle handle, u32 flags)
75{return AE_ERROR;} 78{return AE_ERROR;}
76static inline acpi_status pci_osc_support_set(u32 flags) {return AE_ERROR;}
77static inline acpi_status pcie_osc_support_set(u32 flags) {return AE_ERROR;}
78static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev) 79static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev)
79{ return NULL; } 80{ return NULL; }
80#endif 81#endif
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 4bb156ba854a..80f8b8b65fde 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -82,7 +82,30 @@ enum pci_mmap_state {
82#define PCI_DMA_FROMDEVICE 2 82#define PCI_DMA_FROMDEVICE 2
83#define PCI_DMA_NONE 3 83#define PCI_DMA_NONE 3
84 84
85#define DEVICE_COUNT_RESOURCE 12 85/*
86 * For PCI devices, the region numbers are assigned this way:
87 */
88enum {
89 /* #0-5: standard PCI resources */
90 PCI_STD_RESOURCES,
91 PCI_STD_RESOURCE_END = 5,
92
93 /* #6: expansion ROM resource */
94 PCI_ROM_RESOURCE,
95
96 /* resources assigned to buses behind the bridge */
97#define PCI_BRIDGE_RESOURCE_NUM 4
98
99 PCI_BRIDGE_RESOURCES,
100 PCI_BRIDGE_RESOURCE_END = PCI_BRIDGE_RESOURCES +
101 PCI_BRIDGE_RESOURCE_NUM - 1,
102
103 /* total resources associated with a PCI device */
104 PCI_NUM_RESOURCES,
105
106 /* preserve this for compatibility */
107 DEVICE_COUNT_RESOURCE
108};
86 109
87typedef int __bitwise pci_power_t; 110typedef int __bitwise pci_power_t;
88 111
@@ -274,18 +297,6 @@ static inline void pci_add_saved_cap(struct pci_dev *pci_dev,
274 hlist_add_head(&new_cap->next, &pci_dev->saved_cap_space); 297 hlist_add_head(&new_cap->next, &pci_dev->saved_cap_space);
275} 298}
276 299
277/*
278 * For PCI devices, the region numbers are assigned this way:
279 *
280 * 0-5 standard PCI regions
281 * 6 expansion ROM
282 * 7-10 bridges: address space assigned to buses behind the bridge
283 */
284
285#define PCI_ROM_RESOURCE 6
286#define PCI_BRIDGE_RESOURCES 7
287#define PCI_NUM_RESOURCES 11
288
289#ifndef PCI_BUS_NUM_RESOURCES 300#ifndef PCI_BUS_NUM_RESOURCES
290#define PCI_BUS_NUM_RESOURCES 16 301#define PCI_BUS_NUM_RESOURCES 16
291#endif 302#endif
@@ -325,6 +336,15 @@ struct pci_bus {
325#define pci_bus_b(n) list_entry(n, struct pci_bus, node) 336#define pci_bus_b(n) list_entry(n, struct pci_bus, node)
326#define to_pci_bus(n) container_of(n, struct pci_bus, dev) 337#define to_pci_bus(n) container_of(n, struct pci_bus, dev)
327 338
339#ifdef CONFIG_PCI_MSI
340static inline bool pci_dev_msi_enabled(struct pci_dev *pci_dev)
341{
342 return pci_dev->msi_enabled || pci_dev->msix_enabled;
343}
344#else
345static inline bool pci_dev_msi_enabled(struct pci_dev *pci_dev) { return false; }
346#endif
347
328/* 348/*
329 * Error values that may be returned by PCI functions. 349 * Error values that may be returned by PCI functions.
330 */ 350 */
@@ -532,7 +552,9 @@ int __must_check pci_bus_add_device(struct pci_dev *dev);
532void pci_read_bridge_bases(struct pci_bus *child); 552void pci_read_bridge_bases(struct pci_bus *child);
533struct resource *pci_find_parent_resource(const struct pci_dev *dev, 553struct resource *pci_find_parent_resource(const struct pci_dev *dev,
534 struct resource *res); 554 struct resource *res);
555u8 pci_swizzle_interrupt_pin(struct pci_dev *dev, u8 pin);
535int pci_get_interrupt_pin(struct pci_dev *dev, struct pci_dev **bridge); 556int pci_get_interrupt_pin(struct pci_dev *dev, struct pci_dev **bridge);
557u8 pci_common_swizzle(struct pci_dev *dev, u8 *pinp);
536extern struct pci_dev *pci_dev_get(struct pci_dev *dev); 558extern struct pci_dev *pci_dev_get(struct pci_dev *dev);
537extern void pci_dev_put(struct pci_dev *dev); 559extern void pci_dev_put(struct pci_dev *dev);
538extern void pci_remove_bus(struct pci_bus *b); 560extern void pci_remove_bus(struct pci_bus *b);
@@ -629,6 +651,7 @@ static inline int pci_is_managed(struct pci_dev *pdev)
629 651
630void pci_disable_device(struct pci_dev *dev); 652void pci_disable_device(struct pci_dev *dev);
631void pci_set_master(struct pci_dev *dev); 653void pci_set_master(struct pci_dev *dev);
654void pci_clear_master(struct pci_dev *dev);
632int pci_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state state); 655int pci_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state state);
633#define HAVE_PCI_SET_MWI 656#define HAVE_PCI_SET_MWI
634int __must_check pci_set_mwi(struct pci_dev *dev); 657int __must_check pci_set_mwi(struct pci_dev *dev);
@@ -647,7 +670,7 @@ int pcie_get_readrq(struct pci_dev *dev);
647int pcie_set_readrq(struct pci_dev *dev, int rq); 670int pcie_set_readrq(struct pci_dev *dev, int rq);
648int pci_reset_function(struct pci_dev *dev); 671int pci_reset_function(struct pci_dev *dev);
649int pci_execute_reset_function(struct pci_dev *dev); 672int pci_execute_reset_function(struct pci_dev *dev);
650void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno); 673void pci_update_resource(struct pci_dev *dev, int resno);
651int __must_check pci_assign_resource(struct pci_dev *dev, int i); 674int __must_check pci_assign_resource(struct pci_dev *dev, int i);
652int pci_select_bars(struct pci_dev *dev, unsigned long flags); 675int pci_select_bars(struct pci_dev *dev, unsigned long flags);
653 676
@@ -674,6 +697,11 @@ int pci_back_from_sleep(struct pci_dev *dev);
674/* Functions for PCI Hotplug drivers to use */ 697/* Functions for PCI Hotplug drivers to use */
675int pci_bus_find_capability(struct pci_bus *bus, unsigned int devfn, int cap); 698int pci_bus_find_capability(struct pci_bus *bus, unsigned int devfn, int cap);
676 699
700/* Vital product data routines */
701ssize_t pci_read_vpd(struct pci_dev *dev, loff_t pos, size_t count, void *buf);
702ssize_t pci_write_vpd(struct pci_dev *dev, loff_t pos, size_t count, const void *buf);
703int pci_vpd_truncate(struct pci_dev *dev, size_t size);
704
677/* Helper functions for low-level code (drivers/pci/setup-[bus,res].c) */ 705/* Helper functions for low-level code (drivers/pci/setup-[bus,res].c) */
678void pci_bus_assign_resources(struct pci_bus *bus); 706void pci_bus_assign_resources(struct pci_bus *bus);
679void pci_bus_size_bridges(struct pci_bus *bus); 707void pci_bus_size_bridges(struct pci_bus *bus);
@@ -686,10 +714,13 @@ void pci_fixup_irqs(u8 (*)(struct pci_dev *, u8 *),
686 int (*)(struct pci_dev *, u8, u8)); 714 int (*)(struct pci_dev *, u8, u8));
687#define HAVE_PCI_REQ_REGIONS 2 715#define HAVE_PCI_REQ_REGIONS 2
688int __must_check pci_request_regions(struct pci_dev *, const char *); 716int __must_check pci_request_regions(struct pci_dev *, const char *);
717int __must_check pci_request_regions_exclusive(struct pci_dev *, const char *);
689void pci_release_regions(struct pci_dev *); 718void pci_release_regions(struct pci_dev *);
690int __must_check pci_request_region(struct pci_dev *, int, const char *); 719int __must_check pci_request_region(struct pci_dev *, int, const char *);
720int __must_check pci_request_region_exclusive(struct pci_dev *, int, const char *);
691void pci_release_region(struct pci_dev *, int); 721void pci_release_region(struct pci_dev *, int);
692int pci_request_selected_regions(struct pci_dev *, int, const char *); 722int pci_request_selected_regions(struct pci_dev *, int, const char *);
723int pci_request_selected_regions_exclusive(struct pci_dev *, int, const char *);
693void pci_release_selected_regions(struct pci_dev *, int); 724void pci_release_selected_regions(struct pci_dev *, int);
694 725
695/* drivers/pci/bus.c */ 726/* drivers/pci/bus.c */
@@ -779,6 +810,10 @@ static inline void msi_remove_pci_irq_vectors(struct pci_dev *dev)
779 810
780static inline void pci_restore_msi_state(struct pci_dev *dev) 811static inline void pci_restore_msi_state(struct pci_dev *dev)
781{ } 812{ }
813static inline int pci_msi_enabled(void)
814{
815 return 0;
816}
782#else 817#else
783extern int pci_enable_msi(struct pci_dev *dev); 818extern int pci_enable_msi(struct pci_dev *dev);
784extern void pci_msi_shutdown(struct pci_dev *dev); 819extern void pci_msi_shutdown(struct pci_dev *dev);
@@ -789,6 +824,16 @@ extern void pci_msix_shutdown(struct pci_dev *dev);
789extern void pci_disable_msix(struct pci_dev *dev); 824extern void pci_disable_msix(struct pci_dev *dev);
790extern void msi_remove_pci_irq_vectors(struct pci_dev *dev); 825extern void msi_remove_pci_irq_vectors(struct pci_dev *dev);
791extern void pci_restore_msi_state(struct pci_dev *dev); 826extern void pci_restore_msi_state(struct pci_dev *dev);
827extern int pci_msi_enabled(void);
828#endif
829
830#ifndef CONFIG_PCIEASPM
831static inline int pcie_aspm_enabled(void)
832{
833 return 0;
834}
835#else
836extern int pcie_aspm_enabled(void);
792#endif 837#endif
793 838
794#ifdef CONFIG_HT_IRQ 839#ifdef CONFIG_HT_IRQ
@@ -1140,20 +1185,9 @@ static inline void pci_mmcfg_early_init(void) { }
1140static inline void pci_mmcfg_late_init(void) { } 1185static inline void pci_mmcfg_late_init(void) { }
1141#endif 1186#endif
1142 1187
1143#ifdef CONFIG_HAS_IOMEM 1188int pci_ext_cfg_avail(struct pci_dev *dev);
1144static inline void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar) 1189
1145{ 1190void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar);
1146 /*
1147 * Make sure the BAR is actually a memory resource, not an IO resource
1148 */
1149 if (!(pci_resource_flags(pdev, bar) & IORESOURCE_MEM)) {
1150 WARN_ON(1);
1151 return NULL;
1152 }
1153 return ioremap_nocache(pci_resource_start(pdev, bar),
1154 pci_resource_len(pdev, bar));
1155}
1156#endif
1157 1191
1158#endif /* __KERNEL__ */ 1192#endif /* __KERNEL__ */
1159#endif /* LINUX_PCI_H */ 1193#endif /* LINUX_PCI_H */
diff --git a/include/linux/pci_hotplug.h b/include/linux/pci_hotplug.h
index a00bd1a0f156..f7cc204fab07 100644
--- a/include/linux/pci_hotplug.h
+++ b/include/linux/pci_hotplug.h
@@ -228,6 +228,8 @@ extern acpi_status acpi_get_hp_params_from_firmware(struct pci_bus *bus,
228 struct hotplug_params *hpp); 228 struct hotplug_params *hpp);
229int acpi_get_hp_hw_control_from_firmware(struct pci_dev *dev, u32 flags); 229int acpi_get_hp_hw_control_from_firmware(struct pci_dev *dev, u32 flags);
230int acpi_root_bridge(acpi_handle handle); 230int acpi_root_bridge(acpi_handle handle);
231int acpi_pci_check_ejectable(struct pci_bus *pbus, acpi_handle handle);
232int acpi_pci_detect_ejectable(struct pci_bus *pbus);
231#endif 233#endif
232#endif 234#endif
233 235
diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h
index e5effd47ed74..027815b4635e 100644
--- a/include/linux/pci_regs.h
+++ b/include/linux/pci_regs.h
@@ -210,6 +210,7 @@
210#define PCI_CAP_ID_AGP3 0x0E /* AGP Target PCI-PCI bridge */ 210#define PCI_CAP_ID_AGP3 0x0E /* AGP Target PCI-PCI bridge */
211#define PCI_CAP_ID_EXP 0x10 /* PCI Express */ 211#define PCI_CAP_ID_EXP 0x10 /* PCI Express */
212#define PCI_CAP_ID_MSIX 0x11 /* MSI-X */ 212#define PCI_CAP_ID_MSIX 0x11 /* MSI-X */
213#define PCI_CAP_ID_AF 0x13 /* PCI Advanced Features */
213#define PCI_CAP_LIST_NEXT 1 /* Next capability in the list */ 214#define PCI_CAP_LIST_NEXT 1 /* Next capability in the list */
214#define PCI_CAP_FLAGS 2 /* Capability defined flags (16 bits) */ 215#define PCI_CAP_FLAGS 2 /* Capability defined flags (16 bits) */
215#define PCI_CAP_SIZEOF 4 216#define PCI_CAP_SIZEOF 4
@@ -316,6 +317,17 @@
316#define PCI_CHSWP_EXT 0x40 /* ENUM# status - extraction */ 317#define PCI_CHSWP_EXT 0x40 /* ENUM# status - extraction */
317#define PCI_CHSWP_INS 0x80 /* ENUM# status - insertion */ 318#define PCI_CHSWP_INS 0x80 /* ENUM# status - insertion */
318 319
320/* PCI Advanced Feature registers */
321
322#define PCI_AF_LENGTH 2
323#define PCI_AF_CAP 3
324#define PCI_AF_CAP_TP 0x01
325#define PCI_AF_CAP_FLR 0x02
326#define PCI_AF_CTRL 4
327#define PCI_AF_CTRL_FLR 0x01
328#define PCI_AF_STATUS 5
329#define PCI_AF_STATUS_TP 0x01
330
319/* PCI-X registers */ 331/* PCI-X registers */
320 332
321#define PCI_X_CMD 2 /* Modes & Features */ 333#define PCI_X_CMD 2 /* Modes & Features */
@@ -399,20 +411,70 @@
399#define PCI_EXP_DEVSTA_AUXPD 0x10 /* AUX Power Detected */ 411#define PCI_EXP_DEVSTA_AUXPD 0x10 /* AUX Power Detected */
400#define PCI_EXP_DEVSTA_TRPND 0x20 /* Transactions Pending */ 412#define PCI_EXP_DEVSTA_TRPND 0x20 /* Transactions Pending */
401#define PCI_EXP_LNKCAP 12 /* Link Capabilities */ 413#define PCI_EXP_LNKCAP 12 /* Link Capabilities */
402#define PCI_EXP_LNKCAP_ASPMS 0xc00 /* ASPM Support */ 414#define PCI_EXP_LNKCAP_SLS 0x0000000f /* Supported Link Speeds */
403#define PCI_EXP_LNKCAP_L0SEL 0x7000 /* L0s Exit Latency */ 415#define PCI_EXP_LNKCAP_MLW 0x000003f0 /* Maximum Link Width */
404#define PCI_EXP_LNKCAP_L1EL 0x38000 /* L1 Exit Latency */ 416#define PCI_EXP_LNKCAP_ASPMS 0x00000c00 /* ASPM Support */
405#define PCI_EXP_LNKCAP_CLKPM 0x40000 /* L1 Clock Power Management */ 417#define PCI_EXP_LNKCAP_L0SEL 0x00007000 /* L0s Exit Latency */
418#define PCI_EXP_LNKCAP_L1EL 0x00038000 /* L1 Exit Latency */
419#define PCI_EXP_LNKCAP_CLKPM 0x00040000 /* L1 Clock Power Management */
420#define PCI_EXP_LNKCAP_SDERC 0x00080000 /* Suprise Down Error Reporting Capable */
421#define PCI_EXP_LNKCAP_DLLLARC 0x00100000 /* Data Link Layer Link Active Reporting Capable */
422#define PCI_EXP_LNKCAP_LBNC 0x00200000 /* Link Bandwidth Notification Capability */
423#define PCI_EXP_LNKCAP_PN 0xff000000 /* Port Number */
406#define PCI_EXP_LNKCTL 16 /* Link Control */ 424#define PCI_EXP_LNKCTL 16 /* Link Control */
407#define PCI_EXP_LNKCTL_RL 0x20 /* Retrain Link */ 425#define PCI_EXP_LNKCTL_ASPMC 0x0003 /* ASPM Control */
408#define PCI_EXP_LNKCTL_CCC 0x40 /* Common Clock COnfiguration */ 426#define PCI_EXP_LNKCTL_RCB 0x0008 /* Read Completion Boundary */
427#define PCI_EXP_LNKCTL_LD 0x0010 /* Link Disable */
428#define PCI_EXP_LNKCTL_RL 0x0020 /* Retrain Link */
429#define PCI_EXP_LNKCTL_CCC 0x0040 /* Common Clock Configuration */
430#define PCI_EXP_LNKCTL_ES 0x0080 /* Extended Synch */
409#define PCI_EXP_LNKCTL_CLKREQ_EN 0x100 /* Enable clkreq */ 431#define PCI_EXP_LNKCTL_CLKREQ_EN 0x100 /* Enable clkreq */
432#define PCI_EXP_LNKCTL_HAWD 0x0200 /* Hardware Autonomous Width Disable */
433#define PCI_EXP_LNKCTL_LBMIE 0x0400 /* Link Bandwidth Management Interrupt Enable */
434#define PCI_EXP_LNKCTL_LABIE 0x0800 /* Lnk Autonomous Bandwidth Interrupt Enable */
410#define PCI_EXP_LNKSTA 18 /* Link Status */ 435#define PCI_EXP_LNKSTA 18 /* Link Status */
411#define PCI_EXP_LNKSTA_LT 0x800 /* Link Training */ 436#define PCI_EXP_LNKSTA_CLS 0x000f /* Current Link Speed */
437#define PCI_EXP_LNKSTA_NLW 0x03f0 /* Nogotiated Link Width */
438#define PCI_EXP_LNKSTA_LT 0x0800 /* Link Training */
412#define PCI_EXP_LNKSTA_SLC 0x1000 /* Slot Clock Configuration */ 439#define PCI_EXP_LNKSTA_SLC 0x1000 /* Slot Clock Configuration */
440#define PCI_EXP_LNKSTA_DLLLA 0x2000 /* Data Link Layer Link Active */
441#define PCI_EXP_LNKSTA_LBMS 0x4000 /* Link Bandwidth Management Status */
442#define PCI_EXP_LNKSTA_LABS 0x8000 /* Link Autonomous Bandwidth Status */
413#define PCI_EXP_SLTCAP 20 /* Slot Capabilities */ 443#define PCI_EXP_SLTCAP 20 /* Slot Capabilities */
444#define PCI_EXP_SLTCAP_ABP 0x00000001 /* Attention Button Present */
445#define PCI_EXP_SLTCAP_PCP 0x00000002 /* Power Controller Present */
446#define PCI_EXP_SLTCAP_MRLSP 0x00000004 /* MRL Sensor Present */
447#define PCI_EXP_SLTCAP_AIP 0x00000008 /* Attention Indicator Present */
448#define PCI_EXP_SLTCAP_PIP 0x00000010 /* Power Indicator Present */
449#define PCI_EXP_SLTCAP_HPS 0x00000020 /* Hot-Plug Surprise */
450#define PCI_EXP_SLTCAP_HPC 0x00000040 /* Hot-Plug Capable */
451#define PCI_EXP_SLTCAP_SPLV 0x00007f80 /* Slot Power Limit Value */
452#define PCI_EXP_SLTCAP_SPLS 0x00018000 /* Slot Power Limit Scale */
453#define PCI_EXP_SLTCAP_EIP 0x00020000 /* Electromechanical Interlock Present */
454#define PCI_EXP_SLTCAP_NCCS 0x00040000 /* No Command Completed Support */
455#define PCI_EXP_SLTCAP_PSN 0xfff80000 /* Physical Slot Number */
414#define PCI_EXP_SLTCTL 24 /* Slot Control */ 456#define PCI_EXP_SLTCTL 24 /* Slot Control */
457#define PCI_EXP_SLTCTL_ABPE 0x0001 /* Attention Button Pressed Enable */
458#define PCI_EXP_SLTCTL_PFDE 0x0002 /* Power Fault Detected Enable */
459#define PCI_EXP_SLTCTL_MRLSCE 0x0004 /* MRL Sensor Changed Enable */
460#define PCI_EXP_SLTCTL_PDCE 0x0008 /* Presence Detect Changed Enable */
461#define PCI_EXP_SLTCTL_CCIE 0x0010 /* Command Completed Interrupt Enable */
462#define PCI_EXP_SLTCTL_HPIE 0x0020 /* Hot-Plug Interrupt Enable */
463#define PCI_EXP_SLTCTL_AIC 0x00c0 /* Attention Indicator Control */
464#define PCI_EXP_SLTCTL_PIC 0x0300 /* Power Indicator Control */
465#define PCI_EXP_SLTCTL_PCC 0x0400 /* Power Controller Control */
466#define PCI_EXP_SLTCTL_EIC 0x0800 /* Electromechanical Interlock Control */
467#define PCI_EXP_SLTCTL_DLLSCE 0x1000 /* Data Link Layer State Changed Enable */
415#define PCI_EXP_SLTSTA 26 /* Slot Status */ 468#define PCI_EXP_SLTSTA 26 /* Slot Status */
469#define PCI_EXP_SLTSTA_ABP 0x0001 /* Attention Button Pressed */
470#define PCI_EXP_SLTSTA_PFD 0x0002 /* Power Fault Detected */
471#define PCI_EXP_SLTSTA_MRLSC 0x0004 /* MRL Sensor Changed */
472#define PCI_EXP_SLTSTA_PDC 0x0008 /* Presence Detect Changed */
473#define PCI_EXP_SLTSTA_CC 0x0010 /* Command Completed */
474#define PCI_EXP_SLTSTA_MRLSS 0x0020 /* MRL Sensor State */
475#define PCI_EXP_SLTSTA_PDS 0x0040 /* Presence Detect State */
476#define PCI_EXP_SLTSTA_EIS 0x0080 /* Electromechanical Interlock Status */
477#define PCI_EXP_SLTSTA_DLLSC 0x0100 /* Data Link Layer State Changed */
416#define PCI_EXP_RTCTL 28 /* Root Control */ 478#define PCI_EXP_RTCTL 28 /* Root Control */
417#define PCI_EXP_RTCTL_SECEE 0x01 /* System Error on Correctable Error */ 479#define PCI_EXP_RTCTL_SECEE 0x01 /* System Error on Correctable Error */
418#define PCI_EXP_RTCTL_SENFEE 0x02 /* System Error on Non-Fatal Error */ 480#define PCI_EXP_RTCTL_SENFEE 0x02 /* System Error on Non-Fatal Error */