[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180827184425.GA22547@lunn.ch>
Date: Mon, 27 Aug 2018 20:44:25 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Baruch Siach <baruch@...s.co.il>
Cc: Maxime Chevallier <maxime.chevallier@...tlin.com>,
Antoine Tenart <antoine.tenart@...tlin.com>,
netdev@...r.kernel.org, Russell King <linux@...linux.org.uk>,
Ori Shem-Tov <ori.shemtov@...id-run.com>,
Jason Cooper <jason@...edaemon.net>,
Gregory Clement <gregory.clement@...tlin.com>,
Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>
Subject: Re: [PATCH] net: mvpp2: initialize port of_node pointer
On Mon, Aug 27, 2018 at 09:17:21PM +0300, Baruch Siach wrote:
> Hi Andrew,
>
> Thanks for reviewing.
>
> On Mon, Aug 27, 2018 at 03:47:23PM +0200, Andrew Lunn wrote:
> > On Mon, Aug 27, 2018 at 03:12:53PM +0300, Baruch Siach wrote:
> > > Without a valid of_node in struct device we can't find the mvpp2 port
> > > device by its DT node. Specifically, this breaks
> > > of_find_net_device_by_node().
> >
> > We need to be a little bit careful here. I've seen this done wrongly
> > before, breaking DSA support. Is you intention to use DSA? Can you
> > quote a section of DT, and indicate which node is port_node.
>
> Yes. This is for the Armada 8K based Clearfog GT-8K. The board has a Marvell
> 88E6141 switch connected to the &cp1_eth2 port.
>
> Here are the relevant DT nodes:
>
> &cp1_mdio {
> ...
>
> switch0: switch0@4 {
> compatible = "marvell,mv88e6085";
> ...
>
> ports {
> ...
>
> port@5 {
> reg = <5>;
> label = "cpu";
> ethernet = <&cp1_eth2>;
> };
> };
>
> Without this patch, dsa_register_switch() returns -EPROBE_DEFER because
> of_find_net_device_by_node() can't find the device_node of the &cp1_eth2
> device.
O.K. This all looks correct.
Reviewed-by: Andrew Lunn <andrew@...n.ch>
Andrew
Powered by blists - more mailing lists