[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180116102720.fmory3ppmf5eomk3@earth.universe>
Date: Tue, 16 Jan 2018 11:27:20 +0100
From: Sebastian Reichel <sebastian.reichel@...labora.co.uk>
To: Andrew Lunn <andrew@...n.ch>
Cc: Vivien Didelot <vivien.didelot@...oirfairelinux.com>,
Florian Fainelli <f.fainelli@...il.com>,
Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <kernel@...gutronix.de>,
Fabio Estevam <fabio.estevam@....com>,
Ian Ray <ian.ray@...com>, Nandor Han <nandor.han@...com>,
Rob Herring <robh+dt@...nel.org>,
"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCHv3 1/5] net: dsa: Support internal phy on 'cpu' port
Hi,
On Mon, Jan 15, 2018 at 11:57:18PM +0100, Andrew Lunn wrote:
> > int dsa_port_fixed_link_register_of(struct dsa_port *dp)
> > {
> > struct device_node *dn = dp->dn;
> > @@ -305,6 +354,10 @@ int dsa_port_fixed_link_register_of(struct dsa_port *dp)
> > ds->ops->adjust_link(ds, port, phydev);
> >
> > put_device(&phydev->mdio.dev);
> > + } else {
> > + err = dsa_port_setup_phy_of(dp, true);
> > + if (err)
> > + return err;
>
> Hi Sebastian
>
> First off, i tend to agree with Florian. I'm not sure how reliable
> this is. There is normally a state machine moving the PHY between
> different states. But in order to do that, i think you need a netdev.
> Have you tried multiple down/up of the other MAC/PHY? Does it always
> work?
I tested multiple down/up transitions and everything works as
expected.
> But, at the moment, we don't have much better.
>
> What i don't like is having this code inside
> dsa_port_fixed_link_register_of(). This has nothing to do with a fixed
> link. Please export functions from port.c and call them directly from
> dsa_port_setup() and dsa_port_teardown().
I just sent PATCHv4 implementing this change.
-- Sebastian
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists