Skip to content

Commit

Permalink
phb4: Remove stable retries
Browse files Browse the repository at this point in the history
This code was never used (since retries is set to 0), it's not very
useful and it makes the code harder to read. So lets just remove it.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
  • Loading branch information
mikey authored and stewartsmith committed Sep 13, 2017
1 parent a26f055 commit 2ba68c4
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 9 deletions.
7 changes: 0 additions & 7 deletions hw/phb4.c
Original file line number Diff line number Diff line change
Expand Up @@ -2455,7 +2455,6 @@ static int64_t phb4_poll_link(struct pci_slot *slot)
PHBDBG(p, "LINK: Link is up\n");
phb4_prepare_link_change(slot, true);
pci_slot_set_state(slot, PHB4_SLOT_LINK_STABLE);
slot->stable_retries = PHB4_LINK_STABLE_RETRIES;
return pci_slot_set_sm_timeout(slot, secs_to_tb(1));
}

Expand All @@ -2479,12 +2478,6 @@ static int64_t phb4_poll_link(struct pci_slot *slot)
}
if (reg & PHB_PCIE_DLP_TL_LINKACT) {
PHBDBG(p, "LINK: Link is stable\n");
if (slot->stable_retries--) {
PHBDBG(p, "LINK: Doing retry: %lli\n",
slot->stable_retries);
return pci_slot_set_sm_timeout(slot, secs_to_tb(1));
}

pci_slot_set_state(slot, PHB4_SLOT_NORMAL);
return OPAL_SUCCESS;
}
Expand Down
1 change: 0 additions & 1 deletion include/pci-slot.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ struct pci_slot {
uint64_t delay_tgt_tb;
uint64_t retries;
uint64_t link_retries;
uint64_t stable_retries;
struct pci_slot_ops ops;
void *data;
};
Expand Down
1 change: 0 additions & 1 deletion include/phb4.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,6 @@ struct phb4_err {
/* Link timeouts, increments of 10ms */
#define PHB4_LINK_ELECTRICAL_RETRIES 100
#define PHB4_LINK_WAIT_RETRIES 200
#define PHB4_LINK_STABLE_RETRIES 0

/* PHB4 flags */
#define PHB4_AIB_FENCED 0x00000001
Expand Down

0 comments on commit 2ba68c4

Please sign in to comment.