[U-Boot] [RFC PATCH] net: rtl8169: allow multiple devices
Stephen Warren
swarren at wwwdotorg.org
Mon Apr 25 18:43:16 CEST 2016
On 04/20/2016 05:31 PM, Stephen Warren wrote:
> From: Stephen Warren <swarren at nvidia.com>
>
> Currently, if multiple rtl8169 devices exist on the PCI bus, they all
> get the same name, which prevents the user from selecting which to use
> via the ethact environment variable. Port the auto-naming code from the
> e1000 driver to solve this.
>
> Signed-off-by: Stephen Warren <swarren at nvidia.com>
> ---
> Having to put this code into each Ethernet driver seems a bit odd. Surely
> the core should handle this; should eth_get_dev_by_name() parse "#n" out
> of the ethact value and compare it to the device sequence number?
>
> It looks like I should be able to set ethprime to e.g. eth0, eth1, etc.
> and this should work. However, I couldn't get ethprime to behave sensibly,
> and I'm not sure what its semantics are supposed to be. Specifically,
> ethprime seems to only be used if ethact isn't set, yet accessing the
> network (e.g. running "dhcp zImage") seems to set ethact, thus preventing
> any further modification to ethprime from having any effect. Equally,
> simply running e.g. "dhcp zImage" twice in a row doesn't seem to work;
> perhaps the subsequent attempts perform another lookup by name from ethact
> rather than just using the same device pointer from before? Is ethprime
> intended to be functional at present, or is it some legacy feature that's
> bit-rotted and should be removed?
Simon, Joe, any thoughts on those questions re: this patch?
More information about the U-Boot
mailing list