aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-12-11 16:13:55 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-11 16:13:55 -0500
commitcff2f741b8ee8a70b208830e330de053efd4fc45 (patch)
tree83367ed74d889e2c8179f1f8b5d6f6f73b857982 /drivers/pci
parentb0885d01f9ab1274109c02942c881d598f939623 (diff)
parent92e9e6d1f9844b73a26215025a922e7d7aeae361 (diff)
Merge tag 'driver-core-3.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core updates from Greg Kroah-Hartman: "Here's the large driver core updates for 3.8-rc1. The biggest thing here is the various __dev* marking removals. This is going to be a pain for the merge with different subsystem trees, I know, but all of the patches included here have been ACKed by their various subsystem maintainers, as they wanted them to go through here. If this is too much of a pain, I can pull all of them out of this tree and just send you one with the other fixes/updates and then, after 3.8-rc1 is out, do the rest of the removals to ensure we catch them all, it's up to you. The merges should all be trivial, and Stephen has been doing them all in linux-next for a few weeks now quite easily. Other than the __dev* marking removals, there's nothing major here, some firmware loading updates and other minor things in the driver core. All of these have (much to Stephen's annoyance), been in linux-next for a while. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>" Fixed up trivial conflicts in drivers/gpio/gpio-{em,stmpe}.c due to gpio update. * tag 'driver-core-3.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (93 commits) modpost.c: Stop checking __dev* section mismatches init.h: Remove __dev* sections from the kernel acpi: remove use of __devinit PCI: Remove __dev* markings PCI: Always build setup-bus when PCI is enabled PCI: Move pci_uevent into pci-driver.c PCI: Remove CONFIG_HOTPLUG ifdefs unicore32/PCI: Remove CONFIG_HOTPLUG ifdefs sh/PCI: Remove CONFIG_HOTPLUG ifdefs powerpc/PCI: Remove CONFIG_HOTPLUG ifdefs mips/PCI: Remove CONFIG_HOTPLUG ifdefs microblaze/PCI: Remove CONFIG_HOTPLUG ifdefs dma: remove use of __devinit dma: remove use of __devexit_p firewire: remove use of __devinitdata firewire: remove use of __devinit leds: remove use of __devexit leds: remove use of __devinit leds: remove use of __devexit_p mmc: remove use of __devexit ...
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/Makefile7
-rw-r--r--drivers/pci/hotplug.c37
-rw-r--r--drivers/pci/hotplug/cpcihp_zt5550.c4
-rw-r--r--drivers/pci/ioapic.c6
-rw-r--r--drivers/pci/pci-driver.c42
-rw-r--r--drivers/pci/pci-sysfs.c7
-rw-r--r--drivers/pci/pci.c4
-rw-r--r--drivers/pci/pci.h5
-rw-r--r--drivers/pci/pcie/aer/aerdrv.c4
-rw-r--r--drivers/pci/pcie/portdrv_pci.c2
-rw-r--r--drivers/pci/probe.c20
-rw-r--r--drivers/pci/quirks.c132
-rw-r--r--drivers/pci/xen-pcifront.c10
13 files changed, 121 insertions, 159 deletions
diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile
index 8d688b260e28..0c3efcffa83b 100644
--- a/drivers/pci/Makefile
+++ b/drivers/pci/Makefile
@@ -4,7 +4,7 @@
4 4
5obj-y += access.o bus.o probe.o host-bridge.o remove.o pci.o \ 5obj-y += access.o bus.o probe.o host-bridge.o remove.o pci.o \
6 pci-driver.o search.o pci-sysfs.o rom.o setup-res.o \ 6 pci-driver.o search.o pci-sysfs.o rom.o setup-res.o \
7 irq.o vpd.o 7 irq.o vpd.o setup-bus.o
8obj-$(CONFIG_PROC_FS) += proc.o 8obj-$(CONFIG_PROC_FS) += proc.o
9obj-$(CONFIG_SYSFS) += slot.o 9obj-$(CONFIG_SYSFS) += slot.o
10 10
@@ -15,8 +15,6 @@ obj-$(CONFIG_PCIEPORTBUS) += pcie/
15 15
16obj-$(CONFIG_PCI_IOAPIC) += ioapic.o 16obj-$(CONFIG_PCI_IOAPIC) += ioapic.o
17 17
18obj-$(CONFIG_HOTPLUG) += hotplug.o
19
20# Build the PCI Hotplug drivers if we were asked to 18# Build the PCI Hotplug drivers if we were asked to
21obj-$(CONFIG_HOTPLUG_PCI) += hotplug/ 19obj-$(CONFIG_HOTPLUG_PCI) += hotplug/
22ifdef CONFIG_HOTPLUG_PCI 20ifdef CONFIG_HOTPLUG_PCI
@@ -60,9 +58,6 @@ obj-$(CONFIG_ACPI) += pci-acpi.o
60# SMBIOS provided firmware instance and labels 58# SMBIOS provided firmware instance and labels
61obj-$(CONFIG_PCI_LABEL) += pci-label.o 59obj-$(CONFIG_PCI_LABEL) += pci-label.o
62 60
63# Cardbus & CompactPCI use setup-bus
64obj-$(CONFIG_HOTPLUG) += setup-bus.o
65
66obj-$(CONFIG_PCI_SYSCALL) += syscall.o 61obj-$(CONFIG_PCI_SYSCALL) += syscall.o
67 62
68obj-$(CONFIG_PCI_STUB) += pci-stub.o 63obj-$(CONFIG_PCI_STUB) += pci-stub.o
diff --git a/drivers/pci/hotplug.c b/drivers/pci/hotplug.c
deleted file mode 100644
index 2b5352a7dffc..000000000000
--- a/drivers/pci/hotplug.c
+++ /dev/null
@@ -1,37 +0,0 @@
1#include <linux/kernel.h>
2#include <linux/pci.h>
3#include <linux/module.h>
4#include "pci.h"
5
6int pci_uevent(struct device *dev, struct kobj_uevent_env *env)
7{
8 struct pci_dev *pdev;
9
10 if (!dev)
11 return -ENODEV;
12
13 pdev = to_pci_dev(dev);
14 if (!pdev)
15 return -ENODEV;
16
17 if (add_uevent_var(env, "PCI_CLASS=%04X", pdev->class))
18 return -ENOMEM;
19
20 if (add_uevent_var(env, "PCI_ID=%04X:%04X", pdev->vendor, pdev->device))
21 return -ENOMEM;
22
23 if (add_uevent_var(env, "PCI_SUBSYS_ID=%04X:%04X", pdev->subsystem_vendor,
24 pdev->subsystem_device))
25 return -ENOMEM;
26
27 if (add_uevent_var(env, "PCI_SLOT_NAME=%s", pci_name(pdev)))
28 return -ENOMEM;
29
30 if (add_uevent_var(env, "MODALIAS=pci:v%08Xd%08Xsv%08Xsd%08Xbc%02Xsc%02Xi%02x",
31 pdev->vendor, pdev->device,
32 pdev->subsystem_vendor, pdev->subsystem_device,
33 (u8)(pdev->class >> 16), (u8)(pdev->class >> 8),
34 (u8)(pdev->class)))
35 return -ENOMEM;
36 return 0;
37}
diff --git a/drivers/pci/hotplug/cpcihp_zt5550.c b/drivers/pci/hotplug/cpcihp_zt5550.c
index 6bf8d2ab164f..449b4bbc8301 100644
--- a/drivers/pci/hotplug/cpcihp_zt5550.c
+++ b/drivers/pci/hotplug/cpcihp_zt5550.c
@@ -271,7 +271,7 @@ init_hc_error:
271 271
272} 272}
273 273
274static void __devexit zt5550_hc_remove_one(struct pci_dev *pdev) 274static void zt5550_hc_remove_one(struct pci_dev *pdev)
275{ 275{
276 cpci_hp_stop(); 276 cpci_hp_stop();
277 cpci_hp_unregister_bus(bus0); 277 cpci_hp_unregister_bus(bus0);
@@ -290,7 +290,7 @@ static struct pci_driver zt5550_hc_driver = {
290 .name = "zt5550_hc", 290 .name = "zt5550_hc",
291 .id_table = zt5550_hc_pci_tbl, 291 .id_table = zt5550_hc_pci_tbl,
292 .probe = zt5550_hc_init_one, 292 .probe = zt5550_hc_init_one,
293 .remove = __devexit_p(zt5550_hc_remove_one), 293 .remove = zt5550_hc_remove_one,
294}; 294};
295 295
296static int __init zt5550_init(void) 296static int __init zt5550_init(void)
diff --git a/drivers/pci/ioapic.c b/drivers/pci/ioapic.c
index 205af8dc83c2..2eca902a4283 100644
--- a/drivers/pci/ioapic.c
+++ b/drivers/pci/ioapic.c
@@ -27,7 +27,7 @@ struct ioapic {
27 u32 gsi_base; 27 u32 gsi_base;
28}; 28};
29 29
30static int __devinit ioapic_probe(struct pci_dev *dev, const struct pci_device_id *ent) 30static int ioapic_probe(struct pci_dev *dev, const struct pci_device_id *ent)
31{ 31{
32 acpi_handle handle; 32 acpi_handle handle;
33 acpi_status status; 33 acpi_status status;
@@ -88,7 +88,7 @@ exit_free:
88 return -ENODEV; 88 return -ENODEV;
89} 89}
90 90
91static void __devexit ioapic_remove(struct pci_dev *dev) 91static void ioapic_remove(struct pci_dev *dev)
92{ 92{
93 struct ioapic *ioapic = pci_get_drvdata(dev); 93 struct ioapic *ioapic = pci_get_drvdata(dev);
94 94
@@ -110,7 +110,7 @@ static struct pci_driver ioapic_driver = {
110 .name = "ioapic", 110 .name = "ioapic",
111 .id_table = ioapic_devices, 111 .id_table = ioapic_devices,
112 .probe = ioapic_probe, 112 .probe = ioapic_probe,
113 .remove = __devexit_p(ioapic_remove), 113 .remove = ioapic_remove,
114}; 114};
115 115
116static int __init ioapic_init(void) 116static int __init ioapic_init(void)
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index 6c94fc9489e7..1dc78c5cabf8 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -89,10 +89,6 @@ static void pci_free_dynids(struct pci_driver *drv)
89 spin_unlock(&drv->dynids.lock); 89 spin_unlock(&drv->dynids.lock);
90} 90}
91 91
92/*
93 * Dynamic device ID manipulation via sysfs is disabled for !CONFIG_HOTPLUG
94 */
95#ifdef CONFIG_HOTPLUG
96/** 92/**
97 * store_new_id - sysfs frontend to pci_add_dynid() 93 * store_new_id - sysfs frontend to pci_add_dynid()
98 * @driver: target device driver 94 * @driver: target device driver
@@ -191,10 +187,6 @@ static struct driver_attribute pci_drv_attrs[] = {
191 __ATTR_NULL, 187 __ATTR_NULL,
192}; 188};
193 189
194#else
195#define pci_drv_attrs NULL
196#endif /* CONFIG_HOTPLUG */
197
198/** 190/**
199 * pci_match_id - See if a pci device matches a given pci_id table 191 * pci_match_id - See if a pci device matches a given pci_id table
200 * @ids: array of PCI device id structures to search in 192 * @ids: array of PCI device id structures to search in
@@ -1223,12 +1215,38 @@ void pci_dev_put(struct pci_dev *dev)
1223 put_device(&dev->dev); 1215 put_device(&dev->dev);
1224} 1216}
1225 1217
1226#ifndef CONFIG_HOTPLUG 1218static int pci_uevent(struct device *dev, struct kobj_uevent_env *env)
1227int pci_uevent(struct device *dev, struct kobj_uevent_env *env)
1228{ 1219{
1229 return -ENODEV; 1220 struct pci_dev *pdev;
1221
1222 if (!dev)
1223 return -ENODEV;
1224
1225 pdev = to_pci_dev(dev);
1226 if (!pdev)
1227 return -ENODEV;
1228
1229 if (add_uevent_var(env, "PCI_CLASS=%04X", pdev->class))
1230 return -ENOMEM;
1231
1232 if (add_uevent_var(env, "PCI_ID=%04X:%04X", pdev->vendor, pdev->device))
1233 return -ENOMEM;
1234
1235 if (add_uevent_var(env, "PCI_SUBSYS_ID=%04X:%04X", pdev->subsystem_vendor,
1236 pdev->subsystem_device))
1237 return -ENOMEM;
1238
1239 if (add_uevent_var(env, "PCI_SLOT_NAME=%s", pci_name(pdev)))
1240 return -ENOMEM;
1241
1242 if (add_uevent_var(env, "MODALIAS=pci:v%08Xd%08Xsv%08Xsd%08Xbc%02Xsc%02Xi%02x",
1243 pdev->vendor, pdev->device,
1244 pdev->subsystem_vendor, pdev->subsystem_device,
1245 (u8)(pdev->class >> 16), (u8)(pdev->class >> 8),
1246 (u8)(pdev->class)))
1247 return -ENOMEM;
1248 return 0;
1230} 1249}
1231#endif
1232 1250
1233struct bus_type pci_bus_type = { 1251struct bus_type pci_bus_type = {
1234 .name = "pci", 1252 .name = "pci",
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
index f39378d9da15..68d56f02e721 100644
--- a/drivers/pci/pci-sysfs.c
+++ b/drivers/pci/pci-sysfs.c
@@ -284,7 +284,6 @@ msi_bus_store(struct device *dev, struct device_attribute *attr,
284 return count; 284 return count;
285} 285}
286 286
287#ifdef CONFIG_HOTPLUG
288static DEFINE_MUTEX(pci_remove_rescan_mutex); 287static DEFINE_MUTEX(pci_remove_rescan_mutex);
289static ssize_t bus_rescan_store(struct bus_type *bus, const char *buf, 288static ssize_t bus_rescan_store(struct bus_type *bus, const char *buf,
290 size_t count) 289 size_t count)
@@ -377,8 +376,6 @@ dev_bus_rescan_store(struct device *dev, struct device_attribute *attr,
377 return count; 376 return count;
378} 377}
379 378
380#endif
381
382#if defined(CONFIG_PM_RUNTIME) && defined(CONFIG_ACPI) 379#if defined(CONFIG_PM_RUNTIME) && defined(CONFIG_ACPI)
383static ssize_t d3cold_allowed_store(struct device *dev, 380static ssize_t d3cold_allowed_store(struct device *dev,
384 struct device_attribute *attr, 381 struct device_attribute *attr,
@@ -424,10 +421,8 @@ struct device_attribute pci_dev_attrs[] = {
424 __ATTR(broken_parity_status,(S_IRUGO|S_IWUSR), 421 __ATTR(broken_parity_status,(S_IRUGO|S_IWUSR),
425 broken_parity_status_show,broken_parity_status_store), 422 broken_parity_status_show,broken_parity_status_store),
426 __ATTR(msi_bus, 0644, msi_bus_show, msi_bus_store), 423 __ATTR(msi_bus, 0644, msi_bus_show, msi_bus_store),
427#ifdef CONFIG_HOTPLUG
428 __ATTR(remove, (S_IWUSR|S_IWGRP), NULL, remove_store), 424 __ATTR(remove, (S_IWUSR|S_IWGRP), NULL, remove_store),
429 __ATTR(rescan, (S_IWUSR|S_IWGRP), NULL, dev_rescan_store), 425 __ATTR(rescan, (S_IWUSR|S_IWGRP), NULL, dev_rescan_store),
430#endif
431#if defined(CONFIG_PM_RUNTIME) && defined(CONFIG_ACPI) 426#if defined(CONFIG_PM_RUNTIME) && defined(CONFIG_ACPI)
432 __ATTR(d3cold_allowed, 0644, d3cold_allowed_show, d3cold_allowed_store), 427 __ATTR(d3cold_allowed, 0644, d3cold_allowed_show, d3cold_allowed_store),
433#endif 428#endif
@@ -435,9 +430,7 @@ struct device_attribute pci_dev_attrs[] = {
435}; 430};
436 431
437struct device_attribute pcibus_dev_attrs[] = { 432struct device_attribute pcibus_dev_attrs[] = {
438#ifdef CONFIG_HOTPLUG
439 __ATTR(rescan, (S_IWUSR|S_IWGRP), NULL, dev_bus_rescan_store), 433 __ATTR(rescan, (S_IWUSR|S_IWGRP), NULL, dev_bus_rescan_store),
440#endif
441 __ATTR(cpuaffinity, S_IRUGO, pci_bus_show_cpumaskaffinity, NULL), 434 __ATTR(cpuaffinity, S_IRUGO, pci_bus_show_cpumaskaffinity, NULL),
442 __ATTR(cpulistaffinity, S_IRUGO, pci_bus_show_cpulistaffinity, NULL), 435 __ATTR(cpulistaffinity, S_IRUGO, pci_bus_show_cpulistaffinity, NULL),
443 __ATTR_NULL, 436 __ATTR_NULL,
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index aabf64798bda..bdf66b500f22 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -86,7 +86,7 @@ enum pcie_bus_config_types pcie_bus_config = PCIE_BUS_TUNE_OFF;
86 * the dfl or actual value as it sees fit. Don't forget this is 86 * the dfl or actual value as it sees fit. Don't forget this is
87 * measured in 32-bit words, not bytes. 87 * measured in 32-bit words, not bytes.
88 */ 88 */
89u8 pci_dfl_cache_line_size __devinitdata = L1_CACHE_BYTES >> 2; 89u8 pci_dfl_cache_line_size = L1_CACHE_BYTES >> 2;
90u8 pci_cache_line_size; 90u8 pci_cache_line_size;
91 91
92/* 92/*
@@ -3857,7 +3857,7 @@ static int __init pci_resource_alignment_sysfs_init(void)
3857 3857
3858late_initcall(pci_resource_alignment_sysfs_init); 3858late_initcall(pci_resource_alignment_sysfs_init);
3859 3859
3860static void __devinit pci_no_domains(void) 3860static void pci_no_domains(void)
3861{ 3861{
3862#ifdef CONFIG_PCI_DOMAINS 3862#ifdef CONFIG_PCI_DOMAINS
3863 pci_domains_supported = 0; 3863 pci_domains_supported = 0;
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
index fd92aab9904b..e253881c4275 100644
--- a/drivers/pci/pci.h
+++ b/drivers/pci/pci.h
@@ -8,7 +8,6 @@
8 8
9/* Functions internal to the PCI core code */ 9/* Functions internal to the PCI core code */
10 10
11extern int pci_uevent(struct device *dev, struct kobj_uevent_env *env);
12extern int pci_create_sysfs_dev_files(struct pci_dev *pdev); 11extern int pci_create_sysfs_dev_files(struct pci_dev *pdev);
13extern void pci_remove_sysfs_dev_files(struct pci_dev *pdev); 12extern void pci_remove_sysfs_dev_files(struct pci_dev *pdev);
14#if !defined(CONFIG_DMI) && !defined(CONFIG_ACPI) 13#if !defined(CONFIG_DMI) && !defined(CONFIG_ACPI)
@@ -159,11 +158,7 @@ static inline int pci_no_d1d2(struct pci_dev *dev)
159} 158}
160extern struct device_attribute pci_dev_attrs[]; 159extern struct device_attribute pci_dev_attrs[];
161extern struct device_attribute pcibus_dev_attrs[]; 160extern struct device_attribute pcibus_dev_attrs[];
162#ifdef CONFIG_HOTPLUG
163extern struct bus_attribute pci_bus_attrs[]; 161extern struct bus_attribute pci_bus_attrs[];
164#else
165#define pci_bus_attrs NULL
166#endif
167 162
168 163
169/** 164/**
diff --git a/drivers/pci/pcie/aer/aerdrv.c b/drivers/pci/pcie/aer/aerdrv.c
index 030cf12d5468..76ef634caf6f 100644
--- a/drivers/pci/pcie/aer/aerdrv.c
+++ b/drivers/pci/pcie/aer/aerdrv.c
@@ -41,7 +41,7 @@ MODULE_AUTHOR(DRIVER_AUTHOR);
41MODULE_DESCRIPTION(DRIVER_DESC); 41MODULE_DESCRIPTION(DRIVER_DESC);
42MODULE_LICENSE("GPL"); 42MODULE_LICENSE("GPL");
43 43
44static int __devinit aer_probe(struct pcie_device *dev); 44static int aer_probe(struct pcie_device *dev);
45static void aer_remove(struct pcie_device *dev); 45static void aer_remove(struct pcie_device *dev);
46static pci_ers_result_t aer_error_detected(struct pci_dev *dev, 46static pci_ers_result_t aer_error_detected(struct pci_dev *dev,
47 enum pci_channel_state error); 47 enum pci_channel_state error);
@@ -300,7 +300,7 @@ static void aer_remove(struct pcie_device *dev)
300 * 300 *
301 * Invoked when PCI Express bus loads AER service driver. 301 * Invoked when PCI Express bus loads AER service driver.
302 */ 302 */
303static int __devinit aer_probe(struct pcie_device *dev) 303static int aer_probe(struct pcie_device *dev)
304{ 304{
305 int status; 305 int status;
306 struct aer_rpc *rpc; 306 struct aer_rpc *rpc;
diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c
index 0761d90ca279..d4824cb78b49 100644
--- a/drivers/pci/pcie/portdrv_pci.c
+++ b/drivers/pci/pcie/portdrv_pci.c
@@ -182,7 +182,7 @@ static const struct pci_device_id port_runtime_pm_black_list[] = {
182 * this port device. 182 * this port device.
183 * 183 *
184 */ 184 */
185static int __devinit pcie_portdrv_probe(struct pci_dev *dev, 185static int pcie_portdrv_probe(struct pci_dev *dev,
186 const struct pci_device_id *id) 186 const struct pci_device_id *id)
187{ 187{
188 int status; 188 int status;
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index ec909afa90b6..3683f6094e3f 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -305,7 +305,7 @@ static void pci_read_bases(struct pci_dev *dev, unsigned int howmany, int rom)
305 } 305 }
306} 306}
307 307
308static void __devinit pci_read_bridge_io(struct pci_bus *child) 308static void pci_read_bridge_io(struct pci_bus *child)
309{ 309{
310 struct pci_dev *dev = child->self; 310 struct pci_dev *dev = child->self;
311 u8 io_base_lo, io_limit_lo; 311 u8 io_base_lo, io_limit_lo;
@@ -345,7 +345,7 @@ static void __devinit pci_read_bridge_io(struct pci_bus *child)
345 } 345 }
346} 346}
347 347
348static void __devinit pci_read_bridge_mmio(struct pci_bus *child) 348static void pci_read_bridge_mmio(struct pci_bus *child)
349{ 349{
350 struct pci_dev *dev = child->self; 350 struct pci_dev *dev = child->self;
351 u16 mem_base_lo, mem_limit_lo; 351 u16 mem_base_lo, mem_limit_lo;
@@ -367,7 +367,7 @@ static void __devinit pci_read_bridge_mmio(struct pci_bus *child)
367 } 367 }
368} 368}
369 369
370static void __devinit pci_read_bridge_mmio_pref(struct pci_bus *child) 370static void pci_read_bridge_mmio_pref(struct pci_bus *child)
371{ 371{
372 struct pci_dev *dev = child->self; 372 struct pci_dev *dev = child->self;
373 u16 mem_base_lo, mem_limit_lo; 373 u16 mem_base_lo, mem_limit_lo;
@@ -417,7 +417,7 @@ static void __devinit pci_read_bridge_mmio_pref(struct pci_bus *child)
417 } 417 }
418} 418}
419 419
420void __devinit pci_read_bridge_bases(struct pci_bus *child) 420void pci_read_bridge_bases(struct pci_bus *child)
421{ 421{
422 struct pci_dev *dev = child->self; 422 struct pci_dev *dev = child->self;
423 struct resource *res; 423 struct resource *res;
@@ -705,7 +705,7 @@ static void pci_fixup_parent_subordinate_busnr(struct pci_bus *child, int max)
705 * them, we proceed to assigning numbers to the remaining buses in 705 * them, we proceed to assigning numbers to the remaining buses in
706 * order to avoid overlaps between old and new bus numbers. 706 * order to avoid overlaps between old and new bus numbers.
707 */ 707 */
708int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, int pass) 708int pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, int pass)
709{ 709{
710 struct pci_bus *child; 710 struct pci_bus *child;
711 int is_cardbus = (dev->hdr_type == PCI_HEADER_TYPE_CARDBUS); 711 int is_cardbus = (dev->hdr_type == PCI_HEADER_TYPE_CARDBUS);
@@ -1586,7 +1586,7 @@ void pcie_bus_configure_settings(struct pci_bus *bus, u8 mpss)
1586} 1586}
1587EXPORT_SYMBOL_GPL(pcie_bus_configure_settings); 1587EXPORT_SYMBOL_GPL(pcie_bus_configure_settings);
1588 1588
1589unsigned int __devinit pci_scan_child_bus(struct pci_bus *bus) 1589unsigned int pci_scan_child_bus(struct pci_bus *bus)
1590{ 1590{
1591 unsigned int devfn, pass, max = bus->busn_res.start; 1591 unsigned int devfn, pass, max = bus->busn_res.start;
1592 struct pci_dev *dev; 1592 struct pci_dev *dev;
@@ -1790,7 +1790,7 @@ void pci_bus_release_busn_res(struct pci_bus *b)
1790 res, ret ? "can not be" : "is"); 1790 res, ret ? "can not be" : "is");
1791} 1791}
1792 1792
1793struct pci_bus * __devinit pci_scan_root_bus(struct device *parent, int bus, 1793struct pci_bus *pci_scan_root_bus(struct device *parent, int bus,
1794 struct pci_ops *ops, void *sysdata, struct list_head *resources) 1794 struct pci_ops *ops, void *sysdata, struct list_head *resources)
1795{ 1795{
1796 struct pci_host_bridge_window *window; 1796 struct pci_host_bridge_window *window;
@@ -1826,7 +1826,7 @@ struct pci_bus * __devinit pci_scan_root_bus(struct device *parent, int bus,
1826EXPORT_SYMBOL(pci_scan_root_bus); 1826EXPORT_SYMBOL(pci_scan_root_bus);
1827 1827
1828/* Deprecated; use pci_scan_root_bus() instead */ 1828/* Deprecated; use pci_scan_root_bus() instead */
1829struct pci_bus * __devinit pci_scan_bus_parented(struct device *parent, 1829struct pci_bus *pci_scan_bus_parented(struct device *parent,
1830 int bus, struct pci_ops *ops, void *sysdata) 1830 int bus, struct pci_ops *ops, void *sysdata)
1831{ 1831{
1832 LIST_HEAD(resources); 1832 LIST_HEAD(resources);
@@ -1844,7 +1844,7 @@ struct pci_bus * __devinit pci_scan_bus_parented(struct device *parent,
1844} 1844}
1845EXPORT_SYMBOL(pci_scan_bus_parented); 1845EXPORT_SYMBOL(pci_scan_bus_parented);
1846 1846
1847struct pci_bus * __devinit pci_scan_bus(int bus, struct pci_ops *ops, 1847struct pci_bus *pci_scan_bus(int bus, struct pci_ops *ops,
1848 void *sysdata) 1848 void *sysdata)
1849{ 1849{
1850 LIST_HEAD(resources); 1850 LIST_HEAD(resources);
@@ -1864,7 +1864,6 @@ struct pci_bus * __devinit pci_scan_bus(int bus, struct pci_ops *ops,
1864} 1864}
1865EXPORT_SYMBOL(pci_scan_bus); 1865EXPORT_SYMBOL(pci_scan_bus);
1866 1866
1867#ifdef CONFIG_HOTPLUG
1868/** 1867/**
1869 * pci_rescan_bus_bridge_resize - scan a PCI bus for devices. 1868 * pci_rescan_bus_bridge_resize - scan a PCI bus for devices.
1870 * @bridge: PCI bridge for the bus to scan 1869 * @bridge: PCI bridge for the bus to scan
@@ -1894,7 +1893,6 @@ EXPORT_SYMBOL(pci_add_new_bus);
1894EXPORT_SYMBOL(pci_scan_slot); 1893EXPORT_SYMBOL(pci_scan_slot);
1895EXPORT_SYMBOL(pci_scan_bridge); 1894EXPORT_SYMBOL(pci_scan_bridge);
1896EXPORT_SYMBOL_GPL(pci_scan_child_bus); 1895EXPORT_SYMBOL_GPL(pci_scan_child_bus);
1897#endif
1898 1896
1899static int __init pci_sort_bf_cmp(const struct device *d_a, const struct device *d_b) 1897static int __init pci_sort_bf_cmp(const struct device *d_a, const struct device *d_b)
1900{ 1898{
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 7a451ff56ecc..22ad3ee0cf0b 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -37,7 +37,7 @@
37 * key system devices. For devices that need to have mmio decoding always-on, 37 * key system devices. For devices that need to have mmio decoding always-on,
38 * we need to set the dev->mmio_always_on bit. 38 * we need to set the dev->mmio_always_on bit.
39 */ 39 */
40static void __devinit quirk_mmio_always_on(struct pci_dev *dev) 40static void quirk_mmio_always_on(struct pci_dev *dev)
41{ 41{
42 dev->mmio_always_on = 1; 42 dev->mmio_always_on = 1;
43} 43}
@@ -48,7 +48,7 @@ DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_ANY_ID, PCI_ANY_ID,
48 * Mark this device with a broken_parity_status, to allow 48 * Mark this device with a broken_parity_status, to allow
49 * PCI scanning code to "skip" this now blacklisted device. 49 * PCI scanning code to "skip" this now blacklisted device.
50 */ 50 */
51static void __devinit quirk_mellanox_tavor(struct pci_dev *dev) 51static void quirk_mellanox_tavor(struct pci_dev *dev)
52{ 52{
53 dev->broken_parity_status = 1; /* This device gives false positives */ 53 dev->broken_parity_status = 1; /* This device gives false positives */
54} 54}
@@ -83,7 +83,7 @@ DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82441, quirk_p
83 This appears to be BIOS not version dependent. So presumably there is a 83 This appears to be BIOS not version dependent. So presumably there is a
84 chipset level fix */ 84 chipset level fix */
85 85
86static void __devinit quirk_isa_dma_hangs(struct pci_dev *dev) 86static void quirk_isa_dma_hangs(struct pci_dev *dev)
87{ 87{
88 if (!isa_dma_bridge_buggy) { 88 if (!isa_dma_bridge_buggy) {
89 isa_dma_bridge_buggy=1; 89 isa_dma_bridge_buggy=1;
@@ -106,7 +106,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_CBUS_3, quirk_isa_d
106 * Intel NM10 "TigerPoint" LPC PM1a_STS.BM_STS must be clear 106 * Intel NM10 "TigerPoint" LPC PM1a_STS.BM_STS must be clear
107 * for some HT machines to use C4 w/o hanging. 107 * for some HT machines to use C4 w/o hanging.
108 */ 108 */
109static void __devinit quirk_tigerpoint_bm_sts(struct pci_dev *dev) 109static void quirk_tigerpoint_bm_sts(struct pci_dev *dev)
110{ 110{
111 u32 pmbase; 111 u32 pmbase;
112 u16 pm1a; 112 u16 pm1a;
@@ -125,7 +125,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_TGP_LPC, quirk
125/* 125/*
126 * Chipsets where PCI->PCI transfers vanish or hang 126 * Chipsets where PCI->PCI transfers vanish or hang
127 */ 127 */
128static void __devinit quirk_nopcipci(struct pci_dev *dev) 128static void quirk_nopcipci(struct pci_dev *dev)
129{ 129{
130 if ((pci_pci_problems & PCIPCI_FAIL)==0) { 130 if ((pci_pci_problems & PCIPCI_FAIL)==0) {
131 dev_info(&dev->dev, "Disabling direct PCI/PCI transfers\n"); 131 dev_info(&dev->dev, "Disabling direct PCI/PCI transfers\n");
@@ -135,7 +135,7 @@ static void __devinit quirk_nopcipci(struct pci_dev *dev)
135DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5597, quirk_nopcipci); 135DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_5597, quirk_nopcipci);
136DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_496, quirk_nopcipci); 136DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_496, quirk_nopcipci);
137 137
138static void __devinit quirk_nopciamd(struct pci_dev *dev) 138static void quirk_nopciamd(struct pci_dev *dev)
139{ 139{
140 u8 rev; 140 u8 rev;
141 pci_read_config_byte(dev, 0x08, &rev); 141 pci_read_config_byte(dev, 0x08, &rev);
@@ -150,7 +150,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8151_0, quirk_nopci
150/* 150/*
151 * Triton requires workarounds to be used by the drivers 151 * Triton requires workarounds to be used by the drivers
152 */ 152 */
153static void __devinit quirk_triton(struct pci_dev *dev) 153static void quirk_triton(struct pci_dev *dev)
154{ 154{
155 if ((pci_pci_problems&PCIPCI_TRITON)==0) { 155 if ((pci_pci_problems&PCIPCI_TRITON)==0) {
156 dev_info(&dev->dev, "Limiting direct PCI/PCI transfers\n"); 156 dev_info(&dev->dev, "Limiting direct PCI/PCI transfers\n");
@@ -229,7 +229,7 @@ DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8361, quirk_viala
229/* 229/*
230 * VIA Apollo VP3 needs ETBF on BT848/878 230 * VIA Apollo VP3 needs ETBF on BT848/878
231 */ 231 */
232static void __devinit quirk_viaetbf(struct pci_dev *dev) 232static void quirk_viaetbf(struct pci_dev *dev)
233{ 233{
234 if ((pci_pci_problems&PCIPCI_VIAETBF)==0) { 234 if ((pci_pci_problems&PCIPCI_VIAETBF)==0) {
235 dev_info(&dev->dev, "Limiting direct PCI/PCI transfers\n"); 235 dev_info(&dev->dev, "Limiting direct PCI/PCI transfers\n");
@@ -238,7 +238,7 @@ static void __devinit quirk_viaetbf(struct pci_dev *dev)
238} 238}
239DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C597_0, quirk_viaetbf); 239DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C597_0, quirk_viaetbf);
240 240
241static void __devinit quirk_vsfx(struct pci_dev *dev) 241static void quirk_vsfx(struct pci_dev *dev)
242{ 242{
243 if ((pci_pci_problems&PCIPCI_VSFX)==0) { 243 if ((pci_pci_problems&PCIPCI_VSFX)==0) {
244 dev_info(&dev->dev, "Limiting direct PCI/PCI transfers\n"); 244 dev_info(&dev->dev, "Limiting direct PCI/PCI transfers\n");
@@ -253,7 +253,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C576, quirk_vsfx)
253 * workaround applied too 253 * workaround applied too
254 * [Info kindly provided by ALi] 254 * [Info kindly provided by ALi]
255 */ 255 */
256static void __devinit quirk_alimagik(struct pci_dev *dev) 256static void quirk_alimagik(struct pci_dev *dev)
257{ 257{
258 if ((pci_pci_problems&PCIPCI_ALIMAGIK)==0) { 258 if ((pci_pci_problems&PCIPCI_ALIMAGIK)==0) {
259 dev_info(&dev->dev, "Limiting direct PCI/PCI transfers\n"); 259 dev_info(&dev->dev, "Limiting direct PCI/PCI transfers\n");
@@ -267,7 +267,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1651, quirk_alimag
267 * Natoma has some interesting boundary conditions with Zoran stuff 267 * Natoma has some interesting boundary conditions with Zoran stuff
268 * at least 268 * at least
269 */ 269 */
270static void __devinit quirk_natoma(struct pci_dev *dev) 270static void quirk_natoma(struct pci_dev *dev)
271{ 271{
272 if ((pci_pci_problems&PCIPCI_NATOMA)==0) { 272 if ((pci_pci_problems&PCIPCI_NATOMA)==0) {
273 dev_info(&dev->dev, "Limiting direct PCI/PCI transfers\n"); 273 dev_info(&dev->dev, "Limiting direct PCI/PCI transfers\n");
@@ -285,7 +285,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443BX_2, qu
285 * This chip can cause PCI parity errors if config register 0xA0 is read 285 * This chip can cause PCI parity errors if config register 0xA0 is read
286 * while DMAs are occurring. 286 * while DMAs are occurring.
287 */ 287 */
288static void __devinit quirk_citrine(struct pci_dev *dev) 288static void quirk_citrine(struct pci_dev *dev)
289{ 289{
290 dev->cfg_size = 0xA0; 290 dev->cfg_size = 0xA0;
291} 291}
@@ -295,7 +295,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_CITRINE, quirk_cit
295 * S3 868 and 968 chips report region size equal to 32M, but they decode 64M. 295 * S3 868 and 968 chips report region size equal to 32M, but they decode 64M.
296 * If it's needed, re-allocate the region. 296 * If it's needed, re-allocate the region.
297 */ 297 */
298static void __devinit quirk_s3_64M(struct pci_dev *dev) 298static void quirk_s3_64M(struct pci_dev *dev)
299{ 299{
300 struct resource *r = &dev->resource[0]; 300 struct resource *r = &dev->resource[0];
301 301
@@ -313,7 +313,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_S3, PCI_DEVICE_ID_S3_968, quirk_s3_64M);
313 * BAR0 should be 8 bytes; instead, it may be set to something like 8k 313 * BAR0 should be 8 bytes; instead, it may be set to something like 8k
314 * (which conflicts w/ BAR1's memory range). 314 * (which conflicts w/ BAR1's memory range).
315 */ 315 */
316static void __devinit quirk_cs5536_vsa(struct pci_dev *dev) 316static void quirk_cs5536_vsa(struct pci_dev *dev)
317{ 317{
318 if (pci_resource_len(dev, 0) != 8) { 318 if (pci_resource_len(dev, 0) != 8) {
319 struct resource *res = &dev->resource[0]; 319 struct resource *res = &dev->resource[0];
@@ -324,7 +324,7 @@ static void __devinit quirk_cs5536_vsa(struct pci_dev *dev)
324} 324}
325DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_ISA, quirk_cs5536_vsa); 325DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_ISA, quirk_cs5536_vsa);
326 326
327static void __devinit quirk_io_region(struct pci_dev *dev, unsigned region, 327static void quirk_io_region(struct pci_dev *dev, unsigned region,
328 unsigned size, int nr, const char *name) 328 unsigned size, int nr, const char *name)
329{ 329{
330 region &= ~(size-1); 330 region &= ~(size-1);
@@ -352,7 +352,7 @@ static void __devinit quirk_io_region(struct pci_dev *dev, unsigned region,
352 * ATI Northbridge setups MCE the processor if you even 352 * ATI Northbridge setups MCE the processor if you even
353 * read somewhere between 0x3b0->0x3bb or read 0x3d3 353 * read somewhere between 0x3b0->0x3bb or read 0x3d3
354 */ 354 */
355static void __devinit quirk_ati_exploding_mce(struct pci_dev *dev) 355static void quirk_ati_exploding_mce(struct pci_dev *dev)
356{ 356{
357 dev_info(&dev->dev, "ATI Northbridge, reserving I/O ports 0x3b0 to 0x3bb\n"); 357 dev_info(&dev->dev, "ATI Northbridge, reserving I/O ports 0x3b0 to 0x3bb\n");
358 /* Mae rhaid i ni beidio ag edrych ar y lleoliadiau I/O hyn */ 358 /* Mae rhaid i ni beidio ag edrych ar y lleoliadiau I/O hyn */
@@ -372,7 +372,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS100, quirk_ati_
372 * 0xE0 (64 bytes of ACPI registers) 372 * 0xE0 (64 bytes of ACPI registers)
373 * 0xE2 (32 bytes of SMB registers) 373 * 0xE2 (32 bytes of SMB registers)
374 */ 374 */
375static void __devinit quirk_ali7101_acpi(struct pci_dev *dev) 375static void quirk_ali7101_acpi(struct pci_dev *dev)
376{ 376{
377 u16 region; 377 u16 region;
378 378
@@ -440,7 +440,7 @@ static void piix4_mem_quirk(struct pci_dev *dev, const char *name, unsigned int
440 * 0x90 (16 bytes of SMB registers) 440 * 0x90 (16 bytes of SMB registers)
441 * and a few strange programmable PIIX4 device resources. 441 * and a few strange programmable PIIX4 device resources.
442 */ 442 */
443static void __devinit quirk_piix4_acpi(struct pci_dev *dev) 443static void quirk_piix4_acpi(struct pci_dev *dev)
444{ 444{
445 u32 region, res_a; 445 u32 region, res_a;
446 446
@@ -489,7 +489,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443MX_3, qui
489 * 0x40 (128 bytes of ACPI, GPIO & TCO registers) 489 * 0x40 (128 bytes of ACPI, GPIO & TCO registers)
490 * 0x58 (64 bytes of GPIO I/O space) 490 * 0x58 (64 bytes of GPIO I/O space)
491 */ 491 */
492static void __devinit quirk_ich4_lpc_acpi(struct pci_dev *dev) 492static void quirk_ich4_lpc_acpi(struct pci_dev *dev)
493{ 493{
494 u32 region; 494 u32 region;
495 u8 enable; 495 u8 enable;
@@ -531,7 +531,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_12,
531DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_0, quirk_ich4_lpc_acpi); 531DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_0, quirk_ich4_lpc_acpi);
532DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB_1, quirk_ich4_lpc_acpi); 532DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB_1, quirk_ich4_lpc_acpi);
533 533
534static void __devinit ich6_lpc_acpi_gpio(struct pci_dev *dev) 534static void ich6_lpc_acpi_gpio(struct pci_dev *dev)
535{ 535{
536 u32 region; 536 u32 region;
537 u8 enable; 537 u8 enable;
@@ -555,7 +555,7 @@ static void __devinit ich6_lpc_acpi_gpio(struct pci_dev *dev)
555 } 555 }
556} 556}
557 557
558static void __devinit ich6_lpc_generic_decode(struct pci_dev *dev, unsigned reg, const char *name, int dynsize) 558static void ich6_lpc_generic_decode(struct pci_dev *dev, unsigned reg, const char *name, int dynsize)
559{ 559{
560 u32 val; 560 u32 val;
561 u32 size, base; 561 u32 size, base;
@@ -583,7 +583,7 @@ static void __devinit ich6_lpc_generic_decode(struct pci_dev *dev, unsigned reg,
583 dev_info(&dev->dev, "%s PIO at %04x-%04x\n", name, base, base+size-1); 583 dev_info(&dev->dev, "%s PIO at %04x-%04x\n", name, base, base+size-1);
584} 584}
585 585
586static void __devinit quirk_ich6_lpc(struct pci_dev *dev) 586static void quirk_ich6_lpc(struct pci_dev *dev)
587{ 587{
588 /* Shared ACPI/GPIO decode with all ICH6+ */ 588 /* Shared ACPI/GPIO decode with all ICH6+ */
589 ich6_lpc_acpi_gpio(dev); 589 ich6_lpc_acpi_gpio(dev);
@@ -595,7 +595,7 @@ static void __devinit quirk_ich6_lpc(struct pci_dev *dev)
595DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_0, quirk_ich6_lpc); 595DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_0, quirk_ich6_lpc);
596DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_1, quirk_ich6_lpc); 596DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_1, quirk_ich6_lpc);
597 597
598static void __devinit ich7_lpc_generic_decode(struct pci_dev *dev, unsigned reg, const char *name) 598static void ich7_lpc_generic_decode(struct pci_dev *dev, unsigned reg, const char *name)
599{ 599{
600 u32 val; 600 u32 val;
601 u32 mask, base; 601 u32 mask, base;
@@ -619,7 +619,7 @@ static void __devinit ich7_lpc_generic_decode(struct pci_dev *dev, unsigned reg,
619} 619}
620 620
621/* ICH7-10 has the same common LPC generic IO decode registers */ 621/* ICH7-10 has the same common LPC generic IO decode registers */
622static void __devinit quirk_ich7_lpc(struct pci_dev *dev) 622static void quirk_ich7_lpc(struct pci_dev *dev)
623{ 623{
624 /* We share the common ACPI/GPIO decode with ICH6 */ 624 /* We share the common ACPI/GPIO decode with ICH6 */
625 ich6_lpc_acpi_gpio(dev); 625 ich6_lpc_acpi_gpio(dev);
@@ -648,7 +648,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH10_1, qui
648 * VIA ACPI: One IO region pointed to by longword at 648 * VIA ACPI: One IO region pointed to by longword at
649 * 0x48 or 0x20 (256 bytes of ACPI registers) 649 * 0x48 or 0x20 (256 bytes of ACPI registers)
650 */ 650 */
651static void __devinit quirk_vt82c586_acpi(struct pci_dev *dev) 651static void quirk_vt82c586_acpi(struct pci_dev *dev)
652{ 652{
653 u32 region; 653 u32 region;
654 654
@@ -666,7 +666,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_3, quirk_vt
666 * 0x70 (128 bytes of hardware monitoring register) 666 * 0x70 (128 bytes of hardware monitoring register)
667 * 0x90 (16 bytes of SMB registers) 667 * 0x90 (16 bytes of SMB registers)
668 */ 668 */
669static void __devinit quirk_vt82c686_acpi(struct pci_dev *dev) 669static void quirk_vt82c686_acpi(struct pci_dev *dev)
670{ 670{
671 u16 hm; 671 u16 hm;
672 u32 smb; 672 u32 smb;
@@ -688,7 +688,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686_4, quirk_vt
688 * 0x88 (128 bytes of power management registers) 688 * 0x88 (128 bytes of power management registers)
689 * 0xd0 (16 bytes of SMB registers) 689 * 0xd0 (16 bytes of SMB registers)
690 */ 690 */
691static void __devinit quirk_vt8235_acpi(struct pci_dev *dev) 691static void quirk_vt8235_acpi(struct pci_dev *dev)
692{ 692{
693 u16 pm, smb; 693 u16 pm, smb;
694 694
@@ -706,7 +706,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8235, quirk_vt8235
706 * TI XIO2000a PCIe-PCI Bridge erroneously reports it supports fast back-to-back: 706 * TI XIO2000a PCIe-PCI Bridge erroneously reports it supports fast back-to-back:
707 * Disable fast back-to-back on the secondary bus segment 707 * Disable fast back-to-back on the secondary bus segment
708 */ 708 */
709static void __devinit quirk_xio2000a(struct pci_dev *dev) 709static void quirk_xio2000a(struct pci_dev *dev)
710{ 710{
711 struct pci_dev *pdev; 711 struct pci_dev *pdev;
712 u16 command; 712 u16 command;
@@ -780,7 +780,7 @@ DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237, quirk
780 * noapic specified. For the moment we assume it's the erratum. We may be wrong 780 * noapic specified. For the moment we assume it's the erratum. We may be wrong
781 * of course. However the advice is demonstrably good even if so.. 781 * of course. However the advice is demonstrably good even if so..
782 */ 782 */
783static void __devinit quirk_amd_ioapic(struct pci_dev *dev) 783static void quirk_amd_ioapic(struct pci_dev *dev)
784{ 784{
785 if (dev->revision >= 0x02) { 785 if (dev->revision >= 0x02) {
786 dev_warn(&dev->dev, "I/O APIC: AMD Erratum #22 may be present. In the event of instability try\n"); 786 dev_warn(&dev->dev, "I/O APIC: AMD Erratum #22 may be present. In the event of instability try\n");
@@ -789,7 +789,7 @@ static void __devinit quirk_amd_ioapic(struct pci_dev *dev)
789} 789}
790DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VIPER_7410, quirk_amd_ioapic); 790DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VIPER_7410, quirk_amd_ioapic);
791 791
792static void __devinit quirk_ioapic_rmw(struct pci_dev *dev) 792static void quirk_ioapic_rmw(struct pci_dev *dev)
793{ 793{
794 if (dev->devfn == 0 && dev->bus->number == 0) 794 if (dev->devfn == 0 && dev->bus->number == 0)
795 sis_apic_bug = 1; 795 sis_apic_bug = 1;
@@ -801,7 +801,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SI, PCI_ANY_ID, quirk_ioapic_rmw);
801 * Some settings of MMRBC can lead to data corruption so block changes. 801 * Some settings of MMRBC can lead to data corruption so block changes.
802 * See AMD 8131 HyperTransport PCI-X Tunnel Revision Guide 802 * See AMD 8131 HyperTransport PCI-X Tunnel Revision Guide
803 */ 803 */
804static void __devinit quirk_amd_8131_mmrbc(struct pci_dev *dev) 804static void quirk_amd_8131_mmrbc(struct pci_dev *dev)
805{ 805{
806 if (dev->subordinate && dev->revision <= 0x12) { 806 if (dev->subordinate && dev->revision <= 0x12) {
807 dev_info(&dev->dev, "AMD8131 rev %x detected; " 807 dev_info(&dev->dev, "AMD8131 rev %x detected; "
@@ -819,7 +819,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8131_BRIDGE, quirk_
819 * value of the ACPI SCI interrupt is only done for convenience. 819 * value of the ACPI SCI interrupt is only done for convenience.
820 * -jgarzik 820 * -jgarzik
821 */ 821 */
822static void __devinit quirk_via_acpi(struct pci_dev *d) 822static void quirk_via_acpi(struct pci_dev *d)
823{ 823{
824 /* 824 /*
825 * VIA ACPI device: SCI IRQ line in PCI config byte 0x42 825 * VIA ACPI device: SCI IRQ line in PCI config byte 0x42
@@ -926,7 +926,7 @@ DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_VIA, PCI_ANY_ID, quirk_via_vlink);
926 * We need to switch it off to be able to recognize the real 926 * We need to switch it off to be able to recognize the real
927 * type of the chip. 927 * type of the chip.
928 */ 928 */
929static void __devinit quirk_vt82c598_id(struct pci_dev *dev) 929static void quirk_vt82c598_id(struct pci_dev *dev)
930{ 930{
931 pci_write_config_byte(dev, 0xfc, 0); 931 pci_write_config_byte(dev, 0xfc, 0);
932 pci_read_config_word(dev, PCI_DEVICE_ID, &dev->device); 932 pci_read_config_word(dev, PCI_DEVICE_ID, &dev->device);
@@ -978,7 +978,7 @@ DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_FE_GATE_700C
978 * assigned to it. We force a larger allocation to ensure that 978 * assigned to it. We force a larger allocation to ensure that
979 * nothing gets put too close to it. 979 * nothing gets put too close to it.
980 */ 980 */
981static void __devinit quirk_dunord ( struct pci_dev * dev ) 981static void quirk_dunord(struct pci_dev *dev)
982{ 982{
983 struct resource *r = &dev->resource [1]; 983 struct resource *r = &dev->resource [1];
984 r->start = 0; 984 r->start = 0;
@@ -992,7 +992,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_DUNORD, PCI_DEVICE_ID_DUNORD_I3000, quirk
992 * in the ProgIf. Unfortunately, the ProgIf value is wrong - 0x80 992 * in the ProgIf. Unfortunately, the ProgIf value is wrong - 0x80
993 * instead of 0x01. 993 * instead of 0x01.
994 */ 994 */
995static void __devinit quirk_transparent_bridge(struct pci_dev *dev) 995static void quirk_transparent_bridge(struct pci_dev *dev)
996{ 996{
997 dev->transparent = 1; 997 dev->transparent = 1;
998} 998}
@@ -1066,7 +1066,7 @@ DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_HUDSON2_SATA
1066/* 1066/*
1067 * Serverworks CSB5 IDE does not fully support native mode 1067 * Serverworks CSB5 IDE does not fully support native mode
1068 */ 1068 */
1069static void __devinit quirk_svwks_csb5ide(struct pci_dev *pdev) 1069static void quirk_svwks_csb5ide(struct pci_dev *pdev)
1070{ 1070{
1071 u8 prog; 1071 u8 prog;
1072 pci_read_config_byte(pdev, PCI_CLASS_PROG, &prog); 1072 pci_read_config_byte(pdev, PCI_CLASS_PROG, &prog);
@@ -1082,7 +1082,7 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB
1082/* 1082/*
1083 * Intel 82801CAM ICH3-M datasheet says IDE modes must be the same 1083 * Intel 82801CAM ICH3-M datasheet says IDE modes must be the same
1084 */ 1084 */
1085static void __devinit quirk_ide_samemode(struct pci_dev *pdev) 1085static void quirk_ide_samemode(struct pci_dev *pdev)
1086{ 1086{
1087 u8 prog; 1087 u8 prog;
1088 1088
@@ -1101,7 +1101,7 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_10, qui
1101 * Some ATA devices break if put into D3 1101 * Some ATA devices break if put into D3
1102 */ 1102 */
1103 1103
1104static void __devinit quirk_no_ata_d3(struct pci_dev *pdev) 1104static void quirk_no_ata_d3(struct pci_dev *pdev)
1105{ 1105{
1106 pdev->dev_flags |= PCI_DEV_FLAGS_NO_D3; 1106 pdev->dev_flags |= PCI_DEV_FLAGS_NO_D3;
1107} 1107}
@@ -1121,7 +1121,7 @@ DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_VIA, PCI_ANY_ID,
1121/* This was originally an Alpha specific thing, but it really fits here. 1121/* This was originally an Alpha specific thing, but it really fits here.
1122 * The i82375 PCI/EISA bridge appears as non-classified. Fix that. 1122 * The i82375 PCI/EISA bridge appears as non-classified. Fix that.
1123 */ 1123 */
1124static void __devinit quirk_eisa_bridge(struct pci_dev *dev) 1124static void quirk_eisa_bridge(struct pci_dev *dev)
1125{ 1125{
1126 dev->class = PCI_CLASS_BRIDGE_EISA << 8; 1126 dev->class = PCI_CLASS_BRIDGE_EISA << 8;
1127} 1127}
@@ -1155,7 +1155,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82375, quirk_e
1155 */ 1155 */
1156static int asus_hides_smbus; 1156static int asus_hides_smbus;
1157 1157
1158static void __devinit asus_hides_smbus_hostbridge(struct pci_dev *dev) 1158static void asus_hides_smbus_hostbridge(struct pci_dev *dev)
1159{ 1159{
1160 if (unlikely(dev->subsystem_vendor == PCI_VENDOR_ID_ASUSTEK)) { 1160 if (unlikely(dev->subsystem_vendor == PCI_VENDOR_ID_ASUSTEK)) {
1161 if (dev->device == PCI_DEVICE_ID_INTEL_82845_HB) 1161 if (dev->device == PCI_DEVICE_ID_INTEL_82845_HB)
@@ -1538,7 +1538,7 @@ DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB3
1538#endif 1538#endif
1539 1539
1540#ifdef CONFIG_X86_IO_APIC 1540#ifdef CONFIG_X86_IO_APIC
1541static void __devinit quirk_alder_ioapic(struct pci_dev *pdev) 1541static void quirk_alder_ioapic(struct pci_dev *pdev)
1542{ 1542{
1543 int i; 1543 int i;
1544 1544
@@ -1561,7 +1561,7 @@ static void __devinit quirk_alder_ioapic(struct pci_dev *pdev)
1561DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_EESSC, quirk_alder_ioapic); 1561DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_EESSC, quirk_alder_ioapic);
1562#endif 1562#endif
1563 1563
1564static void __devinit quirk_pcie_mch(struct pci_dev *pdev) 1564static void quirk_pcie_mch(struct pci_dev *pdev)
1565{ 1565{
1566 pci_msi_off(pdev); 1566 pci_msi_off(pdev);
1567 pdev->no_msi = 1; 1567 pdev->no_msi = 1;
@@ -1575,7 +1575,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7525_MCH, quir
1575 * It's possible for the MSI to get corrupted if shpc and acpi 1575 * It's possible for the MSI to get corrupted if shpc and acpi
1576 * are used together on certain PXH-based systems. 1576 * are used together on certain PXH-based systems.
1577 */ 1577 */
1578static void __devinit quirk_pcie_pxh(struct pci_dev *dev) 1578static void quirk_pcie_pxh(struct pci_dev *dev)
1579{ 1579{
1580 pci_msi_off(dev); 1580 pci_msi_off(dev);
1581 dev->no_msi = 1; 1581 dev->no_msi = 1;
@@ -1777,7 +1777,7 @@ DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8111_SMBUS, qui
1777 * but the PIO transfers won't work if BAR0 falls at the odd 8 bytes. 1777 * but the PIO transfers won't work if BAR0 falls at the odd 8 bytes.
1778 * Re-allocate the region if needed... 1778 * Re-allocate the region if needed...
1779 */ 1779 */
1780static void __devinit quirk_tc86c001_ide(struct pci_dev *dev) 1780static void quirk_tc86c001_ide(struct pci_dev *dev)
1781{ 1781{
1782 struct resource *r = &dev->resource[0]; 1782 struct resource *r = &dev->resource[0];
1783 1783
@@ -1790,7 +1790,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TOSHIBA_2,
1790 PCI_DEVICE_ID_TOSHIBA_TC86C001_IDE, 1790 PCI_DEVICE_ID_TOSHIBA_TC86C001_IDE,
1791 quirk_tc86c001_ide); 1791 quirk_tc86c001_ide);
1792 1792
1793static void __devinit quirk_netmos(struct pci_dev *dev) 1793static void quirk_netmos(struct pci_dev *dev)
1794{ 1794{
1795 unsigned int num_parallel = (dev->subsystem_device & 0xf0) >> 4; 1795 unsigned int num_parallel = (dev->subsystem_device & 0xf0) >> 4;
1796 unsigned int num_serial = dev->subsystem_device & 0xf; 1796 unsigned int num_serial = dev->subsystem_device & 0xf;
@@ -1828,7 +1828,7 @@ static void __devinit quirk_netmos(struct pci_dev *dev)
1828DECLARE_PCI_FIXUP_CLASS_HEADER(PCI_VENDOR_ID_NETMOS, PCI_ANY_ID, 1828DECLARE_PCI_FIXUP_CLASS_HEADER(PCI_VENDOR_ID_NETMOS, PCI_ANY_ID,
1829 PCI_CLASS_COMMUNICATION_SERIAL, 8, quirk_netmos); 1829 PCI_CLASS_COMMUNICATION_SERIAL, 8, quirk_netmos);
1830 1830
1831static void __devinit quirk_e100_interrupt(struct pci_dev *dev) 1831static void quirk_e100_interrupt(struct pci_dev *dev)
1832{ 1832{
1833 u16 command, pmcsr; 1833 u16 command, pmcsr;
1834 u8 __iomem *csr; 1834 u8 __iomem *csr;
@@ -1901,7 +1901,7 @@ DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_INTEL, PCI_ANY_ID,
1901 * The 82575 and 82598 may experience data corruption issues when transitioning 1901 * The 82575 and 82598 may experience data corruption issues when transitioning
1902 * out of L0S. To prevent this we need to disable L0S on the pci-e link 1902 * out of L0S. To prevent this we need to disable L0S on the pci-e link
1903 */ 1903 */
1904static void __devinit quirk_disable_aspm_l0s(struct pci_dev *dev) 1904static void quirk_disable_aspm_l0s(struct pci_dev *dev)
1905{ 1905{
1906 dev_info(&dev->dev, "Disabling L0s\n"); 1906 dev_info(&dev->dev, "Disabling L0s\n");
1907 pci_disable_link_state(dev, PCIE_LINK_STATE_L0S); 1907 pci_disable_link_state(dev, PCIE_LINK_STATE_L0S);
@@ -1921,7 +1921,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x10f1, quirk_disable_aspm_l0s);
1921DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x10f4, quirk_disable_aspm_l0s); 1921DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x10f4, quirk_disable_aspm_l0s);
1922DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x1508, quirk_disable_aspm_l0s); 1922DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x1508, quirk_disable_aspm_l0s);
1923 1923
1924static void __devinit fixup_rev1_53c810(struct pci_dev* dev) 1924static void fixup_rev1_53c810(struct pci_dev *dev)
1925{ 1925{
1926 /* rev 1 ncr53c810 chips don't set the class at all which means 1926 /* rev 1 ncr53c810 chips don't set the class at all which means
1927 * they don't get their resources remapped. Fix that here. 1927 * they don't get their resources remapped. Fix that here.
@@ -1935,7 +1935,7 @@ static void __devinit fixup_rev1_53c810(struct pci_dev* dev)
1935DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NCR, PCI_DEVICE_ID_NCR_53C810, fixup_rev1_53c810); 1935DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NCR, PCI_DEVICE_ID_NCR_53C810, fixup_rev1_53c810);
1936 1936
1937/* Enable 1k I/O space granularity on the Intel P64H2 */ 1937/* Enable 1k I/O space granularity on the Intel P64H2 */
1938static void __devinit quirk_p64h2_1k_io(struct pci_dev *dev) 1938static void quirk_p64h2_1k_io(struct pci_dev *dev)
1939{ 1939{
1940 u16 en1k; 1940 u16 en1k;
1941 1941
@@ -1968,7 +1968,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_CK804_PCIE,
1968DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_CK804_PCIE, 1968DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_CK804_PCIE,
1969 quirk_nvidia_ck804_pcie_aer_ext_cap); 1969 quirk_nvidia_ck804_pcie_aer_ext_cap);
1970 1970
1971static void __devinit quirk_via_cx700_pci_parking_caching(struct pci_dev *dev) 1971static void quirk_via_cx700_pci_parking_caching(struct pci_dev *dev)
1972{ 1972{
1973 /* 1973 /*
1974 * Disable PCI Bus Parking and PCI Master read caching on CX700 1974 * Disable PCI Bus Parking and PCI Master read caching on CX700
@@ -2031,7 +2031,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, 0x324e, quirk_via_cx700_pci_parking_c
2031 * We believe that it is legal to read beyond the end tag and 2031 * We believe that it is legal to read beyond the end tag and
2032 * therefore the solution is to limit the read/write length. 2032 * therefore the solution is to limit the read/write length.
2033 */ 2033 */
2034static void __devinit quirk_brcm_570x_limit_vpd(struct pci_dev *dev) 2034static void quirk_brcm_570x_limit_vpd(struct pci_dev *dev)
2035{ 2035{
2036 /* 2036 /*
2037 * Only disable the VPD capability for 5706, 5706S, 5708, 2037 * Only disable the VPD capability for 5706, 5706S, 5708,
@@ -2091,7 +2091,7 @@ DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_BROADCOM,
2091 * the DRBs - this is where we expose device 6. 2091 * the DRBs - this is where we expose device 6.
2092 * http://www.x86-secret.com/articles/tweak/pat/patsecrets-2.htm 2092 * http://www.x86-secret.com/articles/tweak/pat/patsecrets-2.htm
2093 */ 2093 */
2094static void __devinit quirk_unhide_mch_dev6(struct pci_dev *dev) 2094static void quirk_unhide_mch_dev6(struct pci_dev *dev)
2095{ 2095{
2096 u8 reg; 2096 u8 reg;
2097 2097
@@ -2115,7 +2115,7 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82875_HB,
2115 * supports link speed auto negotiation, but falsely sets 2115 * supports link speed auto negotiation, but falsely sets
2116 * the link speed to 5GT/s. 2116 * the link speed to 5GT/s.
2117 */ 2117 */
2118static void __devinit quirk_tile_plx_gen1(struct pci_dev *dev) 2118static void quirk_tile_plx_gen1(struct pci_dev *dev)
2119{ 2119{
2120 if (tile_plx_gen1) { 2120 if (tile_plx_gen1) {
2121 pci_write_config_dword(dev, 0x98, 0x1); 2121 pci_write_config_dword(dev, 0x98, 0x1);
@@ -2132,7 +2132,7 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_PLX, 0x8624, quirk_tile_plx_gen1);
2132 * aware of it. Instead of setting the flag on all busses in the 2132 * aware of it. Instead of setting the flag on all busses in the
2133 * machine, simply disable MSI globally. 2133 * machine, simply disable MSI globally.
2134 */ 2134 */
2135static void __devinit quirk_disable_all_msi(struct pci_dev *dev) 2135static void quirk_disable_all_msi(struct pci_dev *dev)
2136{ 2136{
2137 pci_no_msi(); 2137 pci_no_msi();
2138 dev_warn(&dev->dev, "MSI quirk detected; MSI disabled\n"); 2138 dev_warn(&dev->dev, "MSI quirk detected; MSI disabled\n");
@@ -2146,7 +2146,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VT3364, quirk_disab
2146DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8380_0, quirk_disable_all_msi); 2146DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8380_0, quirk_disable_all_msi);
2147 2147
2148/* Disable MSI on chipsets that are known to not support it */ 2148/* Disable MSI on chipsets that are known to not support it */
2149static void __devinit quirk_disable_msi(struct pci_dev *dev) 2149static void quirk_disable_msi(struct pci_dev *dev)
2150{ 2150{
2151 if (dev->subordinate) { 2151 if (dev->subordinate) {
2152 dev_warn(&dev->dev, "MSI quirk detected; " 2152 dev_warn(&dev->dev, "MSI quirk detected; "
@@ -2164,7 +2164,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x5a3f, quirk_disable_msi);
2164 * we use the possible vendor/device IDs of the host bridge for the 2164 * we use the possible vendor/device IDs of the host bridge for the
2165 * declared quirk, and search for the APC bridge by slot number. 2165 * declared quirk, and search for the APC bridge by slot number.
2166 */ 2166 */
2167static void __devinit quirk_amd_780_apc_msi(struct pci_dev *host_bridge) 2167static void quirk_amd_780_apc_msi(struct pci_dev *host_bridge)
2168{ 2168{
2169 struct pci_dev *apc_bridge; 2169 struct pci_dev *apc_bridge;
2170 2170
@@ -2272,7 +2272,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8132_BRIDGE,
2272 * for the MCP55 NIC. It is not yet determined whether the msi problem 2272 * for the MCP55 NIC. It is not yet determined whether the msi problem
2273 * also affects other devices. As for now, turn off msi for this device. 2273 * also affects other devices. As for now, turn off msi for this device.
2274 */ 2274 */
2275static void __devinit nvenet_msi_disable(struct pci_dev *dev) 2275static void nvenet_msi_disable(struct pci_dev *dev)
2276{ 2276{
2277 const char *board_name = dmi_get_system_info(DMI_BOARD_NAME); 2277 const char *board_name = dmi_get_system_info(DMI_BOARD_NAME);
2278 2278
@@ -2298,7 +2298,7 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_NVIDIA,
2298 * we have it set correctly. 2298 * we have it set correctly.
2299 * Note this is an undocumented register. 2299 * Note this is an undocumented register.
2300 */ 2300 */
2301static void __devinit nvbridge_check_legacy_irq_routing(struct pci_dev *dev) 2301static void nvbridge_check_legacy_irq_routing(struct pci_dev *dev)
2302{ 2302{
2303 u32 cfg; 2303 u32 cfg;
2304 2304
@@ -2534,11 +2534,11 @@ DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID, nv_msi_ht_cap_q
2534DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AL, PCI_ANY_ID, nv_msi_ht_cap_quirk_all); 2534DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AL, PCI_ANY_ID, nv_msi_ht_cap_quirk_all);
2535DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_AL, PCI_ANY_ID, nv_msi_ht_cap_quirk_all); 2535DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_AL, PCI_ANY_ID, nv_msi_ht_cap_quirk_all);
2536 2536
2537static void __devinit quirk_msi_intx_disable_bug(struct pci_dev *dev) 2537static void quirk_msi_intx_disable_bug(struct pci_dev *dev)
2538{ 2538{
2539 dev->dev_flags |= PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG; 2539 dev->dev_flags |= PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG;
2540} 2540}
2541static void __devinit quirk_msi_intx_disable_ati_bug(struct pci_dev *dev) 2541static void quirk_msi_intx_disable_ati_bug(struct pci_dev *dev)
2542{ 2542{
2543 struct pci_dev *p; 2543 struct pci_dev *p;
2544 2544
@@ -2612,7 +2612,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATTANSIC, 0x1083,
2612 * kernel fails to allocate resources when hotplug device is 2612 * kernel fails to allocate resources when hotplug device is
2613 * inserted and PCI bus is rescanned. 2613 * inserted and PCI bus is rescanned.
2614 */ 2614 */
2615static void __devinit quirk_hotplug_bridge(struct pci_dev *dev) 2615static void quirk_hotplug_bridge(struct pci_dev *dev)
2616{ 2616{
2617 dev->is_hotplug_bridge = 1; 2617 dev->is_hotplug_bridge = 1;
2618} 2618}
@@ -2752,7 +2752,7 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x342e, vtd_mask_spec_errors);
2752DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x3c28, vtd_mask_spec_errors); 2752DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x3c28, vtd_mask_spec_errors);
2753#endif 2753#endif
2754 2754
2755static void __devinit fixup_ti816x_class(struct pci_dev* dev) 2755static void fixup_ti816x_class(struct pci_dev *dev)
2756{ 2756{
2757 /* TI 816x devices do not have class code set when in PCIe boot mode */ 2757 /* TI 816x devices do not have class code set when in PCIe boot mode */
2758 dev_info(&dev->dev, "Setting PCI class for 816x PCIe device\n"); 2758 dev_info(&dev->dev, "Setting PCI class for 816x PCIe device\n");
@@ -2764,7 +2764,7 @@ DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_TI, 0xb800,
2764/* Some PCIe devices do not work reliably with the claimed maximum 2764/* Some PCIe devices do not work reliably with the claimed maximum
2765 * payload size supported. 2765 * payload size supported.
2766 */ 2766 */
2767static void __devinit fixup_mpss_256(struct pci_dev *dev) 2767static void fixup_mpss_256(struct pci_dev *dev)
2768{ 2768{
2769 dev->pcie_mpss = 1; /* 256 bytes */ 2769 dev->pcie_mpss = 1; /* 256 bytes */
2770} 2770}
@@ -2782,7 +2782,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SOLARFLARE,
2782 * coalescing must be disabled. Unfortunately, it cannot be re-enabled because 2782 * coalescing must be disabled. Unfortunately, it cannot be re-enabled because
2783 * it is possible to hotplug a device with MPS of 256B. 2783 * it is possible to hotplug a device with MPS of 256B.
2784 */ 2784 */
2785static void __devinit quirk_intel_mc_errata(struct pci_dev *dev) 2785static void quirk_intel_mc_errata(struct pci_dev *dev)
2786{ 2786{
2787 int err; 2787 int err;
2788 u16 rcc; 2788 u16 rcc;
@@ -2888,7 +2888,7 @@ static void fixup_debug_report(struct pci_dev *dev, ktime_t calltime,
2888 * This resolves crashes often seen on monitor unplug. 2888 * This resolves crashes often seen on monitor unplug.
2889 */ 2889 */
2890#define I915_DEIER_REG 0x4400c 2890#define I915_DEIER_REG 0x4400c
2891static void __devinit disable_igfx_irq(struct pci_dev *dev) 2891static void disable_igfx_irq(struct pci_dev *dev)
2892{ 2892{
2893 void __iomem *regs = pci_iomap(dev, 0, 0); 2893 void __iomem *regs = pci_iomap(dev, 0, 0);
2894 if (regs == NULL) { 2894 if (regs == NULL) {
@@ -2914,7 +2914,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x010a, disable_igfx_irq);
2914 * PCI_COMMAND_INTX_DISABLE works though they actually do not properly 2914 * PCI_COMMAND_INTX_DISABLE works though they actually do not properly
2915 * support this feature. 2915 * support this feature.
2916 */ 2916 */
2917static void __devinit quirk_broken_intx_masking(struct pci_dev *dev) 2917static void quirk_broken_intx_masking(struct pci_dev *dev)
2918{ 2918{
2919 dev->broken_intx_masking = 1; 2919 dev->broken_intx_masking = 1;
2920} 2920}
diff --git a/drivers/pci/xen-pcifront.c b/drivers/pci/xen-pcifront.c
index 0aab85a51559..db542f4196a4 100644
--- a/drivers/pci/xen-pcifront.c
+++ b/drivers/pci/xen-pcifront.c
@@ -412,7 +412,7 @@ static int pcifront_claim_resource(struct pci_dev *dev, void *data)
412 return 0; 412 return 0;
413} 413}
414 414
415static int __devinit pcifront_scan_bus(struct pcifront_device *pdev, 415static int pcifront_scan_bus(struct pcifront_device *pdev,
416 unsigned int domain, unsigned int bus, 416 unsigned int domain, unsigned int bus,
417 struct pci_bus *b) 417 struct pci_bus *b)
418{ 418{
@@ -441,7 +441,7 @@ static int __devinit pcifront_scan_bus(struct pcifront_device *pdev,
441 return 0; 441 return 0;
442} 442}
443 443
444static int __devinit pcifront_scan_root(struct pcifront_device *pdev, 444static int pcifront_scan_root(struct pcifront_device *pdev,
445 unsigned int domain, unsigned int bus) 445 unsigned int domain, unsigned int bus)
446{ 446{
447 struct pci_bus *b; 447 struct pci_bus *b;
@@ -503,7 +503,7 @@ err_out:
503 return err; 503 return err;
504} 504}
505 505
506static int __devinit pcifront_rescan_root(struct pcifront_device *pdev, 506static int pcifront_rescan_root(struct pcifront_device *pdev,
507 unsigned int domain, unsigned int bus) 507 unsigned int domain, unsigned int bus)
508{ 508{
509 int err; 509 int err;
@@ -834,7 +834,7 @@ out:
834 return err; 834 return err;
835} 835}
836 836
837static int __devinit pcifront_try_connect(struct pcifront_device *pdev) 837static int pcifront_try_connect(struct pcifront_device *pdev)
838{ 838{
839 int err = -EFAULT; 839 int err = -EFAULT;
840 int i, num_roots, len; 840 int i, num_roots, len;
@@ -924,7 +924,7 @@ out:
924 return err; 924 return err;
925} 925}
926 926
927static int __devinit pcifront_attach_devices(struct pcifront_device *pdev) 927static int pcifront_attach_devices(struct pcifront_device *pdev)
928{ 928{
929 int err = -EFAULT; 929 int err = -EFAULT;
930 int i, num_roots, len; 930 int i, num_roots, len;