]> git.baikalelectronics.ru Git - uboot.git/commit
net: use a more deterministic approach to get the active ethernet device
authorMichael Walle <michael@walle.cc>
Wed, 24 Feb 2021 16:30:44 +0000 (17:30 +0100)
committerRamon Fried <rfried.dev@gmail.com>
Fri, 18 Jun 2021 08:29:17 +0000 (11:29 +0300)
commitd6ecfe50d0bfbe196791d4a9e23aa25e0abe53f7
tree9afb8167e9fcfab2daefe9ae048cdf0c70fba3b4
parent6e3ed0fce9f583f2aa1630e06a2d89e9a99c595d
net: use a more deterministic approach to get the active ethernet device

If the environment variable "ethact" is not set, the first device in the
uclass is returned. This depends on the probing order of the ethernet
devices. Moreover it is not not configurable at all.

Try to return the ethernet device with sequence id 0 first which then
can be configured by the aliases in a device tree. Fall back to the old
mechanism in case of an error.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
net/eth-uclass.c