diff mbox series

[net-next] r8152: replace dev_info with dev_dbg for loading firmware

Message ID 20240424084532.159649-1-hayeswang@realtek.com (mailing list archive)
State Accepted
Commit 092d214138fd5fbda2347bb3753223c4404790db
Delegated to: Netdev Maintainers
Headers show
Series [net-next] r8152: replace dev_info with dev_dbg for loading firmware | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 926 this patch: 926
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers warning 4 maintainers not CCed: grundler@chromium.org pabeni@redhat.com dianders@chromium.org edumazet@google.com
netdev/build_clang success Errors and warnings before: 937 this patch: 937
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 937 this patch: 937
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-04-24--15-00 (tests: 995)

Commit Message

Hayes Wang April 24, 2024, 8:45 a.m. UTC
Someone complains the message appears continuously. This occurs
because the device is woken from UPS mode, and the driver re-loads
the firmware.

When the device enters runtime suspend and cable is unplugged, the
device would enter UPS mode. If the runtime resume occurs, and the
device is woken from UPS mode, the driver has to re-load the firmware
and causes the message. If someone wakes the device continuously, the
message would be shown continuously, too. Use dev_dbg to avoid it.

Note that, the function could be called before register_netdev(), so I
don't use netif_info() or netif_dbg().

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

Comments

Hariprasad Kelam April 24, 2024, 9:04 a.m. UTC | #1
> Someone complains the message appears continuously. This occurs because
> the device is woken from UPS mode, and the driver re-loads the firmware.
> 
> When the device enters runtime suspend and cable is unplugged, the device
> would enter UPS mode. If the runtime resume occurs, and the device is
> woken from UPS mode, the driver has to re-load the firmware and causes the
> message. If someone wakes the device continuously, the message would be
> shown continuously, too. Use dev_dbg to avoid it.
> 
> Note that, the function could be called before register_netdev(), so I don't use
> netif_info() or netif_dbg().
> 
> Signed-off-by: Hayes Wang <hayeswang@realtek.com>
> ---
>  drivers/net/usb/r8152.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index
> 5d6aeb086fc7..51e9f5b2dccf 100644
> --- a/drivers/net/usb/r8152.c
> +++ b/drivers/net/usb/r8152.c
> @@ -5274,7 +5274,7 @@ static void rtl8152_apply_firmware(struct r8152 *tp,
> bool power_cut)
> 
>  	rtl_reset_ocp_base(tp);
>  	strscpy(rtl_fw->version, fw_hdr->version, RTL_VER_SIZE);
> -	dev_info(&tp->intf->dev, "load %s successfully\n", rtl_fw->version);
> +	dev_dbg(&tp->intf->dev, "load %s successfully\n", rtl_fw->version);
Since enabling dev_dbg involves re-compiling kernel if CONFIG_DYNAMIC_DEBUG not enabled,
 Does it make sense to use  "dev_info_ratelimited" here.

Thanks,
Hariprasad k
>  }
> 
>  static void rtl8152_release_firmware(struct r8152 *tp)
> --
> 2.44.0
>
patchwork-bot+netdevbpf@kernel.org April 26, 2024, 2:10 a.m. UTC | #2
Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Wed, 24 Apr 2024 16:45:32 +0800 you wrote:
> Someone complains the message appears continuously. This occurs
> because the device is woken from UPS mode, and the driver re-loads
> the firmware.
> 
> When the device enters runtime suspend and cable is unplugged, the
> device would enter UPS mode. If the runtime resume occurs, and the
> device is woken from UPS mode, the driver has to re-load the firmware
> and causes the message. If someone wakes the device continuously, the
> message would be shown continuously, too. Use dev_dbg to avoid it.
> 
> [...]

Here is the summary with links:
  - [net-next] r8152: replace dev_info with dev_dbg for loading firmware
    https://git.kernel.org/netdev/net-next/c/092d214138fd

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 5d6aeb086fc7..51e9f5b2dccf 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -5274,7 +5274,7 @@  static void rtl8152_apply_firmware(struct r8152 *tp, bool power_cut)
 
 	rtl_reset_ocp_base(tp);
 	strscpy(rtl_fw->version, fw_hdr->version, RTL_VER_SIZE);
-	dev_info(&tp->intf->dev, "load %s successfully\n", rtl_fw->version);
+	dev_dbg(&tp->intf->dev, "load %s successfully\n", rtl_fw->version);
 }
 
 static void rtl8152_release_firmware(struct r8152 *tp)