[][kernel][mt7988][eth][Change XGAMC force-link control flow and add XGMAC reset flow]

[Description]
Change XGAMC force-link control flow and add XGMAC reset flow.

After PHY link-down or link-up event,
it will cause noise interference to XGMAC.

These noises will cause XFI counter error.
If the noise is like start-of-frame signal,
it will make XGMAC enter the wrong finite-state.
XGMAC will start to wait for the end-of-frame
but the data buffer is filled with other noises.
When the first packet is receive,
only the end-of-frame signal is preserved,
so the data of the first packet will be lost.


Therefore, we will reset XGMAC after PHY link-up event
and clear all XFI counter values after the reset.
Changing XGMAC force-link flow is to
protect XGDM from being affected when XGMAC resets.

Without this patch, the first packet will be randomly lost after link-up
and the wrong XFI count values will appear.

[Release-log]
N/A


Change-Id: I669d4d6a25fae718966840233bcff9915d25919e
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/7784606
2 files changed