aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/quirks.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/quirks.c')
-rw-r--r--drivers/pci/quirks.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index d8e9a0e..2472df8 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -2979,6 +2979,7 @@ extern struct pci_fixup __end_pci_fixups_resume_early[];
extern struct pci_fixup __start_pci_fixups_suspend[];
extern struct pci_fixup __end_pci_fixups_suspend[];
+static bool pci_apply_fixup_final_quirks;
void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev)
{
@@ -2996,6 +2997,8 @@ void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev)
break;
case pci_fixup_final:
+ if (!pci_apply_fixup_final_quirks)
+ return;
start = __start_pci_fixups_final;
end = __end_pci_fixups_final;
break;
@@ -3029,21 +3032,6 @@ void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev)
EXPORT_SYMBOL(pci_fixup_device);
-/*
- * The global variable 'pci_fixup_final_inited' is being used as a interim
- * solution for calling the final quirks only during hot-plug events (not
- * during boot processing).
- *
- * When the boot path's PCI device setup sequencing is addressed, we can
- * remove the instance, and usages of, 'pci_fixup_final_inited' along with
- * removing 'fs_initcall_sync(pci_apply_final_quirks);' and end up with a
- * single, uniform, solution that satisfies both the boot path and the
- * various hot-plug event paths.
- *
- * ToDo: Remove 'pci_fixup_final_inited'
- */
-bool pci_fixup_final_inited;
-
static int __init pci_apply_final_quirks(void)
{
struct pci_dev *dev = NULL;
@@ -3054,6 +3042,7 @@ static int __init pci_apply_final_quirks(void)
printk(KERN_DEBUG "PCI: CLS %u bytes\n",
pci_cache_line_size << 2);
+ pci_apply_fixup_final_quirks = true;
for_each_pci_dev(dev) {
pci_fixup_device(pci_fixup_final, dev);
/*
@@ -3074,7 +3063,6 @@ static int __init pci_apply_final_quirks(void)
pci_cache_line_size = pci_dfl_cache_line_size;
}
}
- pci_fixup_final_inited = 1;
if (!pci_cache_line_size) {
printk(KERN_DEBUG "PCI: CLS %u bytes, default %u\n",