From: Marc Ballarin <ballarin.marc@gmx.de>
To: Francois Romieu <romieu@fr.zoreil.com>
Cc: hayeswang@realtek.com, netdev@vger.kernel.org
Subject: [PATCH] r8169: Fix WOL in power down case
Date: Sun, 9 Oct 2011 10:49:07 +0200 [thread overview]
Message-ID: <20111009104907.0c6cd439900ca5eb7789295f@gmx.de> (raw)
In-Reply-To: <20111007232834.GA29770@electric-eye.fr.zoreil.com>
Commit 92fc43b4159b518f5baae57301f26d770b0834c9 ("r8169: modify the flow of the
hw reset.") breaks WOL on some versions of the hardware.
Commit 106633897e086e1b47126996aac1a427eb80eb1b ("r8169: fix WOL setting for
8105 and 8111evl") tries to fix this, but only does so in the standby case.
This patch applies an analogous fix to the shutdown path.
Signed-off-by: Marc Ballarin <ballarin.marc@gmx.de>
---
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index c236670..a2d6e3a 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -5817,6 +5817,15 @@ static void rtl_shutdown(struct pci_dev *pdev)
/* PCI commit */
RTL_R8(ChipCmd);
}
+ /* rtl8105, rtl8111E, and rtl8111evl need the following bits
+ * set for WOL to work */
+ if ((tp->mac_version == RTL_GIGA_MAC_VER_32 ||
+ tp->mac_version == RTL_GIGA_MAC_VER_33 ||
+ tp->mac_version == RTL_GIGA_MAC_VER_34) &&
+ (__rtl8169_get_wol(tp) & WAKE_ANY)) {
+ RTL_W32(RxConfig, RTL_R32(RxConfig) | AcceptBroadcast |
+ AcceptMulticast | AcceptMyPhys);
+ }
pci_wake_from_d3(pdev, true);
pci_set_power_state(pdev, PCI_D3hot);
next prev parent reply other threads:[~2011-10-09 8:49 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-07 20:19 Regression: non-working WOL with r8169 Marc Ballarin
2011-10-07 21:00 ` Francois Romieu
2011-10-07 21:33 ` Marc Ballarin
2011-10-07 21:42 ` Francois Romieu
2011-10-07 22:31 ` Marc Ballarin
2011-10-07 23:28 ` Francois Romieu
2011-10-09 8:49 ` Marc Ballarin [this message]
2011-10-09 11:54 ` [PATCH] r8169: Fix WOL in power down case Francois Romieu
2011-10-09 17:13 ` Marc Ballarin
2011-11-01 17:28 ` Stefan Becker
2011-11-02 23:08 ` Francois Romieu
2011-11-03 17:27 ` Stefan Becker
[not found] ` <CAOJ2eMcFbt9zkA9-uq20OUs1r3Ee6jo=jbEJ7RP87OCxu5XJjA@mail.gmail.com>
2011-11-03 18:12 ` 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=20111009104907.0c6cd439900ca5eb7789295f@gmx.de \
--to=ballarin.marc@gmx.de \
--cc=hayeswang@realtek.com \
--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