lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180827181721.usbb2vvaenzxclkq@sapphire.tkos.co.il>
Date:   Mon, 27 Aug 2018 21:17:21 +0300
From:   Baruch Siach <baruch@...s.co.il>
To:     Andrew Lunn <andrew@...n.ch>
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

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.

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch@...s.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ