aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorMichael Neuling <mikey@neuling.org>2017-05-29 17:35:04 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-05-31 17:00:31 +1000
commit9abb449b9c572e98002a8a500afcc3958d829297 (patch)
treee662ae1e419a9eee5e8af27ae5bd18c39a52c75f /core
parent1c705700ab3c370e8062516c842469f3f7857f2a (diff)
downloadskiboot-9abb449b9c572e98002a8a500afcc3958d829297.zip
skiboot-9abb449b9c572e98002a8a500afcc3958d829297.tar.gz
skiboot-9abb449b9c572e98002a8a500afcc3958d829297.tar.bz2
core/pci: Rename pci_slot_op poll to run_sm
This renames the "poll" op to "run_sm" (short for run state machine). I think this is a better name since the function does a bunch of things like reseting the slot. Also it avoids confusion with the "poll_link" op which does something different (and can even be called from run_sm). No functional change. Signed-off-by: Michael Neuling <mikey@neuling.org> Acked-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'core')
-rw-r--r--core/pci-opal.c4
-rw-r--r--core/pci-slot.c4
-rw-r--r--core/pci.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/core/pci-opal.c b/core/pci-opal.c
index 27872aa..5d58a88 100644
--- a/core/pci-opal.c
+++ b/core/pci-opal.c
@@ -640,11 +640,11 @@ static int64_t opal_pci_poll(uint64_t id)
if (!slot || !phb)
return OPAL_PARAMETER;
- if (!slot->ops.poll)
+ if (!slot->ops.run_sm)
return OPAL_UNSUPPORTED;
phb_lock(phb);
- rc = slot->ops.poll(slot);
+ rc = slot->ops.run_sm(slot);
phb_unlock(phb);
/* Return milliseconds for caller to sleep: round up */
diff --git a/core/pci-slot.c b/core/pci-slot.c
index c703fe9..69bdb86 100644
--- a/core/pci-slot.c
+++ b/core/pci-slot.c
@@ -76,7 +76,7 @@ static void pci_slot_prepare_link_change(struct pci_slot *slot, bool up)
}
}
-static int64_t pci_slot_sm_poll(struct pci_slot *slot)
+static int64_t pci_slot_run_sm(struct pci_slot *slot)
{
uint64_t now = mftb();
int64_t ret;
@@ -176,7 +176,7 @@ struct pci_slot *pci_slot_alloc(struct phb *phb,
slot->pd = pd;
pci_slot_set_state(slot, PCI_SLOT_STATE_NORMAL);
slot->power_state = PCI_SLOT_POWER_ON;
- slot->ops.poll = pci_slot_sm_poll;
+ slot->ops.run_sm = pci_slot_run_sm;
slot->ops.prepare_link_change = pci_slot_prepare_link_change;
if (!pd) {
slot->id = PCI_PHB_SLOT_ID(phb);
diff --git a/core/pci.c b/core/pci.c
index d69eb28..0adc6d2 100644
--- a/core/pci.c
+++ b/core/pci.c
@@ -874,7 +874,7 @@ static void pci_reset_phb(void *data)
rc = slot->ops.freset(slot);
while (rc > 0) {
time_wait(rc);
- rc = slot->ops.poll(slot);
+ rc = slot->ops.run_sm(slot);
}
pci_slot_remove_flags(slot, PCI_SLOT_FLAG_BOOTUP);
if (rc < 0)
@@ -1571,7 +1571,7 @@ void pci_reset(void)
rc = slot->ops.creset(slot);
while (rc > 0) {
time_wait(rc);
- rc = slot->ops.poll(slot);
+ rc = slot->ops.run_sm(slot);
}
if (rc < 0) {
PCIERR(phb, 0, "Complete reset failed, aborting"