kernel: import accepted MediaTek Ethernet patches
[openwrt/staging/aparcar.git] / target / linux / generic / backport-5.15 / 733-v6.2-04-mtk_sgmii-enable-PCS-polling-to-allow-SFP-work.patch
1 From 3337a6e04ddf2923a1bdcf3d31b3b52412bf82dd Mon Sep 17 00:00:00 2001
2 From: Alexander Couzens <lynxis@fe80.eu>
3 Date: Wed, 1 Feb 2023 19:23:31 +0100
4 Subject: [PATCH] mtk_sgmii: enable PCS polling to allow SFP work
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 Currently there is no IRQ handling (even the SGMII supports it).
10 Enable polling to support SFP ports.
11
12 Fixes: 14a44ab0330d ("net: mtk_eth_soc: partially convert to phylink_pcs")
13 Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
14 Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
15 [ bmork: changed "1" => "true" ]
16 Signed-off-by: Bjørn Mork <bjorn@mork.no>
17 Acked-by: Daniel Golle <daniel@makrotopia.org>
18 Tested-by: Daniel Golle <daniel@makrotopia.org>
19 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
20 ---
21 drivers/net/ethernet/mediatek/mtk_sgmii.c | 1 +
22 1 file changed, 1 insertion(+)
23
24 --- a/drivers/net/ethernet/mediatek/mtk_sgmii.c
25 +++ b/drivers/net/ethernet/mediatek/mtk_sgmii.c
26 @@ -162,6 +162,7 @@ int mtk_sgmii_init(struct mtk_sgmii *ss,
27 return PTR_ERR(ss->pcs[i].regmap);
28
29 ss->pcs[i].pcs.ops = &mtk_pcs_ops;
30 + ss->pcs[i].pcs.poll = true;
31 ss->pcs[i].interface = PHY_INTERFACE_MODE_NA;
32 }
33