Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aaa89c08 authored by Hayes Wang's avatar Hayes Wang Committed by Francois Romieu
Browse files

r8169: don't enable rx when shutdown.



Only 8111b needs to enable rx when shutdowning with WoL.

Signed-off-by: default avatarHayes Wang <hayeswang@realtek.com>
Acked-by: default avatarFrancois Romieu <romieu@fr.zoreil.com>
parent d4ed95d7
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -5729,8 +5729,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);