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=1796107569; b=c3VS+lwPiQCqMZXrhIHbKZgXiUufkTgthe5etNefME32/bTlBy7Xv86dwST7Cd1ehu6T NrhpZh1daMdx9pFT8raXPD7hBYJeC5EyxhHR4e7/Amx29KuCOJNXR0x2ybgbe0BUumpdE E3J9q4SODiAnB/dTET3kpHmGJAxaVu6UetN+fJDAJVoHH//F0Ug8HZQ/+phjB7yaVRPm5 5JVKpx6JD7ifDw/0SlIGpYA9KbfAiZBthP6jHWo0eygK8f4zuJijwV2lvX6wsNnygfFXj VtJnwQrBVxJRUobbKs2ubmLqgL+Wclrc/X75n7txM2JH61lEyXEQcs+evI8SsoGFF8Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796107569; 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=gqIEafF3ahem4e5D/4YwnUIRhD0srHFUqqQBZ4oqn0I=; b=pRq3FH7J6MeUxPr27L2GFAubd6bo38aTP+jCzf31UCgG+/NrEW7JPPq5vkOQSEvsLKjI F8jCLLTJes6Cj6N4WzjJ6TXWuOqJxUUXqqaT29xv7+Ufu8vmKL8LMBvie/L8sME7FvKDC 59pXALCBpO+C6/NMZoafLv3+K06XkibWPkh4l8I6m8/j8Lsjt9V1en2weOzKGJ1odt6eP G8VhUUmTBDFYhrtIVSM6hDB10JXdG3+Ikym5WPVUkjjP+KcaR5wzFqWxtmWDHb53a2G/n TUW/YIKgbcFwtHeDXfSfanICQZAYbWA25BFGeAXBg3EPaX5AbRmOQ1TciTTsyOhW+8g== 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="GrZWZW/g"; 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 B4623606A325; Tue, 1 Dec 2026 06:46:09 +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=GrZWZW/g Received: by smtp.kernel.org (Postfix) with ESMTPSA id C1DC21F0089F; Tue, 1 Dec 2026 06:46:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796107569; bh=gqIEafF3ahem4e5D/4YwnUIRhD0srHFUqqQBZ4oqn0I=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=GrZWZW/gpag3fNQpXr0Jhj9MkxSpybDqLCaqzBxPQeGnwaRYQzLliZc0UWLrdPsuR GyM627zKOpIYt4KgsegeIHtR6NkHjjfdnRmIAhCMj5Lit87y0v2PP07OoNJvUs6QWz /Kq4aQ0IS49KJ02NH4saoJwVVxOWyBlmRMf09e0KWGqdNUaE+3AgBLm/U3PJZOFRXF ceVE4L13vTXUYUMXpWonRXoxbtiRkpwMIYaWOQl6ExXMjjGw1YQbR+kgCjOlLb6PV/ eLEqZS5w9T/QxDXKtuVWlI68GQCM8OaBf6HleCkitlhii/5G/nTjqFAkU373NWsx5U 8XSj8v78/WHQg== Subject: Re: [PATCH net-next v10 10/12] r8152: split r8157_hw_phy_cfg into RTL8157 and RTL8159 variants 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:08 +0000 Message-ID: <179610756830.3146.6173554703500982932@kernel.org> In-Reply-To: <20261130063123.2408-11-nic_swsd@realtek.com> References: <20261130063123.2408-11-nic_swsd@realtek.com> X-sashiko-severity: Low Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Mailing-List: linux-kernel@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] r8159_hw_phy_cfg() (drivers/net/usb/r8152.c, RTL_VER_17_QFN68/QFN100 case) adds two PHY register writes that have… -- r8152: split r8157_hw_phy_cfg into RTL8157 and RTL8159 variants This commit splits r8157_hw_phy_cfg() into r8157_hw_phy_cfg() for RTL_VER_16 and a new r8159_hw_phy_cfg() for RTL_VER_17_QFN68/QFN100. Each function gets its own copy of the shared prologue and epilogue. It also changes the EEE handling for RTL8159, adds new RTL8159 PHY tuning parameters, and adds sram2_set_bits()/sram2_clr_bits() helpers. > diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c > index a16e7d0257f2a..392b7015f4925 100644 > --- a/drivers/net/usb/r8152.c > +++ b/drivers/net/usb/r8152.c [ ... ] > @@ -8372,22 +8459,35 @@ static void r8157_hw_phy_cfg(struct r8152 *tp) > sram_write_w0w1(tp, 0x81ae, 0xff00, 0x0f00); > sram_write_w0w1(tp, 0x81b9, 0xff00, 0xb900); > /* normal link TX filter */ > - sram2_write_w0w1(tp, 0x83b0, 0x0e00, 0); > - sram2_write_w0w1(tp, 0x83c5, 0x0e00, 0); > - sram2_write_w0w1(tp, 0x83da, 0x0e00, 0); > - sram2_write_w0w1(tp, 0x83ef, 0x0e00, 0); > + sram2_clr_bits(tp, 0x83b0, 0x0e00); > + sram2_clr_bits(tp, 0x83c5, 0x0e00); > + sram2_clr_bits(tp, 0x83da, 0x0e00); > + sram2_clr_bits(tp, 0x83ef, 0x0e00); > + > + ocp_reg_w0w1(tp, 0xbf38, 0x01f0, 0x0160); > + ocp_reg_w0w1(tp, 0xbf3a, 0x001f, 0x0014); [Severity: Low] What are these two writes to 0xbf38 and 0xbf3a in r8159_hw_phy_cfg() for? They have no comment, and the driver doesn't touch either register before this patch, so this isn't code moved from somewhere else. The commit message lists the new RTL8159 parameters as: Newly added PHY tuning parameters for RTL8159: - shorten CLKS latency - CMP_Timer on MP_Timer=333 - spdchg_pga1_lpf_cap - ENET PLL jitter improvement Neither write fits any item on that list. Because they follow the "normal link TX filter" sram2 block with no comment of their own, it is hard to tell which feature they belong to. Could a comment be added here, and could the commit message mention them? > + /* shorten CLKS latency */ > + ocp_reg_clr_bits(tp, 0xbf28, BIT(14) | BIT(13)); > + ocp_reg_clr_bits(tp, 0xbf2c, BIT(15) | BIT(14)); > + /* CMP_Timer on MP_Timer=333 > + * GPHY OCP 0xbf28 bit[0] = 0x1 > + * GPHY OCP 0xbf28 bit[6:1] = 0x3 > + * GPHY OCP 0xbf28 bit[12:7] = 0x3 > + */ > + ocp_reg_w0w1(tp, 0xbf28, 0x1fff, 0x0187); > + ocp_reg_w0w1(tp, 0xbf2a, 0x3f, 0x03); [Severity: Low] A related question about the 0xbf2a write: the "CMP_Timer on MP_Timer=333" comment above it only describes the bitfields of 0xbf28. Is the 0xbf2a write part of the CMP_Timer setting, or something else? If it is part of it, could the comment also describe 0xbf2a bit[5:0]? [ ... ] -- Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261130063123.2408-1-nic_swsd%40realtek.com