aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorMichael Neuling <mikey@neuling.org>2017-07-12 12:06:52 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-07-13 10:19:45 +1000
commitbdefdf28434aff6bf58a915221f1ab256b9070f7 (patch)
tree3ce24581c54e691127bd0619c6f6227f4a146079 /hw
parent9fdd3f258396274ee9b9413b3436554528ded5a7 (diff)
downloadskiboot-bdefdf28434aff6bf58a915221f1ab256b9070f7.zip
skiboot-bdefdf28434aff6bf58a915221f1ab256b9070f7.tar.gz
skiboot-bdefdf28434aff6bf58a915221f1ab256b9070f7.tar.bz2
phb4: Avoid recursive call into run state machine
Currently we recursively call run_sm() in phb4_retry_state(). This is unnecessary and overly complex. This just returns with a small wait time. 1ms should be a very small over head compared to having to do the actual retry. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/phb4.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/phb4.c b/hw/phb4.c
index 81cb282..91da17d 100644
--- a/hw/phb4.c
+++ b/hw/phb4.c
@@ -2173,7 +2173,7 @@ static int64_t phb4_retry_state(struct pci_slot *slot)
slot->delay_tgt_tb = 0;
pci_slot_set_state(slot, slot->retry_state);
slot->retry_state = PCI_SLOT_STATE_NORMAL;
- return slot->ops.run_sm(slot);
+ return pci_slot_set_sm_timeout(slot, msecs_to_tb(1));
}
static int64_t phb4_poll_link(struct pci_slot *slot)