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
Subject: Re: [PATCH net-next v5 6/9] r8152: add rtl8157_unload and rtl8157_change_mtu
Date: Mon, 05 Oct 2026 09:57:22 +0000 [thread overview]
Message-ID: <179119424285.434549.10300913467934880637@kernel.org> (raw)
In-Reply-To: <20261001091144.28191-7-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 for "r8152: add rtl8157_unload and
rtl8157_change_mtu" has two Fixes: tags (fd3c7d080df5 for RTL8157,…
--
r8152: add rtl8157_unload and rtl8157_change_mtu
This adds unload and change_mtu callbacks that only RTL8157 and RTL8159
use. rtl8157_unload() calls r8157_power_cut_en() and always disables
interrupt mitigation. rtl8157_change_mtu() sets MTPS from the configured
MTU instead of using the fixed MTPS_JUMBO.
> RTL8157 and RTL8159 used rtl8153_unload() and rtl8156_change_mtu(),
> which program power-cut and MTPS the way earlier chips require. Per
> the datasheet, RTL8157/RTL8159 need r8157_power_cut_en() (already
> used by r8157_init()/r8159_init()) instead of r8153_power_cut_en(),
> and an MTPS scaled from the configured MTU (10K-16K, max_pkt_size /
> 64 capped at 0xff) instead of a fixed MTPS_JUMBO.
[ ... ]
> Fixes: fd3c7d080df5 ("r8152: Add support for the RTL8157 hardware")
> Fixes: ad2a55b63b41 ("r8152: Add support for the RTL8159 chip")
[Severity: Low]
With two Fixes: tags, this will probably go to net and stable. The
message doesn't say what goes wrong on RTL8157/RTL8159 without the
patch, though. Could it state the user-visible symptom being fixed?
The patch changes several things.
In rtl8157_unload(), r8157_power_cut_en(tp, false) replaces
r8153_power_cut_en(tp, false). After this, unload no longer clears
PHASE2_EN in USB_POWER_CUT, and it now clears BIT(1) of USB_MISC_2:
drivers/net/usb/r8152.c:r8157_power_cut_en() {
...
} else {
ocp_word_clr_bits(tp, MCU_TYPE_USB, USB_POWER_CUT, PWR_EN);
ocp_word_clr_bits(tp, MCU_TYPE_USB, USB_MISC_0, PCUT_STATUS);
ocp_byte_clr_bits(tp, MCU_TYPE_USB, USB_MISC_2, BIT(1));
}
}
drivers/net/usb/r8152.c:r8153_power_cut_en() {
...
else
ocp_word_clr_bits(tp, MCU_TYPE_USB, USB_POWER_CUT,
PWR_EN | PHASE2_EN);
...
}
In rtl8157_change_mtu(), MTPS is no longer the fixed MTPS_JUMBO, which
is 12 * 1024 / 64 = 0xc0:
- At the default MTU of 1500, mtu_to_size() gives 1522, so MTPS drops
from 0xc0 (12K) to 0xa0 (10K).
- Above about 12K, MTPS grows with the MTU.
- At max_mtu = size_to_mtu(16 * 1024), the value would be 0x100, so it
is capped to 0xff.
max_mtu allows frames up to 16K. Did the fixed 12K MTPS make jumbo
frames between 12K and 16K fail? If so, could the message say that?
The subject also reads like a refactor rather than a fix. Could the
unload power-cut change and the MTPS change be sent as two separate
patches, each describing the failure it fixes?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261001091144.28191-1-nic_swsd%40realtek.com
next prev parent reply other threads:[~2026-10-05 9:57 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-01 9:11 [PATCH net-next v5 0/9] r8152: refactor and extend RTL8157/8159 support Chih Kai Hsu
2026-10-01 9:11 ` [PATCH net-next v5 1/9] r8152: split r8156_init per chip and add missing init writes Chih Kai Hsu
2026-10-05 9:57 ` netdev-bot+sashiko
2026-10-06 9:18 ` Chih Kai Hsu
2026-10-01 9:11 ` [PATCH net-next v5 2/9] r8152: split RTL_VER_17 into QFN68 and QFN100 package variants Chih Kai Hsu
2026-10-05 9:57 ` netdev-bot+sashiko
2026-10-06 9:23 ` Chih Kai Hsu
2026-10-01 9:11 ` [PATCH net-next v5 3/9] r8152: split rtl8156_enable/up/down into per-chip-family functions Chih Kai Hsu
2026-10-01 9:11 ` [PATCH net-next v5 4/9] r8152: fix up and down register settings for RTL8156/8156B/8157/8159 Chih Kai Hsu
2026-10-01 9:11 ` [PATCH net-next v5 5/9] r8152: split r8157_hw_phy_cfg into RTL8157 and RTL8159 variants Chih Kai Hsu
2026-10-05 9:57 ` netdev-bot+sashiko
2026-10-06 9:24 ` Chih Kai Hsu
2026-10-01 9:11 ` [PATCH net-next v5 6/9] r8152: add rtl8157_unload and rtl8157_change_mtu Chih Kai Hsu
2026-10-05 9:57 ` netdev-bot+sashiko [this message]
2026-10-01 9:11 ` [PATCH net-next v5 7/9] r8152: add TGPHY register access for RTL8157 and RTL8159 Chih Kai Hsu
2026-10-05 9:57 ` netdev-bot+sashiko
2026-10-06 9:41 ` Chih Kai Hsu
2026-10-01 9:11 ` [PATCH net-next v5 8/9] r8152: extract rtl_fc_pause_pkt_en() and apply it to RTL8156/8157/8159 Chih Kai Hsu
2026-10-05 9:57 ` netdev-bot+sashiko
2026-10-01 9:11 ` [PATCH net-next v5 9/9] r8152: enable UPS for RTL8157 and RTL8159 QFN68 Chih Kai Hsu
2026-10-05 9:57 ` netdev-bot+sashiko
2026-10-06 9:43 ` Chih Kai Hsu
2026-10-01 9:13 ` [PATCH net-next v5 0/9] 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=179119424285.434549.10300913467934880637@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=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®