aboutsummarylogtreecommitdiffstats
path: root/r8152-fix-spurious-wakeups-from-s0i3.patch
diff options
context:
space:
mode:
authorScott B2021-10-28 16:35:02 -0700
committerScott B2021-10-29 20:42:17 -0700
commitf55194e906ed6856546ca9503aa80c083d4cac51 (patch)
tree235955e9f89ae4db84a97d1008418e2a379173dc /r8152-fix-spurious-wakeups-from-s0i3.patch
parent931af5f3a38718d66c59c92800378ba782c141ab (diff)
downloadaur-f55194e906ed6856546ca9503aa80c083d4cac51.tar.gz
patch: resolve r8152 spurious s0i3 wake
Diffstat (limited to 'r8152-fix-spurious-wakeups-from-s0i3.patch')
-rw-r--r--r8152-fix-spurious-wakeups-from-s0i3.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/r8152-fix-spurious-wakeups-from-s0i3.patch b/r8152-fix-spurious-wakeups-from-s0i3.patch
new file mode 100644
index 000000000000..ee04c9d62237
--- /dev/null
+++ b/r8152-fix-spurious-wakeups-from-s0i3.patch
@@ -0,0 +1,36 @@
+From 34dd4f5dfe9291045cb4a847704debb9b89b4afa Mon Sep 17 00:00:00 2001
+From: Mario Limonciello <mario.limonciello@amd.com>
+Date: Thu, 28 Oct 2021 11:54:01 -0500
+Subject: [PATCH] r8152: fix spurious wakeups from s0i3
+
+When an r8152 supported network controller enters runtime suspend
+it's configured that phy activity will wake up. This makes sense
+for system runtime, but if programmed across s0i3 such an interrupt
+leads to waking the system.
+
+To prevent this from happening rewrite wakeup registers to those
+that were saved which if the user didn't intentionally program
+phy wakeup will solve the spurious events.
+
+Reported-by: Matthias Hensler <cubbi@cubbi.de>
+Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
+---
+ drivers/net/usb/r8152.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
+index 79832374f78d..34f09dd730ad 100644
+--- a/drivers/net/usb/r8152.c
++++ b/drivers/net/usb/r8152.c
+@@ -8425,6 +8425,8 @@ static int rtl8152_system_suspend(struct r8152 *tp)
+ napi_enable(napi);
+ tasklet_enable(&tp->tx_tl);
+ }
++ if (!pm_suspend_via_firmware() && tp->rtl_ops.autosuspend_en)
++ tp->rtl_ops.autosuspend_en(tp, false);
+
+ return 0;
+ }
+--
+2.25.1
+