Message ID | 20190403090920.362-17-oohall@gmail.com |
---|---|
State | RFC |
Headers | show |
Series | [RFC,01/23] platform/firenze-pci: Remove freset | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | warning | Failed to apply on branch master (050d8165ab05b6d9cdf4bfee42d9776969c77029) |
snowpatch_ozlabs/apply_patch | fail | Failed to apply to any branch |
Le 03/04/2019 à 11:09, Oliver O'Halloran a écrit : > --- > hw/phb4.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/hw/phb4.c b/hw/phb4.c > index 591872c31c02..c63e916da0b7 100644 > --- a/hw/phb4.c > +++ b/hw/phb4.c > @@ -2368,6 +2368,7 @@ static int64_t phb4_retry_state(struct pci_slot *slot) > return OPAL_HARDWARE; > } > > + slot->link_retries--; mmm, we already decrement the link_retry count in the previous if statement. Fred > pci_slot_set_state(slot, PHB4_SLOT_CRESET_START); > return pci_slot_set_sm_timeout(slot, msecs_to_tb(1)); > } > @@ -2856,7 +2857,7 @@ static int64_t phb4_poll_link(struct pci_slot *slot) > PHBDBG(p, "LINK: Link is stable\n"); > if (!phb4_link_optimal(slot, &vdid)) { > PHBDBG(p, "LINK: Link degraded\n"); > - if (slot->link_retries) { > + if (slot->link_retries > 0) { > phb4_lane_eq_change(p, vdid); > return phb4_retry_state(slot); > } >
diff --git a/hw/phb4.c b/hw/phb4.c index 591872c31c02..c63e916da0b7 100644 --- a/hw/phb4.c +++ b/hw/phb4.c @@ -2368,6 +2368,7 @@ static int64_t phb4_retry_state(struct pci_slot *slot) return OPAL_HARDWARE; } + slot->link_retries--; pci_slot_set_state(slot, PHB4_SLOT_CRESET_START); return pci_slot_set_sm_timeout(slot, msecs_to_tb(1)); } @@ -2856,7 +2857,7 @@ static int64_t phb4_poll_link(struct pci_slot *slot) PHBDBG(p, "LINK: Link is stable\n"); if (!phb4_link_optimal(slot, &vdid)) { PHBDBG(p, "LINK: Link degraded\n"); - if (slot->link_retries) { + if (slot->link_retries > 0) { phb4_lane_eq_change(p, vdid); return phb4_retry_state(slot); }