[PATCH] x86/pci: claim SR-IOV bar in pcibios_allocate_resource

From: Yinghai Lu
Date: Sun Nov 15 2009 - 02:48:37 EST



so use correct allocation from BIOS, instead of later assign another one.

Signed-off-by: Yinghai Lu <yinghai@xxxxxxxxxx>

---
arch/x86/pci/i386.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Index: linux-2.6/arch/x86/pci/i386.c
===================================================================
--- linux-2.6.orig/arch/x86/pci/i386.c
+++ linux-2.6/arch/x86/pci/i386.c
@@ -155,7 +155,9 @@ static void __init pcibios_allocate_reso

for_each_pci_dev(dev) {
pci_read_config_word(dev, PCI_COMMAND, &command);
- for (idx = 0; idx < PCI_ROM_RESOURCE; idx++) {
+ for (idx = 0; idx < PCI_BRIDGE_RESOURCES; idx++) {
+ if (idx == PCI_ROM_RESOURCE)
+ continue;
r = &dev->resource[idx];
if (r->parent) /* Already allocated */
continue;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/