linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 0/2] net: dsa: bcm_sf2: Do not rely on kexec_in_progress
@ 2016-10-21 21:21 Florian Fainelli
  2016-10-21 21:21 ` [PATCH net 1/2] Revert "kexec: Export kexec_in_progress to modules" Florian Fainelli
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Florian Fainelli @ 2016-10-21 21:21 UTC (permalink / raw)
  To: netdev; +Cc: davem, linux-kernel, ebiederm, kexec, Florian Fainelli

David, Eric,

These are the two patches following the discussing we had on kexec_in_progress.

Feel free to apply or discard them, thanks!

Florian Fainelli (2):
  Revert "kexec: Export kexec_in_progress to modules"
  net: dsa: bcm_sf2: Do not rely on kexec_in_progress

 drivers/net/dsa/bcm_sf2.c | 5 +++--
 kernel/kexec_core.c       | 1 -
 2 files changed, 3 insertions(+), 3 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH net 1/2] Revert "kexec: Export kexec_in_progress to modules"
  2016-10-21 21:21 [PATCH net 0/2] net: dsa: bcm_sf2: Do not rely on kexec_in_progress Florian Fainelli
@ 2016-10-21 21:21 ` Florian Fainelli
  2016-10-21 21:21 ` [PATCH net 2/2] net: dsa: bcm_sf2: Do not rely on kexec_in_progress Florian Fainelli
  2016-10-22 20:18 ` [PATCH net 0/2] " David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2016-10-21 21:21 UTC (permalink / raw)
  To: netdev; +Cc: davem, linux-kernel, ebiederm, kexec, Florian Fainelli

This reverts commit 97dcaa0fcfd24daa9a36c212c1ad1d5a97759212. Based on
the review discussion with Eric, we will come up with a different fix
for the bcm_sf2 driver which does not make it rely on the
kexec_in_progress value.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 kernel/kexec_core.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/kernel/kexec_core.c b/kernel/kexec_core.c
index 786ab85a5452..561675589511 100644
--- a/kernel/kexec_core.c
+++ b/kernel/kexec_core.c
@@ -59,7 +59,6 @@ size_t vmcoreinfo_max_size = sizeof(vmcoreinfo_data);
 
 /* Flag to indicate we are going to kexec a new kernel */
 bool kexec_in_progress = false;
-EXPORT_SYMBOL_GPL(kexec_in_progress);
 
 
 /* Location of the reserved area for the crash kernel */
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH net 2/2] net: dsa: bcm_sf2: Do not rely on kexec_in_progress
  2016-10-21 21:21 [PATCH net 0/2] net: dsa: bcm_sf2: Do not rely on kexec_in_progress Florian Fainelli
  2016-10-21 21:21 ` [PATCH net 1/2] Revert "kexec: Export kexec_in_progress to modules" Florian Fainelli
@ 2016-10-21 21:21 ` Florian Fainelli
  2016-10-22 20:18 ` [PATCH net 0/2] " David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2016-10-21 21:21 UTC (permalink / raw)
  To: netdev; +Cc: davem, linux-kernel, ebiederm, kexec, Florian Fainelli

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net 0/2] net: dsa: bcm_sf2: Do not rely on kexec_in_progress
  2016-10-21 21:21 [PATCH net 0/2] net: dsa: bcm_sf2: Do not rely on kexec_in_progress Florian Fainelli
  2016-10-21 21:21 ` [PATCH net 1/2] Revert "kexec: Export kexec_in_progress to modules" Florian Fainelli
  2016-10-21 21:21 ` [PATCH net 2/2] net: dsa: bcm_sf2: Do not rely on kexec_in_progress Florian Fainelli
@ 2016-10-22 20:18 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2016-10-22 20:18 UTC (permalink / raw)
  To: f.fainelli; +Cc: netdev, linux-kernel, ebiederm, kexec

From: Florian Fainelli <f.fainelli@gmail.com>
Date: Fri, 21 Oct 2016 14:21:54 -0700

> These are the two patches following the discussing we had on
> kexec_in_progress.
> 
> Feel free to apply or discard them, thanks!

Applied, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-10-22 20:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-21 21:21 [PATCH net 0/2] net: dsa: bcm_sf2: Do not rely on kexec_in_progress Florian Fainelli
2016-10-21 21:21 ` [PATCH net 1/2] Revert "kexec: Export kexec_in_progress to modules" Florian Fainelli
2016-10-21 21:21 ` [PATCH net 2/2] net: dsa: bcm_sf2: Do not rely on kexec_in_progress Florian Fainelli
2016-10-22 20:18 ` [PATCH net 0/2] " David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).