Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128230
b: refs/heads/master
c: 8659c40
h: refs/heads/master
v: v3
  • Loading branch information
Andi Kleen authored and Linus Torvalds committed Jan 9, 2009
1 parent 1a74c62 commit ce25acf
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4ce5f24193cef2e26f182ce708e94ba1f5fafc0c
refs/heads/master: 8659c406ade32f47da2c95889094801921d6330a
22 changes: 14 additions & 8 deletions trunk/arch/x86/kernel/early-quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,12 @@ struct chipset {
void (*f)(int num, int slot, int func);
};

/*
* Only works for devices on the root bus. If you add any devices
* not on bus 0 readd another loop level in early_quirks(). But
* be careful because at least the Nvidia quirk here relies on
* only matching on bus 0.
*/
static struct chipset early_qrk[] __initdata = {
{ PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID,
PCI_CLASS_BRIDGE_PCI, PCI_ANY_ID, QFLAG_APPLY_ONCE, nvidia_bugs },
Expand Down Expand Up @@ -267,17 +273,17 @@ static int __init check_dev_quirk(int num, int slot, int func)

void __init early_quirks(void)
{
int num, slot, func;
int slot, func;

if (!early_pci_allowed())
return;

/* Poor man's PCI discovery */
for (num = 0; num < 32; num++)
for (slot = 0; slot < 32; slot++)
for (func = 0; func < 8; func++) {
/* Only probe function 0 on single fn devices */
if (check_dev_quirk(num, slot, func))
break;
}
/* Only scan the root bus */
for (slot = 0; slot < 32; slot++)
for (func = 0; func < 8; func++) {
/* Only probe function 0 on single fn devices */
if (check_dev_quirk(0, slot, func))
break;
}
}

0 comments on commit ce25acf

Please sign in to comment.