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: <20201130153459.GD2073444@lunn.ch>
Date:   Mon, 30 Nov 2020 16:34:59 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Steen Hegelund <steen.hegelund@...rochip.com>
Cc:     "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Masahiro Yamada <masahiroy@...nel.org>,
        Lars Povlsen <lars.povlsen@...rochip.com>,
        Bjarni Jonasson <bjarni.jonasson@...rochip.com>,
        Microchip Linux Driver Support <UNGLinuxDriver@...rochip.com>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Microsemi List <microsemi@...ts.bootlin.com>,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 2/3] net: sparx5: Add Sparx5 switchdev driver

> Hmm.  I will have to revisit this again.  The intent was to be able to
> destinguish between regular PHYs and SFPs (as read from the DT).
> But maybe the phylink_of_phy_connect function handles this
> automatically...

Yes, you should not have to differentiate between an SFP and a
traditional copper PHY. phylink will handle it all.

> > 
> > > +void sparx5_destroy_netdev(struct sparx5 *sparx5, struct sparx5_port *port)
> > > +{
> > > +     if (port->phylink) {
> > > +             /* Disconnect the phy */
> > > +             if (rtnl_trylock()) {
> > 
> > Why do you use rtnl_trylock()?
> 
> The sparx5_port_stop() in turn calls phylink_stop() that expects the lock
> to be taken.  Should I rather just call rtnl_lock()?

Yes, you don't want to not call phylink_stop().

     Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ