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 v9 01/12] r8152: fix RTL8156/RTL8156B/RTL8157/RTL8159 up and down settings
Date: Fri, 27 Nov 2026 04:26:59 +0000 [thread overview]
Message-ID: <179575361990.3135.4466986058036107796@kernel.org> (raw)
In-Reply-To: <20261126033211.51850-2-nic_swsd@realtek.com>
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] The commit message of "r8152: fix
RTL8156/RTL8156B/RTL8157/RTL8159 up and down settings" carries three…
- [Low] Six independent register fixes, attributed to three different
original commits, are squashed into one patch.
--
r8152: fix RTL8156/RTL8156B/RTL8157/RTL8159 up and down settings
This commit adjusts rtl8156_up() and rtl8156_down() so that several
datasheet-required register settings are applied to the right
RTL8156-family chip versions. It changes the version gates for PLA_RCR1,
USB_SPEED_OPTION and PLA_MCU_SPDWN_EN and adds Clear_SDR writes. It also
sets ALDPS_PROXY_MODE and DIS_MCU_CLROOB on OOB entry and uses different
OOB RMS/MTPS values for RTL8157/RTL8159.
> Several settings the datasheet requires for these chips were either
> missing or gated on the wrong version range in the shared
> rtl8156_up()/rtl8156_down():
[ ... ]
> Fixes: 195aae321c82 ("r8152: support new chips")
> Fixes: fd3c7d080df5 ("r8152: Add support for the RTL8157 hardware")
> Fixes: ad2a55b63b41 ("r8152: Add support for the RTL8159 chip")
[Severity: Low]
Could the commit message say what goes wrong on real hardware without
these settings?
Each item is justified only as something the datasheet requires. None of
them names a symptom someone would see, such as WoL/OOB wake failures,
RX stalls after resume, wrong OOB frame size limits, or link loss after
ifdown/ifup. The message also doesn't say whether any of the changes
fixes a reported problem.
Some of the changes affect every RTL8156-family chip:
- ALDPS_PROXY_MODE in PLA_BDC_CR, set in rtl8156_down().
- DIS_MCU_CLROOB in PLA_OOB_CTRL, set in rtl8156_down().
- The PLA_RCR1 BIT(3) clear in rtl8156_up(), which now also runs on
RTL8156/RTL8156B.
195aae321c82 dates back to 2021, so these Fixes: tags will pull the patch
into several stable trees. Backporters need to know which bug this fixes.
> diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
> index 4815235e8e730..d00cc911ae135 100644
> --- a/drivers/net/usb/r8152.c
> +++ b/drivers/net/usb/r8152.c
> @@ -6820,8 +6820,7 @@ static void rtl8156_up(struct r8152 *tp)
>
> ocp_byte_clr_bits(tp, MCU_TYPE_PLA, PLA_OOB_CTRL, NOW_IS_OOB);
>
> - if (tp->version >= RTL_VER_16)
> - ocp_word_clr_bits(tp, MCU_TYPE_PLA, PLA_RCR1, BIT(3));
> + ocp_word_clr_bits(tp, MCU_TYPE_PLA, PLA_RCR1, BIT(3));
>
> ocp_word_clr_bits(tp, MCU_TYPE_PLA, PLA_SFF_STS_7, MCU_BORW_EN);
>
[ ... ]
> @@ -6860,6 +6860,23 @@ static void rtl8156_up(struct r8152 *tp)
> if (tp->version < RTL_VER_16)
> r8153_u2p3en(tp, true);
>
> + switch (tp->version) {
> + case RTL_VER_13:
> + case RTL_VER_15:
> + /* Enable Clear_SDR */
> + ocp_word_set_bits(tp, MCU_TYPE_USB, 0xd3ca, BIT(15));
> + break;
> + case RTL_VER_16:
> + case RTL_VER_17:
> + /* Enable Clear_SDR */
> + ocp_byte_set_bits(tp, MCU_TYPE_USB, 0xd378, BIT(7));
> + /* Clear SDR bit */
> + ocp_word_clr_bits(tp, MCU_TYPE_USB, 0xcd06, BIT(15));
> + break;
> + default:
> + break;
> + }
> +
[Severity: Low]
This isn't a bug, but could this be split into separate patches, one per
Fixes: target?
These parts only affect RTL8156/RTL8156B and fix 195aae321c82:
- The PLA_RCR1 BIT(3) clear.
- The 0xd3ca Clear_SDR write for RTL_VER_13/RTL_VER_15.
- ALDPS_PROXY_MODE and DIS_MCU_CLROOB on OOB entry in rtl8156_down().
The rest, including the PLA_RMS/PLA_MTPS switch in rtl8156_down(), only
matters for code added by fd3c7d080df5 and ad2a55b63b41.
The RCR1 hunk above removes the "if (tp->version >= RTL_VER_16)" gate,
which came from ad2a55b63b41. This switch in rtl8156_up() also puts the
RTL_VER_13/15 and RTL_VER_16/17 cases side by side. As a result, the
patch won't apply to stable trees that have 195aae321c82 but not the
RTL8157/RTL8159 support.
Separate patches would also let a bisect show which of the six register
changes is at fault if one of them causes a regression.
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261126033211.51850-1-nic_swsd%40realtek.com
next prev parent reply other threads:[~2026-11-27 4:27 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 3:31 [PATCH net-next v9 00/12] r8152: refactor and extend RTL8157/8159 support Chih Kai Hsu
2026-11-26 3:32 ` [PATCH net-next v9 01/12] r8152: fix RTL8156/RTL8156B/RTL8157/RTL8159 up and down settings Chih Kai Hsu
2026-11-27 4:26 ` netdev-bot+sashiko [this message]
2026-11-26 3:32 ` [PATCH net-next v9 02/12] r8152: add rtl8157_unload() for RTL8157 and RTL8159 Chih Kai Hsu
2026-11-27 4:27 ` netdev-bot+sashiko
2026-11-26 3:32 ` [PATCH net-next v9 03/12] r8152: add rtl8157_change_mtu() " Chih Kai Hsu
2026-11-26 3:32 ` [PATCH net-next v9 04/12] r8152: fix flow control for RTL8156/RTL8156B/RTL8157/RTL8159 Chih Kai Hsu
2026-11-26 3:32 ` [PATCH net-next v9 05/12] r8152: split r8156_init by generation and factor out wait_autoload_done Chih Kai Hsu
2026-11-26 3:32 ` [PATCH net-next v9 06/12] r8152: add new init writes for RTL8156/8156B/8157/8159 Chih Kai Hsu
2026-11-26 3:32 ` [PATCH net-next v9 07/12] r8152: accept PLA and USB firmware blocks for RTL8157 and RTL8159 Chih Kai Hsu
2026-11-26 3:32 ` [PATCH net-next v9 08/12] r8152: split RTL_VER_17 into QFN68 and QFN100 package variants Chih Kai Hsu
2026-11-27 4:27 ` netdev-bot+sashiko
2026-11-27 8:36 ` Chih Kai Hsu
2026-11-26 3:32 ` [PATCH net-next v9 09/12] r8152: split rtl8156_enable/up/down into per-generation functions Chih Kai Hsu
2026-11-26 3:32 ` [PATCH net-next v9 10/12] r8152: split r8157_hw_phy_cfg into RTL8157 and RTL8159 variants Chih Kai Hsu
2026-11-27 4:27 ` netdev-bot+sashiko
2026-11-26 3:32 ` [PATCH net-next v9 11/12] r8152: add TGPHY register access for RTL8157 and RTL8159 Chih Kai Hsu
2026-11-27 4:27 ` netdev-bot+sashiko
2026-11-27 8:38 ` Chih Kai Hsu
2026-11-26 3:32 ` [PATCH net-next v9 12/12] r8152: enable UPS for RTL8157 and RTL8159 QFN68 Chih Kai Hsu
2026-11-27 4:27 ` netdev-bot+sashiko
2026-11-27 8:47 ` Chih Kai Hsu
2026-11-26 3:38 ` [PATCH net-next v9 00/12] 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=179575361990.3135.4466986058036107796@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®