I don't understand the code good enough to be sure my patch is correct,
but the current code is definitely buggy:
0xFF is the maximum value for an u8, so tdevice < 0x100 is _always_
true.
cu
Adrian
--- linux-2.5.72-mm2/drivers/pci/hotplug/cpqphp_pci.c.old 2003-06-21 16:16:14.000000000 +0200
+++ linux-2.5.72-mm2/drivers/pci/hotplug/cpqphp_pci.c 2003-06-21 16:16:45.000000000 +0200
@@ -198,7 +198,7 @@
ctrl->pci_bus->number = bus_num;
- for (tdevice = 0; tdevice < 0x100; tdevice++) {
+ for (tdevice = 0; tdevice < 0xFF; tdevice++) {
//Scan for access first
if (PCI_RefinedAccessConfig(ctrl->pci_bus, tdevice, 0x08, &work) == -1)
continue;
@@ -210,7 +210,7 @@
return 0;
}
}
- for (tdevice = 0; tdevice < 0x100; tdevice++) {
+ for (tdevice = 0; tdevice < 0xFF; tdevice++) {
//Scan for access first
if (PCI_RefinedAccessConfig(ctrl->pci_bus, tdevice, 0x08, &work) == -1)
continue;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/