diff mbox series

[net] r8152: move r8153_mac_clk_spd

Message ID 1394712342-15778-346-Taiwan-albertk@realtek.com (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series [net] r8152: move r8153_mac_clk_spd | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present fail Series targets non-next tree, but doesn't contain any Fixes tags
netdev/patch_count success Link
netdev/tree_selection success Clearly marked for net
netdev/subject_prefix success Link
netdev/cc_maintainers warning 7 maintainers not CCed: lee.jones@linaro.org kuba@kernel.org vicamo.yang@canonical.com davem@davemloft.net hkallweit1@gmail.com treding@nvidia.com gustavoars@kernel.org
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 29 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/header_inline success Link
netdev/stable success Stable not CCed

Commit Message

Hayes Wang Feb. 19, 2021, 9:38 a.m. UTC
Move calling r8153_mac_clk_spd() from r8153_first_init() to rtl8153_up(),
and from r8153_enter_oob() to rtl8153_down().

r8153_mac_clk_spd() is used for RTL8153A. However, RTL8153B use
r8153_first_init() and r8153_enter_oob(), too. Therefore,
r8153_mac_clk_spd() needs to be moved.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
---
 drivers/net/usb/r8152.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Jakub Kicinski Feb. 19, 2021, 6:22 p.m. UTC | #1
On Fri, 19 Feb 2021 17:38:03 +0800 Hayes Wang wrote:
> Move calling r8153_mac_clk_spd() from r8153_first_init() to rtl8153_up(),
> and from r8153_enter_oob() to rtl8153_down().
> 
> r8153_mac_clk_spd() is used for RTL8153A. However, RTL8153B use
> r8153_first_init() and r8153_enter_oob(), too. Therefore,
> r8153_mac_clk_spd() needs to be moved.
> 
> Signed-off-by: Hayes Wang <hayeswang@realtek.com>

Any word on what user-visible misbehavior this causes?

Can you provide a Fixes tag?
Hayes Wang Feb. 22, 2021, 6:19 a.m. UTC | #2
Jakub Kicinski <kuba@kernel.org>
> Sent: Saturday, February 20, 2021 2:23 AM
[...] 
> Any word on what user-visible misbehavior this causes?
I think it influences the power saving for suspending.
I am checking it with our engineers.

> Can you provide a Fixes tag?
Yes. I will add it when I updating this patch.

Best Regards,
Hayes
diff mbox series

Patch

diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 67cd6986634f..ec29878db566 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -4678,7 +4678,6 @@  static void r8153_first_init(struct r8152 *tp)
 {
 	u32 ocp_data;
 
-	r8153_mac_clk_spd(tp, false);
 	rxdy_gated_en(tp, true);
 	r8153_teredo_off(tp);
 
@@ -4729,8 +4728,6 @@  static void r8153_enter_oob(struct r8152 *tp)
 {
 	u32 ocp_data;
 
-	r8153_mac_clk_spd(tp, true);
-
 	ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL);
 	ocp_data &= ~NOW_IS_OOB;
 	ocp_write_byte(tp, MCU_TYPE_PLA, PLA_OOB_CTRL, ocp_data);
@@ -4956,6 +4953,7 @@  static void rtl8153_up(struct r8152 *tp)
 	r8153_u1u2en(tp, false);
 	r8153_u2p3en(tp, false);
 	r8153_aldps_en(tp, false);
+	r8153_mac_clk_spd(tp, false);
 	r8153_first_init(tp);
 
 	ocp_data = ocp_read_byte(tp, MCU_TYPE_PLA, PLA_CONFIG6);
@@ -5003,6 +5001,7 @@  static void rtl8153_down(struct r8152 *tp)
 	r8153_u2p3en(tp, false);
 	r8153_power_cut_en(tp, false);
 	r8153_aldps_en(tp, false);
+	r8153_mac_clk_spd(tp, true);
 	r8153_enter_oob(tp);
 	r8153_aldps_en(tp, true);
 }