PCI: pciehp: Handle interrupts that happen during initialization.
Move the enabling of interrupts after all of the data structures are setup so that we can safely run the interrupt handler as soon as it is registered. Reviewed-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Tested-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com> Signed-off-by: Jesse Barnes <jbarnes@hobbes.lan>
This commit is contained in:
parent
1dec6b054d
commit
dbc7e1e567
3 changed files with 16 additions and 8 deletions
|
|
@ -434,6 +434,13 @@ static int pciehp_probe(struct pcie_device *dev, const struct pcie_port_service_
|
|||
goto err_out_release_ctlr;
|
||||
}
|
||||
|
||||
/* Enable events after we have setup the data structures */
|
||||
rc = pcie_init_notification(ctrl);
|
||||
if (rc) {
|
||||
ctrl_err(ctrl, "Notification initialization failed\n");
|
||||
goto err_out_release_ctlr;
|
||||
}
|
||||
|
||||
/* Check if slot is occupied */
|
||||
t_slot = pciehp_find_slot(ctrl, ctrl->slot_device_offset);
|
||||
t_slot->hpc_ops->get_adapter_status(t_slot, &value);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue