[PATCH v2] net: mtk_sgmii: implement mtk_pcs_ops
Bjørn Mork
bjorn at mork.no
Mon Jan 16 07:21:30 PST 2023
"Russell King (Oracle)" <linux at armlinux.org.uk> writes:
> To prove the point, in mtk_pcs_config():
>
> if (interface == PHY_INTERFACE_MODE_SGMII) {
> sgm_mode = SGMII_IF_MODE_SGMII;
> if (phylink_autoneg_inband(mode)) {
>
> Force the second if() to always be true, and see whether that allows
> traffic to pass.
Changed it with a printk to make sure I didn't mess up:
if (1 || phylink_autoneg_inband(mode)) {
pr_info("forcing AN\n");
But unfortunately without success. Still same failure. Output when
changing peer speed:
[ 54.539438] mtk_soc_eth 15100000.ethernet wan: Link is Down
[ 56.619937] mtk_sgmii_select_pcs: id=1
[ 56.623690] mtk_pcs_config: interface=4
[ 56.627511] offset:0 0x140
[ 56.627513] offset:4 0x4d544950
[ 56.630215] offset:8 0x20
[ 56.633340] forcing AN
[ 56.638292] mtk_pcs_config: rgc3=0x0, advertise=0x1 (changed), link_timer=1600000, sgm_mode=0x103, bmcr=0x1000, use_an=1
[ 56.649226] mtk_pcs_link_up: interface=4
[ 56.653135] offset:0 0x81140
[ 56.653137] offset:4 0x4d544950
[ 56.656001] offset:8 0x1
[ 56.659137] mtk_soc_eth 15100000.ethernet wan: Link is Up - 1Gbps/Full - flow control rx/tx
and the phy still reports this:
root at OpenWrt:/# mdio mdio-bus 6:30 raw 9
0x000e
Bjørn
More information about the Linux-mediatek
mailing list