Re: [PATCH net-next v9 02/12] r8152: add rtl8157_unload() for RTL8157 and RTL8159

From: netdev-bot+sashiko

Date: Thu Nov 26 2026 - 23:27:07 EST


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] Commit "r8152: add rtl8157_unload() for RTL8157 and RTL8159" has
two Fixes: tags (fd3c7d080df5, ad2a55b63b41), but its only…

--

r8152: add rtl8157_unload() for RTL8157 and RTL8159

This patch gives RTL8157 and RTL8159 their own rtl8157_unload()
callback. The callback uses r8157_power_cut_en() instead of
r8153_power_cut_en(). The 0xcf04 Interrupt Mitigation clear moves from
rtl8153_unload() into the new function.

> RTL8157 and RTL8159 used rtl8153_unload(), which disables power cut
> with r8153_power_cut_en(). Per the datasheet they need
> r8157_power_cut_en(), which r8156_init() already calls for them.

[Severity: Low]

This patch carries two Fixes: tags. The only reason given is "Per the
datasheet they need r8157_power_cut_en()". Could the commit message say
what goes wrong for users when RTL8157 and RTL8159 use the old
rtl8153_unload()?

The unload callback runs from rtl8152_disconnect() on unbind or module
removal. It also runs from the out1 error path in rtl8152_probe_once().

Where does the problem show up? For example, is it on re-bind, with a
fallback class driver, or in the device's power state after unbind?

The commit message also leaves out the register changes. The old path
cleared both bits in USB_POWER_CUT:

r8153_power_cut_en(tp, false)
ocp_word_clr_bits(tp, MCU_TYPE_USB, USB_POWER_CUT,
PWR_EN | PHASE2_EN);
ocp_word_clr_bits(tp, MCU_TYPE_USB, USB_MISC_0, PCUT_STATUS);

The new path leaves PHASE2_EN unchanged. It also clears USB_MISC_2
BIT(1), which the old path never touched:

r8157_power_cut_en(tp, false)
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));

Could the commit message describe these register differences and the
user-visible impact? Documentation/process/submitting-patches.rst asks
for both in fixes.

--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261126033211.51850-1-nic_swsd%40realtek.com