[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 9 Oct 2011 10:49:07 +0200
From: Marc Ballarin <ballarin.marc@....de>
To: Francois Romieu <romieu@...zoreil.com>
Cc: hayeswang@...ltek.com, netdev@...r.kernel.org
Subject: [PATCH] r8169: Fix WOL in power down case
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@....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);
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists