Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 316541
b: refs/heads/master
c: 735bff1
h: refs/heads/master
i:
  316539: 5da354c
v: v3
  • Loading branch information
Myron Stowe authored and Bjorn Helgaas committed Jul 10, 2012
1 parent 05fcd60 commit c998a96
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3274c8eb26896fc4cae3b199de71e985e20771a9
refs/heads/master: 735bff10c157fdbba2291e10ca3e28a59c7acc1c
4 changes: 4 additions & 0 deletions trunk/drivers/pci/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,10 @@ pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res,
int pci_bus_add_device(struct pci_dev *dev)
{
int retval;
extern bool pci_fixup_final_inited;

if (pci_fixup_final_inited)
pci_fixup_device(pci_fixup_final, dev);
retval = device_add(&dev->dev);
if (retval)
return retval;
Expand Down
18 changes: 18 additions & 0 deletions trunk/drivers/pci/quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -3028,6 +3028,22 @@ 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;
Expand Down Expand Up @@ -3058,6 +3074,8 @@ 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",
cls << 2, pci_dfl_cache_line_size << 2);
Expand Down

0 comments on commit c998a96

Please sign in to comment.