]> git.baikalelectronics.ru Git - kernel.git/commit
net: ethernet: mediatek: add the whole ethernet reset into the reset process
authorSean Wang <sean.wang@mediatek.com>
Wed, 14 Sep 2016 15:13:19 +0000 (23:13 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 16 Sep 2016 06:22:57 +0000 (02:22 -0400)
commit07c875a01f8dd1ea19d3a9380ceec0c470e98bc5
treee5b2efb26bb04b923bcbc373e5103c5225d6768a
parent9aa1c97cbed56143c5796f6e95d2ce4822e7022c
net: ethernet: mediatek: add the whole ethernet reset into the reset process

1) original driver only resets DMA used by descriptor rings
which can't guarantee it can recover all various kinds of fatal
errors, so the patch tries to reset the underlying hardware
resource from scratch on Mediatek SoC required for ethernet
running, including power, pin mux control, clock and internal
circuits on the ethernet in order to restore into the initial
state which the rebooted machine gives.

2) add state variable inside structure mtk_eth to help distinguish
mtk_hw_init is called between the initialization during boot time
or re-initialization during the reset process.

3) add ge_mode variable inside structure mtk_mac for restoring
the interface mode of the current setup for the target MAC.

4) remove __init attribute from mtk_hw_init definition

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mediatek/mtk_eth_soc.c
drivers/net/ethernet/mediatek/mtk_eth_soc.h