netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hayes Wang <hayeswang@realtek.com>
To: <romieu@fr.zoreil.com>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	Hayes Wang <hayeswang@realtek.com>
Subject: [PATCH net-next v2 7/7] r8169: don't enable rx when shutdown
Date: Wed, 6 Jul 2011 15:58:08 +0800	[thread overview]
Message-ID: <1309939088-31994-7-git-send-email-hayeswang@realtek.com> (raw)
In-Reply-To: <1309939088-31994-1-git-send-email-hayeswang@realtek.com>

Only 8111b needs to enable rx when shutdown for supporting WOL.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
---
 drivers/net/r8169.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 8551848..99a2f30 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -5760,8 +5760,11 @@ static void rtl_shutdown(struct pci_dev *pdev)
 	spin_unlock_irq(&tp->lock);
 
 	if (system_state == SYSTEM_POWER_OFF) {
-		/* WoL fails with some 8168 when the receiver is disabled. */
-		if (tp->features & RTL_FEATURE_WOL) {
+		/* WoL fails with 8168b when the receiver is disabled. */
+		if ((tp->mac_version == RTL_GIGA_MAC_VER_11 ||
+		     tp->mac_version == RTL_GIGA_MAC_VER_12 ||
+		     tp->mac_version == RTL_GIGA_MAC_VER_17) &&
+		    (tp->features & RTL_FEATURE_WOL)) {
 			pci_clear_master(pdev);
 
 			RTL_W8(ChipCmd, CmdRxEnb);
-- 
1.7.3.2

  parent reply	other threads:[~2011-07-06  7:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-06  7:58 [PATCH net-next v2 1/7] r8169: adjust some registers Hayes Wang
2011-07-06  7:58 ` [PATCH net-next v2 2/7] r8169: modify the flow of the hw reset Hayes Wang
2011-07-06  7:58 ` [PATCH net-next v2 3/7] r8169: adjust the settings about RxConfig Hayes Wang
2011-07-12 16:12   ` Francois Romieu
2011-07-13 12:16     ` hayeswang
2011-07-06  7:58 ` [PATCH net-next v2 4/7] r8169: add ERI functions Hayes Wang
2011-07-06  7:58 ` [PATCH net-next v2 5/7] r8169: support RTL8111E-VL Hayes Wang
2011-07-06  7:58 ` [PATCH net-next v2 6/7] r8169: fix wake on lan setting for non-8111E Hayes Wang
2011-07-06  7:58 ` Hayes Wang [this message]
2011-07-07  8:50 ` [PATCH net-next v2 1/7] r8169: adjust some registers Francois Romieu

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=1309939088-31994-7-git-send-email-hayeswang@realtek.com \
    --to=hayeswang@realtek.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=romieu@fr.zoreil.com \
    /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).