lkml.org 
[lkml]   [2020]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2020-11-30 16:36    [W:0.073 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site