net: stmmac: fix system hang if change mac address after interface ifdown
authorJoakim Zhang <qiangqing.zhang@nxp.com>
Thu, 20 May 2021 12:51:17 +0000 (20:51 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 20 May 2021 22:49:33 +0000 (15:49 -0700)
commit4691ffb18ac908609aab07d13af7995b6b89d33c
tree4b71955bf3a144a884804b9f96f7aa3d70b1c44c
parentb3dcb312778664bfbe0a73242fa04a628719b066
net: stmmac: fix system hang if change mac address after interface ifdown

Fix system hang with below sequences:
~# ifconfig ethx down
~# ifconfig ethx hw ether xx:xx:xx:xx:xx:xx

After ethx down, stmmac all clocks gated off and then register access causes
system hang.

Fixes: 5ec55823438e ("net: stmmac: add clocks management for gmac driver")
Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c