* [PATCH v2] r8152: Add wake up function for RTL8153
@ 2025-05-16 1:35 Wentao Liang
2025-05-21 1:05 ` Jakub Kicinski
2025-05-21 8:39 ` Hayes Wang
0 siblings, 2 replies; 3+ messages in thread
From: Wentao Liang @ 2025-05-16 1:35 UTC (permalink / raw)
To: andrew+netdev, davem, edumazet, kuba, pabeni, ste3ls
Cc: hayeswang, dianders, gmazyland, linux-usb, netdev, linux-kernel,
Wentao Liang, stable
In rtl8153_runtime_enable(), the runtime enable/disable logic for RTL8153
devices was incomplete, missing r8153_queue_wake() to enable or disable
the automatic wake-up function. A proper implementation can be found in
rtl8156_runtime_enable().
Add r8153_queue_wake(tp, true) if enable flag is set true, and add
r8153_queue_wake(tp, false) otherwise.
Fixes: 02552754a7ac ("r8152: adjust rtl8153_runtime_enable function")
Cc: stable@vger.kernel.org # v4.13
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
---
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 468c73974046..cb708b79a7af 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -4004,10 +4004,12 @@ static void rtl_runtime_suspend_enable(struct r8152 *tp, bool enable)
static void rtl8153_runtime_enable(struct r8152 *tp, bool enable)
{
if (enable) {
+ r8153_queue_wake(tp, true);
r8153_u1u2en(tp, false);
r8153_u2p3en(tp, false);
rtl_runtime_suspend_enable(tp, true);
} else {
+ r8153_queue_wake(tp, false);
rtl_runtime_suspend_enable(tp, false);
switch (tp->version) {
--
2.42.0.windows.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] r8152: Add wake up function for RTL8153
2025-05-16 1:35 [PATCH v2] r8152: Add wake up function for RTL8153 Wentao Liang
@ 2025-05-21 1:05 ` Jakub Kicinski
2025-05-21 8:39 ` Hayes Wang
1 sibling, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2025-05-21 1:05 UTC (permalink / raw)
To: Wentao Liang
Cc: andrew+netdev, davem, edumazet, pabeni, ste3ls, hayeswang,
dianders, gmazyland, linux-usb, netdev, linux-kernel, stable
On Fri, 16 May 2025 09:35:52 +0800 Wentao Liang wrote:
> In rtl8153_runtime_enable(), the runtime enable/disable logic for RTL8153
> devices was incomplete, missing r8153_queue_wake() to enable or disable
> the automatic wake-up function. A proper implementation can be found in
> rtl8156_runtime_enable().
>
> Add r8153_queue_wake(tp, true) if enable flag is set true, and add
> r8153_queue_wake(tp, false) otherwise.
Please explain how the problem was discovered and on what HW (if any)
the patch was tested.
--
pw-bot: cr
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH v2] r8152: Add wake up function for RTL8153
2025-05-16 1:35 [PATCH v2] r8152: Add wake up function for RTL8153 Wentao Liang
2025-05-21 1:05 ` Jakub Kicinski
@ 2025-05-21 8:39 ` Hayes Wang
1 sibling, 0 replies; 3+ messages in thread
From: Hayes Wang @ 2025-05-21 8:39 UTC (permalink / raw)
To: Wentao Liang, andrew+netdev@lunn.ch, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
ste3ls@gmail.com
Cc: dianders@chromium.org, gmazyland@gmail.com,
linux-usb@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Wentao Liang <vulab@iscas.ac.cn>
> Sent: Friday, May 16, 2025 9:36 AM
[...]
> In rtl8153_runtime_enable(), the runtime enable/disable logic for RTL8153
> devices was incomplete, missing r8153_queue_wake() to enable or disable
> the automatic wake-up function. A proper implementation can be found in
> rtl8156_runtime_enable().
r8153_queue_wake() is used to prevent the loss of wake-up events about linking
change during the process of runtime suspend. And, I don't think RTL8153A
supports it. Does this fix something?
Best Regards,
Hayes
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-05-21 8:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-16 1:35 [PATCH v2] r8152: Add wake up function for RTL8153 Wentao Liang
2025-05-21 1:05 ` Jakub Kicinski
2025-05-21 8:39 ` Hayes Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).