]> git.baikalelectronics.ru Git - kernel.git/commit
net: ethernet: mediatek: fix flow control settings on GMAC0 is not being enabled...
authorsean.wang@mediatek.com <sean.wang@mediatek.com>
Tue, 16 Aug 2016 05:55:14 +0000 (13:55 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 16 Aug 2016 06:02:44 +0000 (23:02 -0700)
commit7ddc5122cf0f35f3724cf0eadc48086f1672f45d
treefa2ddcc2c23a1f674882cd8a39b261d318ad5c15
parentcb63c3e4c5b152aecca4bdc808b8d8deb562edb7
net: ethernet: mediatek: fix flow control settings on GMAC0 is not being enabled properly

Commit e81a87f7343504a2d0d1c0c00ed8c1d18d5d8a41
("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 39df2fb2d6c66755d5b76aba1a1df6394115b931
("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: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mediatek/mtk_eth_soc.c