[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191121001855.GC18325@lunn.ch>
Date: Thu, 21 Nov 2019 01:18:55 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Horatiu Vultur <horatiu.vultur@...rochip.com>
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
> 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?
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. Shame
you cannot use devm_phy_optional_get().
Andrew
Powered by blists - more mailing lists