From: netdev-bot+sashiko@kernel.org
To: hsu.chih.kai@realtek.com
Cc: davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org,
nic_swsd@realtek.com, linux-kernel@vger.kernel.org,
linux-usb@vger.kernel.org, edumazet@google.com, bjorn@mork.no,
pabeni@redhat.com, andrew+netdev@lunn.ch, mail@birger-koblitz.de
Subject: Re: [PATCH net-next v6 02/10] r8152: add new init writes for RTL8156B/8157/8159
Date: Mon, 12 Oct 2026 09:06:08 +0000 [thread overview]
Message-ID: <179179596844.434549.4859424794231631979@kernel.org> (raw)
In-Reply-To: <20261008081556.47901-3-nic_swsd@realtek.com>
Thank you for your contribution! Sashiko AI review found 2 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 1
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] The patch defines PLA_RMT_WAKE (0xe0c8) with RMT_WAKE_EN =
BIT(0) and clears that bit on every init.
- [Low] The subject says 'add new init writes for RTL8156B/8157/8159',
but the patch also changes r8156_init().
--
r8152: add new init writes for RTL8156B/8157/8159
This patch brings the per-chip init functions closer to the vendor init
sequence. It clears PREBOOT_OPTION and RMT_WAKE_EN in all four init
functions and adds a u2phy backup for RTL8156B. On RTL8157/8159 it also
disables auto speedup and interrupt mitigation, clears reset event flags
and clears RX_END_TRANSFER_EN.
> r8152: add new init writes for RTL8156B/8157/8159
[Severity: Low]
Should the subject also name RTL8156? The patch changes r8156_init() too.
rtl_ops_init() uses that function for RTL_VER_10/11, which is the original
RTL8156, not the RTL8156B path:
case RTL_VER_10:
ops->init = r8156_init;
The body says "all four init functions", but the subject lists only
RTL8156B/8157/8159. Anyone searching history or picking backports by
subject could miss that RTL8156 (non-B) devices are affected.
> diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
> index 30543c5799232..f62bfa659a985 100644
> --- a/drivers/net/usb/r8152.c
> +++ b/drivers/net/usb/r8152.c
[ ... ]
> @@ -8344,6 +8350,10 @@ static void r8156_init(struct r8152 *tp)
> r8153_queue_wake(tp, false);
> rtl_runtime_suspend_enable(tp, false);
>
> + ocp_byte_clr_bits(tp, MCU_TYPE_PLA, PLA_INDICATE_FALG, PREBOOT_OPTION);
> +
> + ocp_byte_clr_bits(tp, MCU_TYPE_PLA, PLA_RMT_WAKE, RMT_WAKE_EN);
> +
[Severity: Medium]
Can clearing RMT_WAKE_EN here stop wake-on-LAN or runtime PM remote wakeup
from working?
The same clear is added to r8156_init(), r8156b_init(), r8157_init() and
r8159_init(). The only uses of PLA_RMT_WAKE and RMT_WAKE_EN in the driver
are the define and these four clears. Nothing sets the bit again.
tp->rtl_ops.init() runs from both rtl8152_probe_once() and
rtl8152_reset_resume(), so the bit is cleared on every probe and every
reset-resume. Neither wake setup path writes 0xe0c8:
__rtl_set_wol() only programs PLA_CONFIG34, PLA_CONFIG5 and PLA_CFG_WOL,
then calls device_set_wakeup_enable().
rtl_runtime_suspend_enable() and r8153_queue_wake() handle runtime
suspend, and probe sets intf->needs_remote_wakeup = 1.
UPCOMING_RUNTIME_D3 behaves differently. Init clears it, and
rtl_runtime_suspend_enable(tp, true) sets it again. RMT_WAKE_EN is only
ever cleared.
Suppose the bit is the MAC-side remote wake enable that its name
suggests. Then after probe or reset_resume, RTL8156/8156B/8157/8159
devices would still report WoL as armed but could not wake the host.
Runtime autosuspend wake on link change could fail as well.
It may instead be a flag left over from pre-boot firmware, like the
PREBOOT_OPTION bit cleared next to it. In that case clearing it would be
harmless. Neither the code nor the commit message says which. The message
only says "Clear PREBOOT_OPTION and RMT_WAKE_EN in all four init
functions".
Could the commit message explain what PREBOOT_OPTION and RMT_WAKE_EN
control and why clearing them unconditionally is safe for WoL and runtime
PM? It already does this for RX_END_TRANSFER_EN.
> if (tp->udev->speed >= USB_SPEED_SUPER)
> r8153b_u1u2en(tp, true);
>
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261008081556.47901-1-nic_swsd%40realtek.com
next prev parent reply other threads:[~2026-10-12 9:06 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-08 8:15 [PATCH net-next v6 0/10] r8152: refactor and extend RTL8157/8159 support Chih Kai Hsu
2026-10-08 8:15 ` [PATCH net-next v6 01/10] r8152: split r8156_init per chip and factor out wait_autoload_done Chih Kai Hsu
2026-10-08 12:17 ` Birger Koblitz
2026-10-12 7:16 ` Chih Kai Hsu
2026-10-12 9:24 ` Chih Kai Hsu
2026-10-12 10:01 ` Birger Koblitz
2026-10-12 9:06 ` netdev-bot+sashiko
2026-10-08 8:15 ` [PATCH net-next v6 02/10] r8152: add new init writes for RTL8156B/8157/8159 Chih Kai Hsu
2026-10-12 9:06 ` netdev-bot+sashiko [this message]
2026-10-08 8:15 ` [PATCH net-next v6 03/10] r8152: split RTL_VER_17 into QFN68 and QFN100 package variants Chih Kai Hsu
2026-10-12 9:06 ` netdev-bot+sashiko
2026-10-08 8:15 ` [PATCH net-next v6 04/10] r8152: split rtl8156_enable/up/down into per-chip-family functions Chih Kai Hsu
2026-10-08 8:15 ` [PATCH net-next v6 05/10] r8152: fix up and down register settings for RTL8156/8156B/8157/8159 Chih Kai Hsu
2026-10-08 8:15 ` [PATCH net-next v6 06/10] r8152: split r8157_hw_phy_cfg into RTL8157 and RTL8159 variants Chih Kai Hsu
2026-10-08 8:15 ` [PATCH net-next v6 07/10] r8152: add rtl8157_unload and rtl8157_change_mtu Chih Kai Hsu
2026-10-12 9:06 ` netdev-bot+sashiko
2026-10-08 8:15 ` [PATCH net-next v6 08/10] r8152: add TGPHY register access for RTL8157 and RTL8159 Chih Kai Hsu
2026-10-12 9:06 ` netdev-bot+sashiko
2026-10-08 8:15 ` [PATCH net-next v6 09/10] r8152: extract rtl_fc_pause_pkt_en() and apply it to RTL8156/8157/8159 Chih Kai Hsu
2026-10-12 9:06 ` netdev-bot+sashiko
2026-10-08 8:15 ` [PATCH net-next v6 10/10] r8152: enable UPS for RTL8157 and RTL8159 QFN68 Chih Kai Hsu
2026-10-12 9:06 ` netdev-bot+sashiko
2026-10-08 8:19 ` [PATCH net-next v6 0/10] r8152: refactor and extend RTL8157/8159 support netdev-bot+sinfo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179179596844.434549.4859424794231631979@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=bjorn@mork.no \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hsu.chih.kai@realtek.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mail@birger-koblitz.de \
--cc=netdev@vger.kernel.org \
--cc=nic_swsd@realtek.com \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®