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.