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 <and...@lunn.ch>

    Andrew

Reply via email to