[Skiboot] [PATCH 13/16] phb4: Avoid recursive call into run state machine
Michael Neuling
mikey at neuling.org
Wed Jul 12 12:06:52 AEST 2017
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 at neuling.org>
---
hw/phb4.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/phb4.c b/hw/phb4.c
index 81cb2826e3..91da17d961 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)
--
2.11.0
More information about the Skiboot
mailing list