summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHuy Duong <quochuybk2010@gmail.com>2017-11-21 11:32:15 +0700
committerJoel Stanley <joel@jms.id.au>2018-02-13 15:48:32 +1030
commit7fb88a88d08c19b0e6f88c0a484ab001a4476a27 (patch)
tree7383567eed9d24c90f3ba9cc11e39eb19120c05b
parent82bdfde43e0334138c6888f74533728dc124fef5 (diff)
downloadtalos-obmc-uboot-7fb88a88d08c19b0e6f88c0a484ab001a4476a27.tar.gz
talos-obmc-uboot-7fb88a88d08c19b0e6f88c0a484ab001a4476a27.zip
net: ftgmac100: Reset FTGMAC100 before setting MAC
In ftgmac100_initialize(), FTGMAC100 is reset after MACs are set, hence all MACs set before will be erased. This patch moves ftgmac100_reset() to before ftgmac100_set_mac_from_env(). Signed-off-by: Huy Duong <qhuyduong@hotmail.com> Signed-off-by: Joel Stanley <joel@jms.id.au>
-rw-r--r--drivers/net/ftgmac100.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ftgmac100.c b/drivers/net/ftgmac100.c
index 9d5ba98243..5779057ba8 100644
--- a/drivers/net/ftgmac100.c
+++ b/drivers/net/ftgmac100.c
@@ -791,11 +791,11 @@ int ftgmac100_initialize(bd_t *bd)
miiphy_register(dev->name, ftgmac100_reg_read, ftgmac100_reg_write);
#endif
+ ftgmac100_reset(dev);
+
/* set the ethernet address */
ftgmac100_set_mac_from_env(dev);
- ftgmac100_reset(dev);
-
card_number++;
}
return card_number;
OpenPOWER on IntegriCloud