summaryrefslogtreecommitdiffstats
path: root/doc/README.enetaddr
diff options
context:
space:
mode:
authorBen Warren <biggerbadderben@gmail.com>2010-04-26 11:11:46 -0700
committerBen Warren <biggerbadderben@gmail.com>2010-05-03 14:52:49 -0700
commitecee9324d73555e744593f3e0d387bec4c566f55 (patch)
treee0ddc06decbe33b90c867d1751272e933f5e01ec /doc/README.enetaddr
parentc960b13ed22d9ea570957379f9f7f2f37d87ef08 (diff)
downloadtalos-obmc-uboot-ecee9324d73555e744593f3e0d387bec4c566f55.tar.gz
talos-obmc-uboot-ecee9324d73555e744593f3e0d387bec4c566f55.zip
Program net device MAC addresses after initializing
Add a new function to the eth_device struct for programming a network controller's hardware address. After all network devices have been initialized and the proper MAC address for each has been determined, make a device driver call to program the address into the device. Only device instances with valid unicast addresses will be programmed. Signed-off-by: Ben Warren <biggerbadderben@gmail.com> Acked-by: Detlev Zundel <dzu@denx.de> Tested-by: Prafulla Wadaskar <prafulla@marvell.com> Tested-by: Heiko Schocher <hs@denx.de> Tested-by: Thomas Chou <thomas@wytron.com.tw>
Diffstat (limited to 'doc/README.enetaddr')
-rw-r--r--doc/README.enetaddr10
1 files changed, 6 insertions, 4 deletions
diff --git a/doc/README.enetaddr b/doc/README.enetaddr
index 94d800a02a..2d8e24f5cb 100644
--- a/doc/README.enetaddr
+++ b/doc/README.enetaddr
@@ -33,11 +33,13 @@ Correct flow of setting up the MAC address (summarized):
1. Read from hardware in initialize() function
2. Read from environment in net/eth.c after initialize()
3. Give priority to the value in the environment if a conflict
-4. Program hardware in the device's init() function.
+4. Program the address into hardware if the following conditions are met:
+ a) The relevant driver has a 'write_addr' function
+ b) The user hasn't set an 'ethmacskip' environment variable
+ c) The address is valid (unicast, not all-zeros)
-If somebody wants to subvert the design philosophy, this can be done
-in the board-specific board_eth_init() function by calling eth_init()
-after all the NICs have been registered.
+Previous behavior had the MAC address always being programmed into hardware
+in the device's init() function.
-------
Usage
OpenPOWER on IntegriCloud