From: alexander.levin@verizon.com
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"stable@vger.kernel.org" <stable@vger.kernel.org>
Cc: Doug Berger <opendmb@gmail.com>,
"David S . Miller" <davem@davemloft.net>,
alexander.levin@verizon.com
Subject: [PATCH AUTOSEL for 3.18 04/59] net: bcmgenet: Power up the internal PHY before probing the MII
Date: Thu, 7 Dec 2017 15:51:23 +0000 [thread overview]
Message-ID: <20171207155116.6013-4-alexander.levin@verizon.com> (raw)
In-Reply-To: <20171207155116.6013-1-alexander.levin@verizon.com>
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>
---
drivers/net/ethernet/broadcom/genet/bcmgenet.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
index 9b49d6ebf58e..87f0f6e0a15c 100644
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
@@ -2598,6 +2598,7 @@ static int bcmgenet_probe(struct platform_device *pdev)
const void *macaddr;
struct resource *r;
int err = -EIO;
+ const char *phy_mode_str;
/* Up to GENET_MAX_MQ_CNT + 1 TX queues and a single RX queue */
dev = alloc_etherdev_mqs(sizeof(*priv), GENET_MAX_MQ_CNT + 1, 1);
@@ -2685,6 +2686,13 @@ static int bcmgenet_probe(struct platform_device *pdev)
if (IS_ERR(priv->clk_wol))
dev_warn(&priv->pdev->dev, "failed to get enet-wol clock\n");
+ /* 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;
--
2.11.0
next prev parent reply other threads:[~2017-12-07 16:19 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-07 15:51 [PATCH AUTOSEL for 3.18 01/59] usb: phy: isp1301: Add OF device ID table alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 02/59] net: bcmgenet: correct the RBUF_OVFL_CNT and RBUF_ERR_CNT MIB values alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 05/59] NFSD: fix nfsd_minorversion(.., NFSD_AVAIL) alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 03/59] net: bcmgenet: correct MIB access of UniMAC RUNT counters alexander.levin
2017-12-07 15:51 ` alexander.levin [this message]
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 06/59] NFSD: fix nfsd_reset_versions for NFSv4 alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 10/59] net: Resend IGMP memberships upon peer notification alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 08/59] net: wimax/i2400m: fix NULL-deref at probe alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 09/59] dmaengine: Fix array index out of bounds warning in __get_unmap_pool() alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 07/59] Input: i8042 - add TUXEDO BU1406 (N24_25BU) to the nomux list alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 11/59] openrisc: fix issue handling 8 byte get_user calls alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 12/59] drm/radeon/si: add dpm quirk for Oland alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 13/59] sched/deadline: Use deadline instead of period when calculating overflow alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 14/59] drm/radeon: reinstate oland workaround for sclk alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 16/59] afs: Populate group ID from vnode status alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 15/59] afs: Fix missing put_page() alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 17/59] afs: Adjust mode bits processing alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 18/59] afs: Flush outstanding writes when an fd is closed alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 19/59] afs: Fix the maths in afs_fs_store_data() alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 20/59] afs: Populate and use client modification time alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 21/59] afs: Fix page leak in afs_write_begin() alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 25/59] btrfs: add missing memset while reading compressed inline extents alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 23/59] perf symbols: Fix symbols__fixup_end heuristic for corner cases alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 22/59] afs: Fix afs_kill_pages() alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 24/59] NFSv4.1 respect server's max size in CREATE_SESSION alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 29/59] video: fbdev: au1200fb: Release some resources if a memory allocation fails alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 26/59] target: Use system workqueue for ALUA transitions alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 28/59] video: udlfb: Fix read EDID timeout alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 27/59] fbdev: controlfb: Add missing modes to fix out of bounds access alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 30/59] video: fbdev: au1200fb: Return an error code if a memory allocation fails alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 32/59] PCI/PME: Handle invalid data when reading Root Status alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 33/59] powerpc/powernv/cpufreq: Fix the frequency read by /proc/cpuinfo alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 31/59] ASoC: cs42l56: Fix reset GPIO name in example DT binding alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 35/59] powerpc/ipic: Fix status get and status clear alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 37/59] target/iscsi: Fix a race condition in iscsit_add_reject_from_cmd() alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 34/59] powerpc/opal: Fix EBUSY bug in acquiring tokens alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 36/59] platform/x86: sony-laptop: Fix error handling in sony_nc_setup_rfkill() alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 40/59] target/file: Do not return error for UNMAP if length is zero alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 38/59] iscsi-target: fix memory leak in lio_target_tiqn_addtpg() alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 41/59] arm-ccn: perf: Prevent module unload while PMU is in use alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 39/59] target:fix condition return in core_pr_dump_initiator_port() alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 43/59] clk: tegra: Fix cclk_lp divisor register alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 42/59] mm: Handle 0 flags in _calc_vm_trans() macro alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 45/59] thermal/drivers/step_wise: Fix temperature regulation misbehavior alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 44/59] ppp: Destroy the mutex when cleanup alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 46/59] GFS2: Take inode off order_write list when setting jdata flag alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 47/59] bcache: explicitly destroy mutex while exiting alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 52/59] pinctrl: adi2: Fix Kconfig build problem alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 50/59] PCI: Detach driver before procfs & sysfs teardown on device remove alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 49/59] xfs: fix log block underflow during recovery cycle verification alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 51/59] tty fix oops when rmmod 8250 alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 55/59] ASoC: samsung: i2s: disable secondary DAI until it gets fixed alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 54/59] scsi: scsi_devinfo: Add REPORTLUN2 to EMC SYMMETRIX blacklist entry alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 53/59] raid5: Set R5_Expanded on parity devices as well as data alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 56/59] scsi: bfa: integer overflow in debugfs alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 57/59] udf: Avoid overflow when session starts at large offset alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 58/59] macvlan: Only deliver one copy of the frame to the macvlan interface alexander.levin
2017-12-07 15:51 ` [PATCH AUTOSEL for 3.18 59/59] ath9k: fix tx99 potential info leak alexander.levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171207155116.6013-4-alexander.levin@verizon.com \
--to=alexander.levin@verizon.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=opendmb@gmail.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®