From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 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== 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== 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 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) 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 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 76A951F00893; Tue, 1 Dec 2026 06:46:01 +0000 (UTC) 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== Subject: Re: [PATCH net-next v10 02/12] r8152: add rtl8157_unload() for RTL8157 and RTL8159 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 Date: Tue, 01 Dec 2026 06:46:01 +0000 Message-ID: <179610756101.3146.14445906831250724309@kernel.org> In-Reply-To: <20261130063123.2408-3-nic_swsd@realtek.com> References: <20261130063123.2408-3-nic_swsd@realtek.com> X-sashiko-severity: Low Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 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