Article View: linux.kernel.netdev
Article #25006Re: [PATCH net-next v10 02/12] r8152: add rtl8157_unload() for RTL8157 and RTL8159
From: netdev-bot+sashiko
Date: Tue, 01 Dec 2026 06:46
Date: Tue, 01 Dec 2026 06:46
77 lines
10723 bytes
10723 bytes
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() for RTL8157
and RTL8159" carries two Fixes: tags but never says what users seeโฆ
--
r8152: add rtl8157_unload() for RTL8157 and RTL8159
This commit adds rtl8157_unload() for RTL8157 and RTL8159. On unload it
now disables power cut with r8157_power_cut_en() instead of
r8153_power_cut_en(). It also moves the Interrupt Mitigation disable out
of rtl8153_unload() and runs it unconditionally in 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.
[ ... ]
> Fixes: fd3c7d080df5 ("r8152: Add support for the RTL8157 hardware")
> Fixes: ad2a55b63b41 ("r8152: Add support for the RTL8159 chip")
[Severity: Low]
What do users actually see when these chips go through
r8153_power_cut_en(tp, false) at unload? Could the commit message say?
The patch has two Fixes: tags, but the only reason given is "Per the
datasheet". That makes it hard for stable backporters to tell which
symptom is being fixed, for example misbehaviour after unbind/rebind or
re-plug.
The message also doesn't mention that the register writes at unload
change. The old path cleared PHASE2_EN:
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);
ocp_word_clr_bits(tp, MCU_TYPE_USB, USB_MISC_0, PCUT_STATUS);
}
The new path only clears PWR_EN in USB_POWER_CUT. It also now clears
USB_MISC_2 BIT(1):
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));
}
}
At this commit, nothing in the driver seems to set PHASE2_EN on these
chips. Neither r8156_ups_en(true) nor r8157_power_cut_en(true) is called,
and r8156_init() already clears USB_MISC_2 BIT(1). So the change only has
an effect if hardware or firmware left those bits set.
Later in the series, the RTL8157/RTL8159 runtime enable path calls
r8157_ups_en(tp, true). That sets UPS_EN | USP_PREWAKE | PHASE2_EN on
RTL_VER_16 and RTL_VER_17_QFN68, and r8157_ups_en(false) doesn't clear
PHASE2_EN. With this patch applied, PHASE2_EN would then stay set across
unload.
Is it intended that PHASE2_EN stays set at unload? Could the commit
message mention this, along with the user-visible symptom being fixed?
--
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261130063123.2408-1-nic_swsd%40realtek.com
Technical Details
Message-ID:
<179610756101.3146.14445906831250724309@kernel.org>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374748-linux-kernel-netdev=dewy.ruReferences:
<20261130063123.2408-3-nic_swsd@realtek.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374748-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v10 02/12] r8152: add rtl8157_unload() for RTL8157 and RTL8159 Date: Tue, 01 Dec 2026 06:46:01 +0000 Organization: Usenet Network Message-ID: <179610756101.3146.14445906831250724309@kernel.org> References: <20261130063123.2408-3-nic_swsd@realtek.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="1638970"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:OXxCBMWXd9y0chJ36B47zox1MFo= sha256:ExcE+YxosoV8IR2DteY3O2mtz7BG3bACUeNt+7IXfP8= sha1:weB9DYSdeq2xixSn2dkRz5j/iM0= sha256:7mzx/BuMBADZJBLdn8V7/ZU772dG4BIDJp3L+1aQ4mk= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 250AE11726D; Tue, 1 Dec 2026 09:46:23 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.4 X-Spam-Status: No, score=-3.4 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hcKR8GQMNi5q; Tue, 1 Dec 2026 09:46:19 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-374748-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 3AE2B11726B; Tue, 1 Dec 2026 09:46:09 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id BF2E428C1A; Tue, 1 Dec 2026 06:46:04 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796107563; b=OQ8HCZ926tTI7EtO7iI6B6G2cs2GDf2X2G2bIurA7AeIIXsMfBc99yi7x1tWDUClFh/S fO+6rX1Ix7n594DWQaHpM4yAysggGzBbV4GdNOVi1q5u/tq9O0RXGo2PcqsHML3ASroNa nudQ/d4yY1Xd895L7gEF8fNadRv7BLyA/aB9zYLcUxew7hm0cBHEsAdDQHbsm/28VxibQ He8rrmBeZ9IowSdTlTBS9LjfJkAPZPvdawCaKNVlhHO9AhJ3IqYcr3Iv64LQE1hMxloKA gtZMONGYd4vHng6SH8/NeK5fQoF/tJNPcZxvFoWKKoGQwYYd4G3XQntDdvLrUlSFnRg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796107563; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=3pVFTBf0901OUNspJqQXFzzUGUX5HETYs0yqupFv4LM=; b=WQbs4nN96yxWSKmYuJX2+nMNcN4M0VoEHusn83X8apQ2fb/XI4DBRY/2jHu0jIh/jlo4 JOMRcOP83yfyC4b9CCtVGuJx01Q9zQUdxftMyQzTavlMqVEMX0WTJJp4583CVgbh8qQ7X lQASS8rWOlosNa+btWUnWABnFyrA9iCDdth/qMP+A0M4pQDBY8lg3s/oVhZKNf9O3cLcD AsOh8OQv4Pq0pf0se8jRZWOycGUdjJoCMtzNTqx7UbYvRo4ygmwDseYLQC8jssxkPsG9N foBr/pYGuFV3CUn0ckZ2z984CRvnqw94Mib1uKatmxEjotVPmk6WG5xwB8M8wlDgSgQ== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=lHkqVFCT; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 65E16606A682; Tue, 1 Dec 2026 06:46:03 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=lHkqVFCT X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796107562; b=L/SbQvHn6bv70viEk1arqzWLq8PkyMiTvERq8ghLklQbUO7/ukrf3q/w8yN0U76NzFfO OB03ndPiO941gU/O0OitEHOTuwGrisBabt7IQLZ9SnKgAdmhhBHIrJeyj8eJLg1Ewad06 sEED1s8ccQM51W0JhfvAwilagR/tLdKscvVrsuWla6kbHv5aKY9qECvkGiNHCCzw09kNB byQfrAdIWmQuK2g/NhndWFKd/qaeNwR46JH/cmPJ3MWj8UwNOBBbburWII5rbXYfChCyx rHz+n6gcj0bYWp9sPoXSD2uotAhcu7Xnk1613rR/W35YSPUBatY7aIVWIwkA4bhJk9Q== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796107562; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=3pVFTBf0901OUNspJqQXFzzUGUX5HETYs0yqupFv4LM=; b=YdbgbIuFXQmybvSVZJ6o/jYJFWbSAKjGzpwokTHY5nRiU7Byg5PzMFeS3YyIWKx9Og64 W0HbxVo32W4CjtDXTAHrSR6OI7bQrgltAzkqKjnf1SR/LO26RS64VVS7OZwp3ShKMb+iz tA1Ha7+Ij3UtuOtWEKq2gco9+aimIPQd1ssdH3/YPjwpJ4LBXO5+5p85m0g94jZa7KI2R abOAsLR+mA2ak7WWcaUPRpjH9g+XeXHSnDTVvnZY+GwpmZ91lvGhUI06prKVBPULP6927 1WGZa7PLwWt5TTlE9hWSURqNmphn3YcobTgtOVLkYXjSbWGX1PAbC9r4VYjAgnwKNng== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=lHkqVFCT; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 867D0606A336; Tue, 1 Dec 2026 06:46:02 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 76A951F00893; Tue, 1 Dec 2026 06:46:01 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796107562; bh=3pVFTBf0901OUNspJqQXFzzUGUX5HETYs0yqupFv4LM=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=lHkqVFCTkehkA7/JaqccwQMWqMqGt++FjavO61g/3TZ1lUZv1XORZXoQW9BOa8cTl WXAIHrQ5eohNEk7Rzz4eLNIjpD+uzwY7bZtBV3644pTIFd7Wb1g99jyIapGFv7Uegy 3u6az3qfLrN8rpVBiEkLiZwkxwsvOecIqZ++uGpbhIUzjVlcHO6O3s2L69ggqnfupz IqmVH5hg61QqRR2Yzfi1v755DDydslhHGxoh8V5r3tKhBEQBrwUvn2waAmE853SQGy N0uF+vYvBT2M8rVok4zy6WS6EF/Bh+W7nSpJ+Vpn5dEWpxr9Ad7EIKxbOGrwq59w1E BizXQUifQ28Eg== X-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 X-In-Reply-To: <20261130063123.2408-3-nic_swsd@realtek.com> X-sashiko-severity: Low X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list