]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
r8169: don't enable rx when shutdown.
authorHayes Wang <hayeswang@realtek.com>
Wed, 6 Jul 2011 07:58:08 +0000 (15:58 +0800)
committerJoe Jin <joe.jin@oracle.com>
Fri, 18 May 2012 02:02:41 +0000 (10:02 +0800)
Only 8111b needs to enable rx when shutdowning with WoL.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
(cherry picked from commit aaa89c08d9ffa3739c93d65d98b73ec2aa2e93a5)

Signed-off-by: Joe Jin <joe.jin@oracle.com>
drivers/net/r8169.c

index 5431b5df6502635c3a384a41499ede49642dd182..fb9dd0fd1792ff59f075298584309b693b20bf89 100644 (file)
@@ -5612,8 +5612,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);