Message ID | 1394712342-15778-341-Taiwan-albertk@realtek.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | r8152: serial fixes | expand |
Hello: This series was applied to netdev/net.git (refs/heads/master): On Fri, 19 Feb 2021 17:04:39 +0800 you wrote: > These patches are used to adjust the code. > > Hayes Wang (4): > r8152: enable U1/U2 for USB_SPEED_SUPER > r8152: check if the pointer of the function exists > r8152: replace netif_err with dev_err > r8152: spilt rtl_set_eee_plus and r8153b_green_en > > [...] Here is the summary with links: - [net-next,1/4] r8152: enable U1/U2 for USB_SPEED_SUPER https://git.kernel.org/netdev/net/c/7a0ae61acde2 - [net-next,2/4] r8152: check if the pointer of the function exists https://git.kernel.org/netdev/net/c/c79515e47935 - [net-next,3/4] r8152: replace netif_err with dev_err https://git.kernel.org/netdev/net/c/156c32076112 - [net-next,4/4] r8152: spilt rtl_set_eee_plus and r8153b_green_en https://git.kernel.org/netdev/net/c/40fa7568ac23 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 64efd58279b3..e29e1a13e811 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c @@ -6738,6 +6738,11 @@ static int rtl8152_probe(struct usb_interface *intf, intf->needs_remote_wakeup = 1; + if (!rtl_can_wakeup(tp)) + __rtl_set_wol(tp, 0); + else + tp->saved_wolopts = __rtl_get_wol(tp); + tp->rtl_ops.init(tp); #if IS_BUILTIN(CONFIG_USB_RTL8152) /* Retry in case request_firmware() is not ready yet. */ @@ -6755,10 +6760,6 @@ static int rtl8152_probe(struct usb_interface *intf, goto out1; } - if (!rtl_can_wakeup(tp)) - __rtl_set_wol(tp, 0); - - tp->saved_wolopts = __rtl_get_wol(tp); if (tp->saved_wolopts) device_set_wakeup_enable(&udev->dev, true); else
Initailization would reset runtime suspend by tp->saved_wolopts, so the tp->saved_wolopts should be set before initializing. Signed-off-by: Hayes Wang <hayeswang@realtek.com> --- drivers/net/usb/r8152.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)