mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] r8152: Add wake up function for RTL8153
@ 2025-05-15 15:11 Wentao Liang
  2025-05-15 16:08 ` Andrew Lunn
  2025-05-20 13:46 ` Paolo Abeni
  0 siblings, 2 replies; 3+ messages in thread
From: Wentao Liang @ 2025-05-15 15:11 UTC (permalink / raw)
  To: andrew+netdev, davem, edumazet, kuba, pabeni, ste3ls
  Cc: hayeswang, dianders, gmazyland, linux-usb, netdev, linux-kernel,
	Wentao Liang

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.

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	[flat|nested] 3+ messages in thread

* Re: [PATCH] r8152: Add wake up function for RTL8153
  2025-05-15 15:11 [PATCH] r8152: Add wake up function for RTL8153 Wentao Liang
@ 2025-05-15 16:08 ` Andrew Lunn
  2025-05-20 13:46 ` Paolo Abeni
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2025-05-15 16:08 UTC (permalink / raw)
  To: Wentao Liang
  Cc: andrew+netdev, davem, edumazet, kuba, pabeni, ste3ls, hayeswang,
	dianders, gmazyland, linux-usb, netdev, linux-kernel

On Thu, May 15, 2025 at 11:11:30PM +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.
> 
> Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>

Is this for stable? Should it have a Fixes: tag?

https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html

	Andrew

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] r8152: Add wake up function for RTL8153
  2025-05-15 15:11 [PATCH] r8152: Add wake up function for RTL8153 Wentao Liang
  2025-05-15 16:08 ` Andrew Lunn
@ 2025-05-20 13:46 ` Paolo Abeni
  1 sibling, 0 replies; 3+ messages in thread
From: Paolo Abeni @ 2025-05-20 13:46 UTC (permalink / raw)
  To: Wentao Liang, andrew+netdev, davem, edumazet, kuba, ste3ls
  Cc: hayeswang, dianders, gmazyland, linux-usb, netdev, linux-kernel

On 5/15/25 5:11 PM, 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.

The existing initialization for r8153 is actually different from
rtl8156. Lacking the datasheet, I tend to think that the missing
queue_wake is actually unneeded.

A 3rd party test would be helpful.

Thanks,

Paolo


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-05-20 13:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-15 15:11 [PATCH] r8152: Add wake up function for RTL8153 Wentao Liang
2025-05-15 16:08 ` Andrew Lunn
2025-05-20 13:46 ` Paolo Abeni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®