@@ -1604,9 +1604,9 @@ static int __pci_restore_bridge_buses(struct phb *phb,
return 0;
}
-void pci_restore_bridge_buses(struct phb *phb)
+void pci_restore_bridge_buses(struct phb *phb, struct pci_device *pd)
{
- pci_walk_dev(phb, NULL, __pci_restore_bridge_buses, NULL);
+ pci_walk_dev(phb, pd, __pci_restore_bridge_buses, NULL);
}
struct pci_cfg_reg_filter *pci_find_cfg_reg_filter(struct pci_device *pd,
@@ -345,7 +345,7 @@ static int64_t p7ioc_sm_freset(struct p7ioc_phb *p)
*/
if (p->flags & P7IOC_RESTORE_BUS_NUM) {
p->flags &= ~P7IOC_RESTORE_BUS_NUM;
- pci_restore_bridge_buses(&p->phb);
+ pci_restore_bridge_buses(&p->phb, NULL);
}
return OPAL_SUCCESS;
@@ -2045,7 +2045,7 @@ static void phb3_setup_for_link_up(struct phb3 *p)
*/
if (p->flags & PHB3_RESTORE_BUS_NUM) {
p->flags &= ~PHB3_RESTORE_BUS_NUM;
- pci_restore_bridge_buses(&p->phb);
+ pci_restore_bridge_buses(&p->phb, NULL);
}
}
@@ -524,7 +524,7 @@ extern struct pci_device *pci_walk_dev(struct phb *phb,
void *),
void *userdata);
extern struct pci_device *pci_find_dev(struct phb *phb, uint16_t bdfn);
-extern void pci_restore_bridge_buses(struct phb *phb);
+extern void pci_restore_bridge_buses(struct phb *phb, struct pci_device *pd);
extern struct pci_cfg_reg_filter *pci_find_cfg_reg_filter(struct pci_device *pd,
uint32_t start, uint32_t len);
extern struct pci_cfg_reg_filter *pci_add_cfg_reg_filter(struct pci_device *pd,
Currently, pci_restore_bridge_buses() restores the assigned bus ranges for all PCI bridges behind the specified PHB. This extends the function and allows it to do that for the PCI bridges behind the specified slot. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> --- core/pci.c | 4 ++-- hw/p7ioc-phb.c | 2 +- hw/phb3.c | 2 +- include/pci.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-)