lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3561842.ZfL8zNpBrT@diego>
Date: Thu, 05 Feb 2026 08:44:11 +0100
From: Heiko Stübner <heiko@...ech.de>
To: "Russell King (Oracle)" <linux@...linux.org.uk>
Cc: Andrew Lunn <andrew@...n.ch>,
 Alexandre Torgue <alexandre.torgue@...s.st.com>,
 Andrew Lunn <andrew+netdev@...n.ch>, "David S. Miller" <davem@...emloft.net>,
 Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
 linux-arm-kernel@...ts.infradead.org, linux-rockchip@...ts.infradead.org,
 linux-stm32@...md-mailman.stormreply.com, netdev@...r.kernel.org,
 Paolo Abeni <pabeni@...hat.com>
Subject:
 Re: [PATCH net-next 5/6] net: stmmac: rk: use rk_encode_wm16() for clock
 selection

Hi Russell,

Am Mittwoch, 4. Februar 2026, 23:26:21 Mitteleuropäische Normalzeit schrieb Russell King (Oracle):
> On Wed, Feb 04, 2026 at 11:03:51PM +0100, Heiko Stübner wrote:
> > Am Mittwoch, 4. Februar 2026, 10:14:38 Mitteleuropäische Normalzeit schrieb Russell King (Oracle):
> > > Use rk_encode_wm16() for RMII clock gating control, and also for the
> > > io_clksel bit used to select the transmit clock between CRU-derived
> > > and IO-derived clock sources.
> > > 
> > > Both of these were configured via the "set_clock_selection" method in
> > > the SoC specific operations, but there is no requirement to change the
> > > io_clksel except when enabling clocks.
> > > 
> > > It is also possible that we don't need to ungate the RMII clock if we
> > > are operating in RGMII mode, but this commit makes no change there.
> > > 
> > > Split up the configuration of these as separate functions, and remove
> > > the set_clock_selection() method. Since these clocking bits are in the
> > > same register that we call the "speed" register, move the logic for
> > > writing that register into rk_write_speed_grf_reg().
> > > 
> > > Signed-off-by: Russell King (Oracle) <rmk+kernel@...linux.org.uk>
> > > ---
> > >  .../net/ethernet/stmicro/stmmac/dwmac-rk.c    | 174 ++++++++----------
> > >  1 file changed, 75 insertions(+), 99 deletions(-)
> > > 
> > > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
> > > index 4099cbc5d0de..ed9adac70f0a 100644
> > > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
> > > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
> > > @@ -27,8 +27,17 @@
> > >  struct rk_priv_data;
> > >  
> > >  struct rk_clock_fields {
> > > +	/* io_clksel_cru_mask - io_clksel bit in clock GRF register which,
> > > +	 * when set, selects the tx clock from CRU.
> > > +	 */
> > > +	u16 io_clksel_cru_mask;
> > > +	/* io_clksel_io_mask - io_clksel bit in clock GRF register which,
> > > +	 * when set, selects the tx clock from IO.
> > > +	 */
> > 
> > nit: comment stile does not seem to follow the kernel coding style
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst#n622
> 
> netdev has historically had this style which is separate from the rest
> of the kernel. The file already uses this comment style, so it is
> entirely correct to keep to the style which already exists in this
> file, rather than mixing styles and turning it into a mess.

thanks for the clarification. Then the comment style is obviously fine.

Regards
Heiko


> > Reviewed-by: Heiko Stuebner <heiko@...ech.de>
> > Tested-by: Heiko Stuebner <heiko@...ech.de> #px30,rk3328,rk3568,rk3588
> 
> 





Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ