diff options
author | Myron Stowe <myron.stowe@redhat.com> | 2012-07-09 17:36:14 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2012-07-09 18:43:41 -0400 |
commit | 25e742b27018abce3bad42e6b6732f91d71cc655 (patch) | |
tree | ffb20d118d70343c05cb08679160cf60f3a640b6 /drivers/pci | |
parent | dff3aef7139ce1be190be6d13505a35d5c7c0c3c (diff) |
PCI: never discard enable/suspend/resume_early/resume fixups
The enable/suspend/resume_early/resume fixups can be called at any time, so
they can't be __init or __devinit.
[bhelgaas: changelog]
Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/quirks.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 50448c291a8f..5b8b840f1a99 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
@@ -1039,7 +1039,7 @@ static void quirk_disable_pxb(struct pci_dev *pdev) | |||
1039 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454NX, quirk_disable_pxb); | 1039 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454NX, quirk_disable_pxb); |
1040 | DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454NX, quirk_disable_pxb); | 1040 | DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454NX, quirk_disable_pxb); |
1041 | 1041 | ||
1042 | static void __devinit quirk_amd_ide_mode(struct pci_dev *pdev) | 1042 | static void quirk_amd_ide_mode(struct pci_dev *pdev) |
1043 | { | 1043 | { |
1044 | /* set SBX00/Hudson-2 SATA in IDE mode to AHCI mode */ | 1044 | /* set SBX00/Hudson-2 SATA in IDE mode to AHCI mode */ |
1045 | u8 tmp; | 1045 | u8 tmp; |
@@ -2104,7 +2104,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM, | |||
2104 | PCI_DEVICE_ID_NX2_5709S, | 2104 | PCI_DEVICE_ID_NX2_5709S, |
2105 | quirk_brcm_570x_limit_vpd); | 2105 | quirk_brcm_570x_limit_vpd); |
2106 | 2106 | ||
2107 | static void __devinit quirk_brcm_5719_limit_mrrs(struct pci_dev *dev) | 2107 | static void quirk_brcm_5719_limit_mrrs(struct pci_dev *dev) |
2108 | { | 2108 | { |
2109 | u32 rev; | 2109 | u32 rev; |
2110 | 2110 | ||
@@ -2217,7 +2217,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x9601, quirk_amd_780_apc_msi); | |||
2217 | 2217 | ||
2218 | /* Go through the list of Hypertransport capabilities and | 2218 | /* Go through the list of Hypertransport capabilities and |
2219 | * return 1 if a HT MSI capability is found and enabled */ | 2219 | * return 1 if a HT MSI capability is found and enabled */ |
2220 | static int __devinit msi_ht_cap_enabled(struct pci_dev *dev) | 2220 | static int msi_ht_cap_enabled(struct pci_dev *dev) |
2221 | { | 2221 | { |
2222 | int pos, ttl = 48; | 2222 | int pos, ttl = 48; |
2223 | 2223 | ||
@@ -2241,7 +2241,7 @@ static int __devinit msi_ht_cap_enabled(struct pci_dev *dev) | |||
2241 | } | 2241 | } |
2242 | 2242 | ||
2243 | /* Check the hypertransport MSI mapping to know whether MSI is enabled or not */ | 2243 | /* Check the hypertransport MSI mapping to know whether MSI is enabled or not */ |
2244 | static void __devinit quirk_msi_ht_cap(struct pci_dev *dev) | 2244 | static void quirk_msi_ht_cap(struct pci_dev *dev) |
2245 | { | 2245 | { |
2246 | if (dev->subordinate && !msi_ht_cap_enabled(dev)) { | 2246 | if (dev->subordinate && !msi_ht_cap_enabled(dev)) { |
2247 | dev_warn(&dev->dev, "MSI quirk detected; " | 2247 | dev_warn(&dev->dev, "MSI quirk detected; " |
@@ -2255,7 +2255,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_HT2 | |||
2255 | /* The nVidia CK804 chipset may have 2 HT MSI mappings. | 2255 | /* The nVidia CK804 chipset may have 2 HT MSI mappings. |
2256 | * MSI are supported if the MSI capability set in any of these mappings. | 2256 | * MSI are supported if the MSI capability set in any of these mappings. |
2257 | */ | 2257 | */ |
2258 | static void __devinit quirk_nvidia_ck804_msi_ht_cap(struct pci_dev *dev) | 2258 | static void quirk_nvidia_ck804_msi_ht_cap(struct pci_dev *dev) |
2259 | { | 2259 | { |
2260 | struct pci_dev *pdev; | 2260 | struct pci_dev *pdev; |
2261 | 2261 | ||
@@ -2279,7 +2279,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_CK804_PCIE, | |||
2279 | quirk_nvidia_ck804_msi_ht_cap); | 2279 | quirk_nvidia_ck804_msi_ht_cap); |
2280 | 2280 | ||
2281 | /* Force enable MSI mapping capability on HT bridges */ | 2281 | /* Force enable MSI mapping capability on HT bridges */ |
2282 | static void __devinit ht_enable_msi_mapping(struct pci_dev *dev) | 2282 | static void ht_enable_msi_mapping(struct pci_dev *dev) |
2283 | { | 2283 | { |
2284 | int pos, ttl = 48; | 2284 | int pos, ttl = 48; |
2285 | 2285 | ||
@@ -2359,7 +2359,7 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_NVIDIA, | |||
2359 | PCI_DEVICE_ID_NVIDIA_MCP55_BRIDGE_V4, | 2359 | PCI_DEVICE_ID_NVIDIA_MCP55_BRIDGE_V4, |
2360 | nvbridge_check_legacy_irq_routing); | 2360 | nvbridge_check_legacy_irq_routing); |
2361 | 2361 | ||
2362 | static int __devinit ht_check_msi_mapping(struct pci_dev *dev) | 2362 | static int ht_check_msi_mapping(struct pci_dev *dev) |
2363 | { | 2363 | { |
2364 | int pos, ttl = 48; | 2364 | int pos, ttl = 48; |
2365 | int found = 0; | 2365 | int found = 0; |
@@ -2387,7 +2387,7 @@ static int __devinit ht_check_msi_mapping(struct pci_dev *dev) | |||
2387 | return found; | 2387 | return found; |
2388 | } | 2388 | } |
2389 | 2389 | ||
2390 | static int __devinit host_bridge_with_leaf(struct pci_dev *host_bridge) | 2390 | static int host_bridge_with_leaf(struct pci_dev *host_bridge) |
2391 | { | 2391 | { |
2392 | struct pci_dev *dev; | 2392 | struct pci_dev *dev; |
2393 | int pos; | 2393 | int pos; |
@@ -2421,7 +2421,7 @@ static int __devinit host_bridge_with_leaf(struct pci_dev *host_bridge) | |||
2421 | #define PCI_HT_CAP_SLAVE_CTRL0 4 /* link control */ | 2421 | #define PCI_HT_CAP_SLAVE_CTRL0 4 /* link control */ |
2422 | #define PCI_HT_CAP_SLAVE_CTRL1 8 /* link control to */ | 2422 | #define PCI_HT_CAP_SLAVE_CTRL1 8 /* link control to */ |
2423 | 2423 | ||
2424 | static int __devinit is_end_of_ht_chain(struct pci_dev *dev) | 2424 | static int is_end_of_ht_chain(struct pci_dev *dev) |
2425 | { | 2425 | { |
2426 | int pos, ctrl_off; | 2426 | int pos, ctrl_off; |
2427 | int end = 0; | 2427 | int end = 0; |
@@ -2445,7 +2445,7 @@ out: | |||
2445 | return end; | 2445 | return end; |
2446 | } | 2446 | } |
2447 | 2447 | ||
2448 | static void __devinit nv_ht_enable_msi_mapping(struct pci_dev *dev) | 2448 | static void nv_ht_enable_msi_mapping(struct pci_dev *dev) |
2449 | { | 2449 | { |
2450 | struct pci_dev *host_bridge; | 2450 | struct pci_dev *host_bridge; |
2451 | int pos; | 2451 | int pos; |
@@ -2484,7 +2484,7 @@ out: | |||
2484 | pci_dev_put(host_bridge); | 2484 | pci_dev_put(host_bridge); |
2485 | } | 2485 | } |
2486 | 2486 | ||
2487 | static void __devinit ht_disable_msi_mapping(struct pci_dev *dev) | 2487 | static void ht_disable_msi_mapping(struct pci_dev *dev) |
2488 | { | 2488 | { |
2489 | int pos, ttl = 48; | 2489 | int pos, ttl = 48; |
2490 | 2490 | ||
@@ -2504,7 +2504,7 @@ static void __devinit ht_disable_msi_mapping(struct pci_dev *dev) | |||
2504 | } | 2504 | } |
2505 | } | 2505 | } |
2506 | 2506 | ||
2507 | static void __devinit __nv_msi_ht_cap_quirk(struct pci_dev *dev, int all) | 2507 | static void __nv_msi_ht_cap_quirk(struct pci_dev *dev, int all) |
2508 | { | 2508 | { |
2509 | struct pci_dev *host_bridge; | 2509 | struct pci_dev *host_bridge; |
2510 | int pos; | 2510 | int pos; |
@@ -2555,12 +2555,12 @@ out: | |||
2555 | pci_dev_put(host_bridge); | 2555 | pci_dev_put(host_bridge); |
2556 | } | 2556 | } |
2557 | 2557 | ||
2558 | static void __devinit nv_msi_ht_cap_quirk_all(struct pci_dev *dev) | 2558 | static void nv_msi_ht_cap_quirk_all(struct pci_dev *dev) |
2559 | { | 2559 | { |
2560 | return __nv_msi_ht_cap_quirk(dev, 1); | 2560 | return __nv_msi_ht_cap_quirk(dev, 1); |
2561 | } | 2561 | } |
2562 | 2562 | ||
2563 | static void __devinit nv_msi_ht_cap_quirk_leaf(struct pci_dev *dev) | 2563 | static void nv_msi_ht_cap_quirk_leaf(struct pci_dev *dev) |
2564 | { | 2564 | { |
2565 | return __nv_msi_ht_cap_quirk(dev, 0); | 2565 | return __nv_msi_ht_cap_quirk(dev, 0); |
2566 | } | 2566 | } |