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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220520095241.6bbccdf0@fixe.home>
Date:   Fri, 20 May 2022 09:52:41 +0200
From:   Clément Léger <clement.leger@...tlin.com>
To:     "Russell King (Oracle)" <linux@...linux.org.uk>
Cc:     Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        Vladimir Oltean <olteanv@...il.com>,
        "David S . Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzk+dt@...nel.org>,
        Geert Uytterhoeven <geert+renesas@...der.be>,
        Magnus Damm <magnus.damm@...il.com>,
        Heiner Kallweit <hkallweit1@...il.com>,
        Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
        Herve Codina <herve.codina@...tlin.com>,
        Miquèl Raynal <miquel.raynal@...tlin.com>,
        Milan Stevanovic <milan.stevanovic@...com>,
        Jimmy Lalande <jimmy.lalande@...com>,
        Pascal Eberhard <pascal.eberhard@...com>,
        linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
        linux-renesas-soc@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH net-next v5 05/13] net: pcs: add Renesas MII converter
 driver

Le Thu, 19 May 2022 17:25:10 +0100,
"Russell King (Oracle)" <linux@...linux.org.uk> a écrit :

> Hi,
> 
> On Thu, May 19, 2022 at 05:30:59PM +0200, Clément Léger wrote:
> > Add a PCS driver for the MII converter that is present on the Renesas
> > RZ/N1 SoC. This MII converter is reponsible for converting MII to
> > RMII/RGMII or act as a MII pass-trough. Exposing it as a PCS allows to
> > reuse it in both the switch driver and the stmmac driver. Currently,
> > this driver only allows the PCS to be used by the dual Cortex-A7
> > subsystem since the register locking system is not used.
> > 
> > Signed-off-by: Clément Léger <clement.leger@...tlin.com>  
> 
> Looks much better now, thanks. Only one thing I've spotted is:
> 
> > +static int miic_validate(struct phylink_pcs *pcs, unsigned long *supported,
> > +			 const struct phylink_link_state *state)
> > +{
> > +	if (state->interface == PHY_INTERFACE_MODE_RGMII ||
> > +	    state->interface == PHY_INTERFACE_MODE_RGMII_ID ||
> > +	    state->interface == PHY_INTERFACE_MODE_RGMII_TXID ||
> > +	    state->interface == PHY_INTERFACE_MODE_RGMII_RXID ||  
> 
> The above could use:
> 
> 	if (phy_interface_mode_is_rgmii(state->interface) ||

Thanks, I did found the one to set the bit for phylink part but not
this one.

> 
> Also, as a request to unbind this driver would be disasterous to users,
> I think you should set ".suppress_bind_attrs = true" to prevent the
> sysfs bind/unbind facility being available. This doesn't completely
> solve the problem.

Acked. What should I do to make it more robust ? Should I use a
refcount per pdev and check that in the remove() callback to avoid
removing the pdev if used ?

Thanks,

-- 
Clément Léger,
Embedded Linux and Kernel engineer at Bootlin
https://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ