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]
Date:	Sun, 07 Jul 2013 13:36:51 +0200
From:	Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>
To:	Jonas Gorski <jogo@...nwrt.org>
CC:	netdev@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	linux-kernel@...r.kernel.org,
	Florian Fainelli <florian@...nwrt.org>,
	Andrew Lunn <andrew@...n.ch>,
	Jason Cooper <jason@...edaemon.net>
Subject: Re: Second ethernet on kirkwood does not work when probed through
 DT

On 07/07/2013 01:26 PM, Jonas Gorski wrote:
> On Sun, 07 Jul 2013 12:52:52 +0200
> Sebastian Hesselbarth<sebastian.hesselbarth@...il.com>  wrote:
>> The error below is a naming issue for the port. As there is only one
>> port per controller, both reg properties of the port nodes of
>> kirkwood.dtsi have to be<0>  as they determine the register offset
>> within the controller registers. As mentioned before, KW has a
>> dual-controller, single port configuration.
>>
>> So the wrong reg property in kirkwood.dtsi is a bug and I will update
>> the patch.
>>
>> Second, mv643xx_eth as in net-next does a
>> platform_device_alloc(MV643XX_ETH_NAME, ppd.port_number)
>> which will cause two devices named mv643xx_eth_port.0 if you change
>> both of the reg property to<0>.
>>
>> A quick fix would be to change the above to
>> platform_device_alloc(pnp->name, ppd.port_number)
>> so the port devices will be named after the device nodes name.
>>
>> Also, for this I will prepare a patch. But the rename of the port
>> devices could again raise the clock gating/loosing MAC issue.
>
> In my case it's a non-issue as the studid D-Link U-Boot doesn't even
> setup a mac for eth1, so there's nothing to lose ;).
>
>> (I know again, why I hate this shared/port separation of mv643xx_eth)
>>
>> Anyway, can you please try to have both ports reg properties set
>> to<0>, with nodes named ethernet0-port@0 and ethernet1-port@0,
>> and the platform_device_alloc in mv643xx_eth modified?
>
> In addition I added a static counter for the allocated devs (to not
> overwrite the pointers in port_platdev[]).

Ok, but that is not required to make it work, is it? IMHO we should
honor what is passed by reg property, even it will be always zero
for KW and the other Orion SoCs. Otherwise, we would implicitly put
the numbering in the order of port nodes.

> That seems to work, as now eth1 comes up and works (successfully got a
> IP through DHCP).

Ok, great. Will prepare a fix for mv643xx_eth on top of net-next. And
an update of the kirkwood conversion patches.

Sebastian
--
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