Skip to content
This repository has been archived by the owner on Jul 13, 2022. It is now read-only.

Commit

Permalink
r8169: don't enable rx when shutdown.
Browse files Browse the repository at this point in the history
commit aaa89c0 upstream.

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>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
hayesorz authored and gregkh committed Oct 12, 2012
1 parent 39ee330 commit 5676605
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/net/r8169.c
Expand Up @@ -5391,8 +5391,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);
Expand Down

0 comments on commit 5676605

Please sign in to comment.