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: <20150227165100.GY11056@atomide.com>
Date:	Fri, 27 Feb 2015 08:51:01 -0800
From:	Tony Lindgren <tony@...mide.com>
To:	Murali Karicheri <m-karicheri2@...com>
Cc:	davem@...emloft.net, mugunthanvnm@...com, george.cherian@...com,
	prabhakar.csengg@...il.com, varkabhadram@...il.com,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	grygorii.strashko@...com, lokeshvutla@...com, mpa@...gutronix.de,
	w-kwok2@...com
Subject: Re: [PATCH net-next 1/2] net: davinci_mdio: don't request io address
 range

* Murali Karicheri <m-karicheri2@...com> [150224 13:32]:
> From: Grygorii Strashko <grygorii.strashko@...com>
> 
> Historically Davinci MDIO driver was  created with assumption that
> MDIO is standalone device, but for Keystone 2 it's a part
> of NETCP module and now NETCP driver requests IO range which
> includes MDIO IO range too. This causes Keystone 2 networking stack
> failure during the boot.
> 
> "netcp-1.0 2620110.netcp: Probe of module(netcp-gbe) failed with -16"
> 
> Hence, don't request io address range from Davinci MDIO driver and
> just remap it.

Best to fix this up properly so you don't have overlapping resources.
You probably want to have the whole hardware driver block defined
in the dts file as a single entry, and then have the modules within
that hardware block use the dt ranges property. This allows you to
do standard Linux drivers without any extra hacks.

Sounds like this following untested imaginary example should do
the trick:

mac: ethernet@...dbeef {
	compatible = "ti,cpsw", "simple-bus";
	reg = <0xdeadbeef 0x1000>;
	ranges = <0 0xdeadbeef 0x2000>;
	...

	davinci_mdio: mdio@...0 {
		reg = <0x1000 0x100>;
		...
	};
};

That allows you to get rid of all the existing code for dealing
with the chilren with for_each_child_of_node(node, slave_node)
in cpsw_probe_dt() as that all happens automatically for you and
does not cause problems with modules being moved around.

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ