• sean.wang@mediatek.com's avatar
    net: ethernet: mediatek: fix flow control settings on GMAC0 is not being enabled properly · b2025c7c
    sean.wang@mediatek.com authored
    Commit 08ef55c6
    ("net-next: mediatek: fix gigabit and flow control advertisement")
    had supported proper flow control settings for GMAC1. But for GMAC0,
    
    1.GMAC0 shares the common logic with GMAC1 inside mtk_phy_link_adjust()
    to adapt various settings for the target phy.
    
    2.GMAC0 uses fixed-phy to connect to a builtin gigabit switch with
    fixed link speed as commit 0c72c50f
    ("net-next: mediatek: add fixed-phy support") describes.
    
    3.However, fixed-phy doesn't enable SUPPORTED_Pause & SUPPORTED_Asym_Pause
    supported flag on default that would cause mtk_phy_link_adjust() not to
    enable flow control setting on GMAC0 properly and cause packet dropped
    when high traffic.
    
    Due to these reasons, the patch adds SUPPORTED_Pause & SUPPORTED_Asym_Pause
    supported flags on fixed-phy used by the driver to have proper handling on
    the both GMAC with the shared common logic.
    Signed-off-by: default avatarSean Wang <sean.wang@mediatek.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    b2025c7c
mtk_eth_soc.c 46 KB