diff mbox series

[net-next] r8169: remove rtl_wol_shutdown_quirk()

Message ID 2391ada0-eac5-ac43-f061-a7a44b0e7f33@gmail.com (mailing list archive)
State Accepted
Commit c9ae520ac3faf2f272b5705b085b3778c7997ec8
Delegated to: Netdev Maintainers
Headers show
Series [net-next] r8169: remove rtl_wol_shutdown_quirk() | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 7 of 7 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 31 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Heiner Kallweit Sept. 6, 2022, 6:24 p.m. UTC
Since f658b90977d2 ("r8169: fix DMA being used after buffer free if WoL is
enabled") it has been redundant to disable PCI bus mastering in
rtl_wol_shutdown_quirk(). And since 120068481405 ("r8169: fix failing WoL")
CmdRxEnb is still enabled when we get here. So we can remove the function.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/net/ethernet/realtek/r8169_main.c | 19 -------------------
 1 file changed, 19 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org Sept. 13, 2022, 8:40 a.m. UTC | #1
Hello:

This patch was applied to netdev/net-next.git (master)
by Paolo Abeni <pabeni@redhat.com>:

On Tue, 6 Sep 2022 20:24:57 +0200 you wrote:
> Since f658b90977d2 ("r8169: fix DMA being used after buffer free if WoL is
> enabled") it has been redundant to disable PCI bus mastering in
> rtl_wol_shutdown_quirk(). And since 120068481405 ("r8169: fix failing WoL")
> CmdRxEnb is still enabled when we get here. So we can remove the function.
> 
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
> 
> [...]

Here is the summary with links:
  - [net-next] r8169: remove rtl_wol_shutdown_quirk()
    https://git.kernel.org/netdev/net-next/c/c9ae520ac3fa

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index 3763855e4..306c65228 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -4842,22 +4842,6 @@  static const struct dev_pm_ops rtl8169_pm_ops = {
 		       rtl8169_runtime_idle)
 };
 
-static void rtl_wol_shutdown_quirk(struct rtl8169_private *tp)
-{
-	/* WoL fails with 8168b when the receiver is disabled. */
-	switch (tp->mac_version) {
-	case RTL_GIGA_MAC_VER_11:
-	case RTL_GIGA_MAC_VER_17:
-		pci_clear_master(tp->pci_dev);
-
-		RTL_W8(tp, ChipCmd, CmdRxEnb);
-		rtl_pci_commit(tp);
-		break;
-	default:
-		break;
-	}
-}
-
 static void rtl_shutdown(struct pci_dev *pdev)
 {
 	struct rtl8169_private *tp = pci_get_drvdata(pdev);
@@ -4871,9 +4855,6 @@  static void rtl_shutdown(struct pci_dev *pdev)
 
 	if (system_state == SYSTEM_POWER_OFF &&
 	    tp->dash_type == RTL_DASH_NONE) {
-		if (tp->saved_wolopts)
-			rtl_wol_shutdown_quirk(tp);
-
 		pci_wake_from_d3(pdev, tp->saved_wolopts);
 		pci_set_power_state(pdev, PCI_D3hot);
 	}