All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch "net: bcmgenet: Power up the internal PHY before probing the MII" has been added to the 4.9-stable tree
@ 2017-12-18 13:21 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-12-18 13:21 UTC (permalink / raw)
  To: opendmb, alexander.levin, davem, f.fainelli, gregkh
  Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    net: bcmgenet: Power up the internal PHY before probing the MII

to the 4.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-bcmgenet-power-up-the-internal-phy-before-probing-the-mii.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From foo@baz Mon Dec 18 14:12:34 CET 2017
From: Doug Berger <opendmb@gmail.com>
Date: Thu, 9 Mar 2017 16:58:48 -0800
Subject: net: bcmgenet: Power up the internal PHY before probing the MII

From: Doug Berger <opendmb@gmail.com>


[ Upstream commit 6be371b053dc86f11465cc1abce2e99bda0a0574 ]

When using the internal PHY it must be powered up when the MII is probed
or the PHY will not be detected.  Since the PHY is powered up at reset
this has not been a problem.  However, when the kernel is restarted with
kexec the PHY will likely be powered down when the kernel starts so it
will not be detected and the Ethernet link will not be established.

This commit explicitly powers up the internal PHY when the GENET driver
is probed to correct this behavior.

Fixes: 1c1008c793fa ("net: bcmgenet: add main driver file")
Signed-off-by: Doug Berger <opendmb@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/ethernet/broadcom/genet/bcmgenet.c |    8 ++++++++
 1 file changed, 8 insertions(+)

--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
@@ -3296,6 +3296,7 @@ static int bcmgenet_probe(struct platfor
 	const void *macaddr;
 	struct resource *r;
 	int err = -EIO;
+	const char *phy_mode_str;
 
 	/* Up to GENET_MAX_MQ_CNT + 1 TX queues and RX queues */
 	dev = alloc_etherdev_mqs(sizeof(*priv), GENET_MAX_MQ_CNT + 1,
@@ -3403,6 +3404,13 @@ static int bcmgenet_probe(struct platfor
 		priv->clk_eee = NULL;
 	}
 
+	/* If this is an internal GPHY, power it on now, before UniMAC is
+	 * brought out of reset as absolutely no UniMAC activity is allowed
+	 */
+	if (dn && !of_property_read_string(dn, "phy-mode", &phy_mode_str) &&
+	    !strcasecmp(phy_mode_str, "internal"))
+		bcmgenet_power_up(priv, GENET_POWER_PASSIVE);
+
 	err = reset_umac(priv);
 	if (err)
 		goto err_clk_disable;


Patches currently in stable-queue which might be from opendmb@gmail.com are

queue-4.9/net-bcmgenet-synchronize-irq0-status-between-the-isr-and-task.patch
queue-4.9/net-bcmgenet-correct-the-rbuf_ovfl_cnt-and-rbuf_err_cnt-mib-values.patch
queue-4.9/net-bcmgenet-correct-mib-access-of-unimac-runt-counters.patch
queue-4.9/net-bcmgenet-power-down-internal-phy-if-open-or-resume-fails.patch
queue-4.9/net-bcmgenet-reserved-phy-revisions-must-be-checked-first.patch
queue-4.9/net-bcmgenet-power-up-the-internal-phy-before-probing-the-mii.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-12-18 13:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-18 13:21 Patch "net: bcmgenet: Power up the internal PHY before probing the MII" has been added to the 4.9-stable tree gregkh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.