[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191122193015.zooiv6px4e6uf2my@soft-dev3.microsemi.net>
Date: Fri, 22 Nov 2019 20:30:16 +0100
From: Horatiu Vultur <horatiu.vultur@...rochip.com>
To: Andrew Lunn <andrew@...n.ch>
CC: Vladimir Oltean <olteanv@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Russell King - ARM Linux admin <linux@...linux.org.uk>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Florian Fainelli <f.fainelli@...il.com>,
Vivien Didelot <vivien.didelot@...il.com>,
Joergen Andreasen <joergen.andreasen@...rochip.com>,
"Allan W. Nielsen" <allan.nielsen@...rochip.com>,
Claudiu Manoil <claudiu.manoil@....com>,
Alexandru Marginean <alexandru.marginean@....com>,
Xiaoliang Yang <xiaoliang.yang_1@....com>,
"Y.b. Lu" <yangbo.lu@....com>, netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next 0/2] Convert Ocelot and Felix switches to PHYLINK
The 11/21/2019 01:18, Andrew Lunn wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> > Not really, at that point it was OK to have interface
> > PHY_INTERFACE_MODE_NA. There were few more checks before creating the
> > network device. Now with your changes you were creating
> > a network device for each port of the soc even if some ports
> > were not used on a board.
>
> That does not sound right. If the port is not used, the DSA core will
> call port_disable() to allow the driver to power off the port. It will
> not create a network device for it.
>
> Or is this just an issue with the switchdev driver, not the DSA
> driver?
In my case I just use the switchdev driver. I don't have the DSA driver.
>
> Andrew
> > > > serdes = devm_of_phy_get(ocelot->dev, portnp, NULL);
> > > > - if (IS_ERR(serdes)) {
> > > > - err = PTR_ERR(serdes);
> > > > - if (err == -EPROBE_DEFER)
> > > > - dev_dbg(ocelot->dev, "deferring probe\n");
> > >
> > > Why did you remove the probe deferral for the serdes phy?
> > Because not all the ports have the "phys" property.
>
> You probably need to differentiate between ENODEV and EPROBE_DEFER.
> You definitely do need to return EPROBE_DEFER if you get that.
Thanks, I will keep it in mind.
> Shame you cannot use devm_phy_optional_get().
>
> Andrew
--
/Horatiu
Powered by blists - more mailing lists