diff options
author | Vaibhav Jain <vaibhav@linux.ibm.com> | 2019-01-13 11:07:09 +0530 |
---|---|---|
committer | Stewart Smith <stewart@linux.ibm.com> | 2019-01-16 00:46:49 -0600 |
commit | 9d2d0115eaca5d92e8032f3c051a200e59e80971 (patch) | |
tree | 4c8d6793e57d2e4869be5c3b13043bbac7065334 /include | |
parent | 658c39dda366aca674e7192535c4cc740c837f1c (diff) | |
download | blackbird-skiboot-9d2d0115eaca5d92e8032f3c051a200e59e80971.tar.gz blackbird-skiboot-9d2d0115eaca5d92e8032f3c051a200e59e80971.zip |
core/pci: Introduce a new pci_slot_op named completed_sm_run()
At times we need to perform some cleanup activities when the Opal PCI
state machine that perform creset/freset/hreset (driven by
pci_slot_ops->run_sm which) of a slot completes. One example can be to
mark CAPP attached to a PHB, as deactivated when creset/freset of a
CAPI card slot is completed.
However the calls to pci_slot_ops->run_sm() is scattered through out
the code and patching each call site to check for the return value and
perform custom cleanup tacks is difficult.
Hence this patch introduces a new pci_slot_ops named
completed_sm_run() which should be called when pci_slot_ops->run_sm()
determines that the reset state machine is complete. This provides a
more centralized way to handle slot related cleanup activities.
Reviewed-by: Frederic Barrat <fbarrat@linux.ibm.com>
Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Reviewed-by: Christophe Lombard <clombard@linux.vnet.ibm.com>
Signed-off-by: Vaibhav Jain <vaibhav@linux.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/pci-slot.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/pci-slot.h b/include/pci-slot.h index cd757535..708374b6 100644 --- a/include/pci-slot.h +++ b/include/pci-slot.h @@ -110,6 +110,7 @@ struct pci_slot_ops { int64_t (*freset)(struct pci_slot *slot); int64_t (*hreset)(struct pci_slot *slot); int64_t (*run_sm)(struct pci_slot *slot); + int64_t (*completed_sm_run)(struct pci_slot *slot, uint64_t err); /* Auxillary functions */ void (*add_properties)(struct pci_slot *slot, struct dt_node *np); |