[Skiboot] [PATCH 5/6] phb4: Ignore slot state if performing complete reset
Russell Currey
ruscur at russell.cc
Thu Aug 10 16:58:42 AEST 2017
If a PHB is being completely reset, its state is about to be blown away
anyway, so if it's not in an appropriate state, creset it regardless.
Signed-off-by: Russell Currey <ruscur at russell.cc>
---
hw/phb4.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/hw/phb4.c b/hw/phb4.c
index b467e369..d13ab8c3 100644
--- a/hw/phb4.c
+++ b/hw/phb4.c
@@ -2700,8 +2700,11 @@ static int64_t phb4_creset(struct pci_slot *slot)
pci_slot_set_state(slot, PHB4_SLOT_NORMAL);
return slot->ops.freset(slot);
default:
- PHBERR(p, "CRESET: Unexpected slot state %08x\n",
+ PHBERR(p, "CRESET: Unexpected slot state %08x, resetting...\n",
slot->state);
+ pci_slot_set_state(slot, PHB4_SLOT_NORMAL);
+ return slot->ops.creset(slot);
+
}
error:
--
2.14.0
More information about the Skiboot
mailing list