From patchwork Tue Sep 13 04:45:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Herrenschmidt X-Patchwork-Id: 669143 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3sYBzx4kQ4z9sQw for ; Tue, 13 Sep 2016 14:49:49 +1000 (AEST) Received: from ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3sYBzx3T35zDsWK for ; Tue, 13 Sep 2016 14:49:49 +1000 (AEST) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3sYBzM0h46zDsT4 for ; Tue, 13 Sep 2016 14:49:18 +1000 (AEST) Received: from pasglop.ozlabs.ibm.com (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.13.8) with ESMTP id u8D4jeC2017567; Mon, 12 Sep 2016 23:45:47 -0500 From: Benjamin Herrenschmidt To: skiboot@lists.ozlabs.org Date: Tue, 13 Sep 2016 14:45:28 +1000 Message-Id: <1473741928-31373-5-git-send-email-benh@kernel.crashing.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1473741928-31373-1-git-send-email-benh@kernel.crashing.org> References: <1473741928-31373-1-git-send-email-benh@kernel.crashing.org> Subject: [Skiboot] [PATCH 5/5] fsi-master: On XSCOM errors, try to reset the PIB2OPB bridge X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" It may or may not work but *hopefully* won't hurt... well we hope. Signed-off-by: Benjamin Herrenschmidt --- hw/fsi-master.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/fsi-master.c b/hw/fsi-master.c index a13af44..7de8d51 100644 --- a/hw/fsi-master.c +++ b/hw/fsi-master.c @@ -513,8 +513,6 @@ static int64_t mfsi_handle_error(struct mfsi *mfsi, uint32_t port, port, opb_stat); /* First handle stat codes we synthetized */ - if (opb_stat & OPB_ERR_XSCOM_ERR) - return OPAL_HARDWARE; if (opb_stat & OPB_ERR_BAD_OPB_ADDR) return OPAL_PARAMETER; @@ -524,6 +522,9 @@ static int64_t mfsi_handle_error(struct mfsi *mfsi, uint32_t port, /* Reset PIB2OPB */ mfsi_reset_pib2opb(mfsi); + if (opb_stat & OPB_ERR_XSCOM_ERR) + return OPAL_HARDWARE; + /* This one is not supposed to happen but ... */ if (opb_stat & OPB_ERR_TIMEOUT_ERR) return OPAL_HARDWARE;