From 37a0944bcecc8efde371368c870a982c972565fd Mon Sep 17 00:00:00 2001 From: Radhey Shyam Pandey Date: Thu, 12 Mar 2015 14:47:31 +0530 Subject: [PATCH] net: gem: Set mac address in init sequence Keep enetaddr and mac hw address in sync. In default config mismatch in received frame dest address and mac hw address results in drop of unicast frames. This patch will be reverted when mainline version fix this in the core that's why it is just temporary solution for now. http://lists.denx.de/pipermail/u-boot/2015-March/208211.html Signed-off-by: Radhey Shyam Pandey Signed-off-by: Michal Simek --- drivers/net/zynq_gem.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c index 6b316f0a752..2ad16b81da4 100644 --- a/drivers/net/zynq_gem.c +++ b/drivers/net/zynq_gem.c @@ -455,6 +455,14 @@ static int zynq_gem_init(struct eth_device *dev, bd_t * bis) writel(ZYNQ_GEM_NWCFG_INIT | ZYNQ_GEM_NWCFG_SPEED100, ®s->nwcfg); #endif + /* set hardware address because of ... */ + if (!is_valid_ether_addr(dev->enetaddr)) { + printf("%s: mac address is not valid\n", dev->name); + return -1; + } + + zynq_gem_setup_mac(dev); + setbits_le32(®s->nwctrl, ZYNQ_GEM_NWCTRL_RXEN_MASK | ZYNQ_GEM_NWCTRL_TXEN_MASK); -- 2.47.3