From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Kevin Brace <kevinbrace@bracecomputerlab.com>,
"David S . Miller" <davem@davemloft.net>,
Sasha Levin <sashal@kernel.org>,
netdev@vger.kernel.org
Subject: [PATCH AUTOSEL 4.19 06/12] via-rhine: Fix for the hardware having a reset failure after resume
Date: Mon, 12 Oct 2020 15:03:29 -0400 [thread overview]
Message-ID: <20201012190335.3279538-6-sashal@kernel.org> (raw)
In-Reply-To: <20201012190335.3279538-1-sashal@kernel.org>
From: Kevin Brace <kevinbrace@bracecomputerlab.com>
[ Upstream commit d120c9a81e32c43cba8017dec873b6a414898716 ]
In rhine_resume() and rhine_suspend(), the code calls netif_running()
to see if the network interface is down or not. If it is down (i.e.,
netif_running() returning false), they will skip any housekeeping work
within the function relating to the hardware. This becomes a problem
when the hardware resumes from a standby since it is counting on
rhine_resume() to map its MMIO and power up rest of the hardware.
Not getting its MMIO remapped and rest of the hardware powered
up lead to a soft reset failure and hardware disappearance. The
solution is to map its MMIO and power up rest of the hardware inside
rhine_open() before soft reset is to be performed. This solution was
verified on ASUS P5V800-VM mainboard's integrated Rhine-II Ethernet
MAC inside VIA Technologies VT8251 South Bridge.
Signed-off-by: Kevin Brace <kevinbrace@bracecomputerlab.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/via/via-rhine.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/via/via-rhine.c b/drivers/net/ethernet/via/via-rhine.c
index 33949248c829e..b38ab17e9b132 100644
--- a/drivers/net/ethernet/via/via-rhine.c
+++ b/drivers/net/ethernet/via/via-rhine.c
@@ -1710,6 +1710,8 @@ static int rhine_open(struct net_device *dev)
goto out_free_ring;
alloc_tbufs(dev);
+ enable_mmio(rp->pioaddr, rp->quirks);
+ rhine_power_init(dev);
rhine_chip_reset(dev);
rhine_task_enable(rp);
init_registers(dev);
--
2.25.1
next prev parent reply other threads:[~2020-10-12 19:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-12 19:03 [PATCH AUTOSEL 4.19 01/12] platform/x86: asus-nb-wmi: Revert "Do not load on Asus T100TA and T200TA" Sasha Levin
2020-10-12 19:03 ` [PATCH AUTOSEL 4.19 02/12] net: mscc: ocelot: fix fields offset in SG_CONFIG_REG_3 Sasha Levin
2020-10-12 19:03 ` [PATCH AUTOSEL 4.19 03/12] net/fsl: quieten expected MDIO access failures Sasha Levin
2020-10-12 19:03 ` [PATCH AUTOSEL 4.19 04/12] net: usb: ax88179_178a: add Toshiba usb 3.0 adapter Sasha Levin
2020-10-12 19:03 ` [PATCH AUTOSEL 4.19 05/12] net: usb: ax88179_178a: add MCT " Sasha Levin
2020-10-12 19:03 ` Sasha Levin [this message]
2020-10-12 19:03 ` [PATCH AUTOSEL 4.19 07/12] via-rhine: VTunknown1 device is really VT8251 South Bridge Sasha Levin
2020-10-12 19:03 ` [PATCH AUTOSEL 4.19 08/12] net: usb: pegasus: Proper error handing when setting pegasus' MAC address Sasha Levin
2020-10-12 19:03 ` [PATCH AUTOSEL 4.19 09/12] net: usb: rtl8150: set random MAC address when set_ethernet_addr() fails Sasha Levin
2020-10-12 19:03 ` [PATCH AUTOSEL 4.19 10/12] usermodehelper: reset umask to default before executing user process Sasha Levin
2020-10-12 19:03 ` [PATCH AUTOSEL 4.19 11/12] arm/arm64: xen: Fix to convert percpu address to gfn correctly Sasha Levin
2020-10-12 19:03 ` [PATCH AUTOSEL 4.19 12/12] net: usb: qmi_wwan: add Cellient MPL200 card 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=20201012190335.3279538-6-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=davem@davemloft.net \
--cc=kevinbrace@bracecomputerlab.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).