From patchwork Mon Apr 9 03:41:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Herrenschmidt X-Patchwork-Id: 896106 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 ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40KGMj5ZLzz9s1p for ; Mon, 9 Apr 2018 13:42:25 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 40KGMj48HkzDrqP for ; Mon, 9 Apr 2018 13:42:25 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=permerror (mailfrom) smtp.mailfrom=kernel.crashing.org (client-ip=63.228.1.57; helo=gate.crashing.org; envelope-from=benh@kernel.crashing.org; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.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 40KGMR1HHLzDqwW for ; Mon, 9 Apr 2018 13:42:10 +1000 (AEST) Received: from pasglop.ozlabs.ibm.com (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id w393foYR012996; Sun, 8 Apr 2018 22:41:51 -0500 From: Benjamin Herrenschmidt To: skiboot@lists.ozlabs.org Date: Mon, 9 Apr 2018 13:41:43 +1000 Message-Id: <20180409034144.22477-1-benh@kernel.crashing.org> X-Mailer: git-send-email 2.14.3 Subject: [Skiboot] [PATCH 1/2] pcie-slot: Don't fail powering on an already on switch X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mikey@neuling.org MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" If the power state is already the required value, return OPAL_SUCCESS rather than OPAL_PARAMETER to avoid spurrious errors during boot. Signed-off-by: Benjamin Herrenschmidt Acked-By: Michael Neuling --- core/pcie-slot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/pcie-slot.c b/core/pcie-slot.c index c3069040..45996342 100644 --- a/core/pcie-slot.c +++ b/core/pcie-slot.c @@ -205,7 +205,7 @@ static int64_t pcie_slot_set_power_state_ext(struct pci_slot *slot, uint8_t val, uint16_t state; if (slot->power_state == val) - return OPAL_PARAMETER; + return OPAL_SUCCESS; /* Update the power state and return immediately if the power * control functionality isn't supported on the PCI slot. From patchwork Mon Apr 9 03:41:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Herrenschmidt X-Patchwork-Id: 896107 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 ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40KGNJ5LdXz9s1p for ; Mon, 9 Apr 2018 13:42:56 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 40KGNJ42HqzDrbT for ; Mon, 9 Apr 2018 13:42:56 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=permerror (mailfrom) smtp.mailfrom=kernel.crashing.org (client-ip=63.228.1.57; helo=gate.crashing.org; envelope-from=benh@kernel.crashing.org; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.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 40KGMZ2TPHzDqyF for ; Mon, 9 Apr 2018 13:42:17 +1000 (AEST) Received: from pasglop.ozlabs.ibm.com (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id w393foYS012996; Sun, 8 Apr 2018 22:41:53 -0500 From: Benjamin Herrenschmidt To: skiboot@lists.ozlabs.org Date: Mon, 9 Apr 2018 13:41:44 +1000 Message-Id: <20180409034144.22477-2-benh@kernel.crashing.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180409034144.22477-1-benh@kernel.crashing.org> References: <20180409034144.22477-1-benh@kernel.crashing.org> Subject: [Skiboot] [PATCH 2/2] phb4: Quieten and improve "Timeout waiting for electrical link" X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mikey@neuling.org MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" This happens normally if a slot doesn't have a working HW presence detect and relies instead of inband presence detect. The message we display is scary and not very useful unless ou are debugging, so quiten it up and change it to something more meaningful. Signed-off-by: Benjamin Herrenschmidt Acked-By: Michael Neuling --- hw/phb4.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/phb4.c b/hw/phb4.c index a716f991..531e8a62 100644 --- a/hw/phb4.c +++ b/hw/phb4.c @@ -2646,9 +2646,8 @@ static int64_t phb4_poll_link(struct pci_slot *slot) } if (slot->retries-- == 0) { - PHBERR(p, "LINK: Timeout waiting for electrical link\n"); - PHBDBG(p, "LINK: DLP train control: 0x%016llx\n", reg); - return OPAL_HARDWARE; + PHBDBG(p, "LINK: No in-band presence\n"); + return OPAL_SUCCESS; } /* Retry */ return pci_slot_set_sm_timeout(slot, msecs_to_tb(10));