]> git.sur5r.net Git - u-boot/commitdiff
net: designware: Program MAC address to hardware after soft reset
authorBin Meng <bmeng.cn@gmail.com>
Mon, 15 Jun 2015 10:40:19 +0000 (18:40 +0800)
committerTom Rini <trini@konsulko.com>
Wed, 8 Jul 2015 17:43:19 +0000 (13:43 -0400)
commit f566c99 "net: Update hardware MAC address if it changes in env"
removes writing MAC address to designware controller after soft reset.
This makes designware ethernet port fail to work. Actually the MAC
address should always be programmed after soft reset.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
drivers/net/designware.c

index ae51cf378162b0500edc2152a4b3db4a86604c8e..645ca6427cf41843f90a8fdcf3c941ae144e83c9 100644 (file)
@@ -243,6 +243,12 @@ static int _dw_eth_init(struct dw_eth_dev *priv, u8 *enetaddr)
                mdelay(100);
        };
 
+       /*
+        * Soft reset above clears HW address registers.
+        * So we have to set it here once again.
+        */
+       _dw_write_hwaddr(priv, enetaddr);
+
        rx_descs_init(priv);
        tx_descs_init(priv);