From: Andrew Lunn <andrew@lunn.ch>
To: Baruch Siach <baruch@tkos.co.il>
Cc: Maxime Chevallier <maxime.chevallier@bootlin.com>,
Antoine Tenart <antoine.tenart@bootlin.com>,
netdev@vger.kernel.org, Russell King <linux@armlinux.org.uk>,
Ori Shem-Tov <ori.shemtov@solid-run.com>,
Jason Cooper <jason@lakedaemon.net>,
Gregory Clement <gregory.clement@bootlin.com>,
Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Subject: Re: [PATCH] net: mvpp2: initialize port of_node pointer
Date: Mon, 27 Aug 2018 20:44:25 +0200 [thread overview]
Message-ID: <20180827184425.GA22547@lunn.ch> (raw)
In-Reply-To: <20180827181721.usbb2vvaenzxclkq@sapphire.tkos.co.il>
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@lunn.ch>
Andrew
prev parent reply other threads:[~2018-08-27 22:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-27 12:12 [PATCH] net: mvpp2: initialize port of_node pointer Baruch Siach
2018-08-27 13:47 ` Andrew Lunn
2018-08-27 18:17 ` Baruch Siach
2018-08-27 18:44 ` Andrew Lunn [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180827184425.GA22547@lunn.ch \
--to=andrew@lunn.ch \
--cc=antoine.tenart@bootlin.com \
--cc=baruch@tkos.co.il \
--cc=gregory.clement@bootlin.com \
--cc=jason@lakedaemon.net \
--cc=linux@armlinux.org.uk \
--cc=maxime.chevallier@bootlin.com \
--cc=netdev@vger.kernel.org \
--cc=ori.shemtov@solid-run.com \
--cc=sebastian.hesselbarth@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).