--- ./arch/ppc64/kernel/pci_dn.c.orig 2003-10-28 12:51:36.000000000 -0500 +++ ./arch/ppc64/kernel/pci_dn.c 2003-10-28 12:59:12.000000000 -0500 @@ -361,6 +361,8 @@ pci_fixup_bus_sysdata_list(struct list_h struct list_head *ln; struct pci_bus *bus; struct pci_controller *phb; + struct pci_dev *dev; + struct list_head *entry; int newnum; for (ln=bus_list->next; ln != bus_list; ln=ln->next) { @@ -375,6 +377,19 @@ pci_fixup_bus_sysdata_list(struct list_h newnum = (phb->global_number << 8) | bus->number; bus->number = newnum; sprintf(bus->name, "PCI Bus #%x", bus->number); + /* + * Correct the slot_name in the dev structure to + * reflect the new bus number + */ + list_for_each(entry, &bus->devices) { + dev = pci_dev_b(entry); + snprintf(dev->slot_name, + sizeof(dev->slot_name), + "%02x:%02x.%d", + dev->bus->number, + PCI_SLOT(dev->devfn), + PCI_FUNC(dev->devfn)); + } } } pci_fixup_bus_sysdata_list(&bus->children); --- ./include/linux/pci.h.orig 2003-10-28 12:49:32.000000000 -0500 +++ ./include/linux/pci.h 2003-10-28 12:50:41.000000000 -0500 @@ -409,7 +409,7 @@ struct pci_dev { struct resource irq_resource[DEVICE_COUNT_IRQ]; char name[90]; /* device name */ - char slot_name[8]; /* slot name */ + char slot_name[12]; /* slot name */ int active; /* ISAPnP: device is active */ int ro; /* ISAPnP: read only */ unsigned short regs; /* ISAPnP: supported registers */