From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Arun Parameswaran <arun.parameswaran@broadcom.com>,
Scott Branden <scott.branden@broadcom.com>,
Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
"David S . Miller" <davem@davemloft.net>,
Sasha Levin <sashal@kernel.org>,
netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: [PATCH AUTOSEL 5.4 25/58] net: phy: restore mdio regs in the iproc mdio driver
Date: Mon, 2 Mar 2020 21:47:07 -0500 [thread overview]
Message-ID: <20200303024740.9511-25-sashal@kernel.org> (raw)
In-Reply-To: <20200303024740.9511-1-sashal@kernel.org>
From: Arun Parameswaran <arun.parameswaran@broadcom.com>
[ Upstream commit 6f08e98d62799e53c89dbf2c9a49d77e20ca648c ]
The mii management register in iproc mdio block
does not have a retention register so it is lost on suspend.
Save and restore value of register while resuming from suspend.
Fixes: bb1a619735b4 ("net: phy: Initialize mdio clock at probe function")
Signed-off-by: Arun Parameswaran <arun.parameswaran@broadcom.com>
Signed-off-by: Scott Branden <scott.branden@broadcom.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/phy/mdio-bcm-iproc.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/drivers/net/phy/mdio-bcm-iproc.c b/drivers/net/phy/mdio-bcm-iproc.c
index 7e9975d250669..f1ded03f0229b 100644
--- a/drivers/net/phy/mdio-bcm-iproc.c
+++ b/drivers/net/phy/mdio-bcm-iproc.c
@@ -178,6 +178,23 @@ static int iproc_mdio_remove(struct platform_device *pdev)
return 0;
}
+#ifdef CONFIG_PM_SLEEP
+int iproc_mdio_resume(struct device *dev)
+{
+ struct platform_device *pdev = to_platform_device(dev);
+ struct iproc_mdio_priv *priv = platform_get_drvdata(pdev);
+
+ /* restore the mii clock configuration */
+ iproc_mdio_config_clk(priv->base);
+
+ return 0;
+}
+
+static const struct dev_pm_ops iproc_mdio_pm_ops = {
+ .resume = iproc_mdio_resume
+};
+#endif /* CONFIG_PM_SLEEP */
+
static const struct of_device_id iproc_mdio_of_match[] = {
{ .compatible = "brcm,iproc-mdio", },
{ /* sentinel */ },
@@ -188,6 +205,9 @@ static struct platform_driver iproc_mdio_driver = {
.driver = {
.name = "iproc-mdio",
.of_match_table = iproc_mdio_of_match,
+#ifdef CONFIG_PM_SLEEP
+ .pm = &iproc_mdio_pm_ops,
+#endif
},
.probe = iproc_mdio_probe,
.remove = iproc_mdio_remove,
--
2.20.1
next prev parent reply other threads:[~2020-03-03 2:48 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-03 2:46 [PATCH AUTOSEL 5.4 01/58] ALSA: hda: do not override bus codec_mask in link_get() Sasha Levin
2020-03-03 2:46 ` [PATCH AUTOSEL 5.4 02/58] usb: charger: assign specific number for enum value Sasha Levin
2020-03-03 2:46 ` [PATCH AUTOSEL 5.4 03/58] serial: ar933x_uart: set UART_CS_{RX,TX}_READY_ORIDE Sasha Levin
2020-03-03 2:46 ` [PATCH AUTOSEL 5.4 04/58] selftests: fix too long argument Sasha Levin
2020-03-03 2:46 ` [PATCH AUTOSEL 5.4 05/58] usb: gadget: composite: Support more than 500mA MaxPower Sasha Levin
2020-03-03 2:46 ` [PATCH AUTOSEL 5.4 06/58] usb: gadget: ffs: ffs_aio_cancel(): Save/restore IRQ flags Sasha Levin
2020-03-03 2:46 ` [PATCH AUTOSEL 5.4 07/58] usb: gadget: serial: fix Tx stall after buffer overflow Sasha Levin
2020-03-03 2:46 ` [PATCH AUTOSEL 5.4 08/58] habanalabs: halt the engines before hard-reset Sasha Levin
2020-03-03 2:46 ` [PATCH AUTOSEL 5.4 09/58] habanalabs: do not halt CoreSight during hard reset Sasha Levin
2020-03-03 2:46 ` [PATCH AUTOSEL 5.4 10/58] habanalabs: patched cb equals user cb in device memset Sasha Levin
2020-03-03 2:46 ` [PATCH AUTOSEL 5.4 11/58] drm/msm/mdp5: rate limit pp done timeout warnings Sasha Levin
2020-03-03 2:46 ` [PATCH AUTOSEL 5.4 12/58] drm: msm: Fix return type of dsi_mgr_connector_mode_valid for kCFI Sasha Levin
2020-03-03 2:46 ` [PATCH AUTOSEL 5.4 13/58] drm/modes: Make sure to parse valid rotation value from cmdline Sasha Levin
2020-03-03 2:46 ` [PATCH AUTOSEL 5.4 14/58] drm/modes: Allow DRM_MODE_ROTATE_0 when applying video mode parameters Sasha Levin
2020-03-03 2:46 ` [PATCH AUTOSEL 5.4 15/58] scsi: megaraid_sas: silence a warning Sasha Levin
2020-03-03 2:46 ` [PATCH AUTOSEL 5.4 16/58] drm/msm/dsi: save pll state before dsi host is powered off Sasha Levin
2020-03-03 2:46 ` [PATCH AUTOSEL 5.4 17/58] drm/msm/dsi/pll: call vco set rate explicitly Sasha Levin
2020-03-03 2:47 ` [PATCH AUTOSEL 5.4 18/58] selftests: forwarding: use proto icmp for {gretap, ip6gretap}_mac testing Sasha Levin
2020-03-03 2:47 ` [PATCH AUTOSEL 5.4 19/58] net: macb: ensure interface is not suspended on at91rm9200 Sasha Levin
2020-03-03 2:47 ` [PATCH AUTOSEL 5.4 20/58] selftests: forwarding: vxlan_bridge_1d: fix tos value Sasha Levin
2020-03-03 2:47 ` [PATCH AUTOSEL 5.4 21/58] net: atlantic: check rpc result and wait for rpc address Sasha Levin
2020-03-03 2:47 ` [PATCH AUTOSEL 5.4 22/58] net: atlantic: fix use after free kasan warn Sasha Levin
2020-03-03 2:47 ` [PATCH AUTOSEL 5.4 23/58] net: atlantic: fix potential error handling Sasha Levin
2020-03-03 2:47 ` [PATCH AUTOSEL 5.4 24/58] net: atlantic: fix out of range usage of active_vlans array Sasha Levin
2020-03-03 2:47 ` Sasha Levin [this message]
2020-03-03 2:47 ` [PATCH AUTOSEL 5.4 26/58] net: dsa: b53: Ensure the default VID is untagged Sasha Levin
2020-03-03 2:47 ` [PATCH AUTOSEL 5.4 27/58] bonding: add missing netdev_update_lockdep_key() Sasha Levin
2020-03-03 2:47 ` [PATCH AUTOSEL 5.4 28/58] net: ks8851-ml: Remove 8-bit bus accessors Sasha Levin
2020-03-03 2:47 ` [PATCH AUTOSEL 5.4 29/58] net: ks8851-ml: Fix 16-bit data access Sasha Levin
2020-03-03 2:47 ` [PATCH AUTOSEL 5.4 30/58] net: ks8851-ml: Fix 16-bit IO operation Sasha Levin
2020-03-03 2:47 ` [PATCH AUTOSEL 5.4 31/58] net: ethernet: dm9000: Handle -EPROBE_DEFER in dm9000_parse_dt() Sasha Levin
2020-03-03 2:47 ` [PATCH AUTOSEL 5.4 32/58] watchdog: da9062: do not ping the hw during stop() Sasha Levin
2020-03-03 2:47 ` [PATCH AUTOSEL 5.4 33/58] s390/cio: cio_ignore_proc_seq_next should increase position index Sasha Levin
2020-03-03 2:47 ` [PATCH AUTOSEL 5.4 34/58] s390: make 'install' not depend on vmlinux Sasha Levin
2020-03-03 2:47 ` [PATCH AUTOSEL 5.4 35/58] net: mscc: fix in frame extraction Sasha Levin
2020-03-03 2:47 ` [PATCH AUTOSEL 5.4 36/58] efi: Only print errors about failing to get certs if EFI vars are found Sasha Levin
2020-03-03 2:47 ` [PATCH AUTOSEL 5.4 37/58] qede: Fix race between rdma destroy workqueue and link change event Sasha Levin
2020-03-03 2:47 ` [PATCH AUTOSEL 5.4 38/58] net/mlx5: DR, Fix matching on vport gvmi Sasha Levin
2020-03-03 2:47 ` [PATCH AUTOSEL 5.4 39/58] iommu/amd: Disable IOMMU on Stoney Ridge systems Sasha Levin
2020-03-03 2:47 ` [PATCH AUTOSEL 5.4 40/58] nvme/pci: Add sleep quirk for Samsung and Toshiba drives Sasha Levin
2020-03-03 2:47 ` [PATCH AUTOSEL 5.4 41/58] nvme-pci: Use single IRQ vector for old Apple models Sasha Levin
2020-03-03 2:47 ` [PATCH AUTOSEL 5.4 42/58] x86/boot/compressed: Don't declare __force_order in kaslr_64.c Sasha Levin
2020-03-03 2:47 ` [PATCH AUTOSEL 5.4 43/58] s390/qdio: fill SL with absolute addresses Sasha Levin
2020-03-03 2:47 ` [PATCH AUTOSEL 5.4 44/58] nvme: Fix uninitialized-variable warning Sasha Levin
2020-03-03 2:47 ` [PATCH AUTOSEL 5.4 45/58] nfc: pn544: Fix occasional HW initialization failure Sasha Levin
2020-03-03 2:47 ` [PATCH AUTOSEL 5.4 46/58] ice: Don't tell the OS that link is going down Sasha Levin
2020-03-03 2:47 ` [PATCH AUTOSEL 5.4 47/58] x86/xen: Distribute switch variables for initialization Sasha Levin
2020-03-03 2:47 ` [PATCH AUTOSEL 5.4 48/58] s390/qeth: vnicc Fix EOPNOTSUPP precedence Sasha Levin
2020-03-03 2:47 ` [PATCH AUTOSEL 5.4 49/58] net: thunderx: workaround BGX TX Underflow issue Sasha Levin
2020-03-03 2:47 ` [PATCH AUTOSEL 5.4 50/58] bnxt_en: Improve device shutdown method Sasha Levin
2020-03-03 2:47 ` [PATCH AUTOSEL 5.4 51/58] bnxt_en: Issue PCIe FLR in kdump kernel to cleanup pending DMAs Sasha Levin
2020-03-03 2:47 ` [PATCH AUTOSEL 5.4 52/58] csky/mm: Fixup export invalid_pte_table symbol Sasha Levin
2020-03-03 2:47 ` [PATCH AUTOSEL 5.4 53/58] csky: Set regs->usp to kernel sp, when the exception is from kernel Sasha Levin
2020-03-03 2:47 ` [PATCH AUTOSEL 5.4 54/58] csky/smp: Fixup boot failed when CONFIG_SMP Sasha Levin
2020-03-03 2:47 ` [PATCH AUTOSEL 5.4 55/58] csky: Fixup ftrace modify panic Sasha Levin
2020-03-03 2:47 ` [PATCH AUTOSEL 5.4 56/58] csky: Fixup compile warning for three unimplemented syscalls Sasha Levin
2020-03-03 2:47 ` [PATCH AUTOSEL 5.4 57/58] arch/csky: fix some Kconfig typos Sasha Levin
2020-03-03 2:47 ` [PATCH AUTOSEL 5.4 58/58] selftests: forwarding: vxlan_bridge_1d: use more proper tos value Sasha 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=20200303024740.9511-25-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=andrew@lunn.ch \
--cc=arun.parameswaran@broadcom.com \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=scott.branden@broadcom.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