Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1506302

[PATCH net 2/2] net: dsa: bcm_sf2: Do not rely on kexec_in_progress

Path csiph.com!1.us.feeder.erje.net!feeder.erje.net!2.eu.feeder.erje.net!news2.arglkargh.de!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From Florian Fainelli <f.fainelli@gmail.com>
Newsgroups linux.kernel
Subject [PATCH net 2/2] net: dsa: bcm_sf2: Do not rely on kexec_in_progress
Date Fri, 21 Oct 2016 23:30:01 +0200
Message-ID <suPy1-2Jv-3@gated-at.bofh.it> (permalink)
References <suPy1-2Jv-5@gated-at.bofh.it>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=pWWXUIeIfhC0iZk+QgcNpTxAu5awedkzw2KiKMYB3XY=; b=G1eTdoLveZpTMLgmjSr2tX9MhW+hmsH1WDEqoseJfP1E5NaFmXe0VDimx5fFKmQm0d 9Gx2JSDKyMwMCvnDzKN75mSiS8KMiv6XIzEKFZhN22BGa8W2nkLH+FZvJ6oQpuvuu4Ic kzw5A0/O9GrMuPkyWOvOn0iGW8LEGtulZWc0Kj5Qcw1FTIf9MVveZBNexGEKwQPQmenz H+XgePtY4MJ1LLO+FSa+ir8bsMvlacG6PseDuLDuv0F0zizO6tA6Ec4lKb6L1V4v++zw xDm+dzt00xTliq6t9VLiSYc2yBW86bx/I4GTxOoXbNcawdMqkVOcpM+vE5RnW1uOxZsv OYRg==
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=pWWXUIeIfhC0iZk+QgcNpTxAu5awedkzw2KiKMYB3XY=; b=d6oVZSEw50PKP6Lmq3680yiSP7lUPbk9/yop9hPoT15B/mNueY9A6MAH8J4nz9+UGi Ag0/78kP5q7LhGQZRg85ZunDkVWMGvyZsQ3zzd47PJyUr499lUhzjbVh5gGZVi3BIcBD gTTr9Sgoi1n/jN9g0FwfupoRfGyItklJza2O53j49Yeom/HnZ0Dt1JKlM8wa9rgfhXjz l6udb0+XxP0jHcuJstc4XpNhsKHshlRS2FLFrAvcTDsKuWjtzOXaXiI/c5TBWd7rJYtK u4R58HRhz7p0XeiSako60fl4oCdkqzKyDUW6VQ4RXKGFhOooIj/pHDkxsXRr7oXfJbD1 10Uw==
X-Gm-Message-State ABUngvdcF4nyjLJacCYJaGoHuPUjxyQ4Qk0f6txim0+5URK51OKS31aMcehCNiIpxbMYKQ==
X-Received by 10.99.43.8 with SMTP id r8mr4194698pgr.165.1477084926424; Fri, 21 Oct 2016 14:22:06 -0700 (PDT)
X-Mailer git-send-email 2.7.4
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 41
Organization linux.* mail to news gateway
X-Original-Cc davem@davemloft.net, linux-kernel@vger.kernel.org, ebiederm@xmission.com, kexec@lists.infradead.org, Florian Fainelli <f.fainelli@gmail.com>
X-Original-Date Fri, 21 Oct 2016 14:21:56 -0700
X-Original-Message-ID <1477084916-26327-3-git-send-email-f.fainelli@gmail.com>
X-Original-References <1477084916-26327-1-git-send-email-f.fainelli@gmail.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1506302

Show key headers only | View raw


After discussing with Eric, it turns out that, while using
kexec_in_progress is a nice optimization, which prevents us from always
powering on the integrated PHY, let's just turn it on in the shutdown
path.

This removes a dependency on kexec_in_progress which, according to Eric
should not be used by modules

Fixes: 2399d6143f85 ("net: dsa: bcm_sf2: Prevent GPHY shutdown for kexec'd kernels")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/net/dsa/bcm_sf2.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/dsa/bcm_sf2.c b/drivers/net/dsa/bcm_sf2.c
index 077a24541584..e3ee27ce13dd 100644
--- a/drivers/net/dsa/bcm_sf2.c
+++ b/drivers/net/dsa/bcm_sf2.c
@@ -30,7 +30,6 @@
 #include <linux/etherdevice.h>
 #include <net/switchdev.h>
 #include <linux/platform_data/b53.h>
-#include <linux/kexec.h>
 
 #include "bcm_sf2.h"
 #include "bcm_sf2_regs.h"
@@ -1141,9 +1140,11 @@ static void bcm_sf2_sw_shutdown(struct platform_device *pdev)
 	/* For a kernel about to be kexec'd we want to keep the GPHY on for a
 	 * successful MDIO bus scan to occur. If we did turn off the GPHY
 	 * before (e.g: port_disable), this will also power it back on.
+	 *
+	 * Do not rely on kexec_in_progress, just power the PHY on.
 	 */
 	if (priv->hw_params.num_gphy == 1)
-		bcm_sf2_gphy_enable_set(priv->dev->ds, kexec_in_progress);
+		bcm_sf2_gphy_enable_set(priv->dev->ds, true);
 }
 
 #ifdef CONFIG_PM_SLEEP
-- 
2.7.4

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH net 2/2] net: dsa: bcm_sf2: Do not rely on kexec_in_progress Florian Fainelli <f.fainelli@gmail.com> - 2016-10-21 23:30 +0200

csiph-web