All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Brace <kevinbrace@gmx.com>
To: netdev@vger.kernel.org
Cc: Kevin Brace <kevinbrace@bracecomputerlab.com>
Subject: [PATCH net 1/4] via-rhine: Fix for the hardware having a reset failure after resume
Date: Mon, 28 Sep 2020 15:00:38 -0700	[thread overview]
Message-ID: <20200928220041.6654-2-kevinbrace@gmx.com> (raw)
In-Reply-To: <20200928220041.6654-1-kevinbrace@gmx.com>

From: Kevin Brace <kevinbrace@bracecomputerlab.com>

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>
---
 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 803247d51fe9..a20492da3407 100644
--- a/drivers/net/ethernet/via/via-rhine.c
+++ b/drivers/net/ethernet/via/via-rhine.c
@@ -1706,6 +1706,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.17.1


  reply	other threads:[~2020-09-28 23:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-28 22:00 [PATCH net 0/4] via-rhine: Resume fix and other maintenance work Kevin Brace
2020-09-28 22:00 ` Kevin Brace [this message]
2020-09-28 22:00 ` [PATCH net 2/4] via-rhine: VTunknown1 device is really VT8251 South Bridge Kevin Brace
2020-09-28 22:00 ` [PATCH net 3/4] via-rhine: New device driver maintainer Kevin Brace
2020-09-28 22:00 ` [PATCH net 4/4] via-rhine: Version bumped to 1.5.2 Kevin Brace
2020-09-29  1:50   ` David Miller
2020-09-29 21:10     ` Kevin Brace

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=20200928220041.6654-2-kevinbrace@gmx.com \
    --to=kevinbrace@gmx.com \
    --cc=kevinbrace@bracecomputerlab.com \
    --cc=netdev@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 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.