Skip to contentSkip to conversation

powerpc: Fix sys_pciconfig_iobase bus matching

PATCH New Benjamin Herrenschmidt 1 participant 1 message Jan 27, 2007 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc: Fix sys_pciconfig_iobase bus matching

A stupid bug has been plaguing the sys_pciconfig_iobase on ppc64. It wasn't noticed until recently as it seems to not affect G5s but it's been causing problems running X servers on some other machines recently. The bus number matching was bogus.

---

Sent to Linus directly in case it can still make it into 2.6.20 ...

arch/powerpc/kernel/pci_64.c +1 -1
Index: linux-work/arch/powerpc/kernel/pci_64.c
===================================================================
@@ -1430,7 +1430,7 @@
 
 	for (ln = pci_root_buses.next; ln != &pci_root_buses; ln = ln->next) {
 		bus = pci_bus_b(ln);
-		if (in_bus >= bus->number && in_bus < (bus->number + bus->subordinate))
+		if (in_bus >= bus->number && in_bus <= bus->subordinate)
 			break;
 		bus = NULL;
 	}