Commit 520d29bd authored by Russell King (Oracle)'s avatar Russell King (Oracle) Committed by Jakub Kicinski
Browse files

net: pcs: pcs-mtk-lynxi: implement pcs_inband_caps() method



Report the PCS in-band capabilities to phylink for the LynxI PCS.

Signed-off-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/E1tJ8NR-006L5P-E3@rmk-PC.armlinux.org.uk


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 6561f0e5
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -88,6 +88,21 @@ static struct mtk_pcs_lynxi *pcs_to_mtk_pcs_lynxi(struct phylink_pcs *pcs)
	return container_of(pcs, struct mtk_pcs_lynxi, pcs);
}

static unsigned int mtk_pcs_lynxi_inband_caps(struct phylink_pcs *pcs,
					      phy_interface_t interface)
{
	switch (interface) {
	case PHY_INTERFACE_MODE_1000BASEX:
	case PHY_INTERFACE_MODE_2500BASEX:
	case PHY_INTERFACE_MODE_SGMII:
	case PHY_INTERFACE_MODE_QSGMII:
		return LINK_INBAND_DISABLE | LINK_INBAND_ENABLE;

	default:
		return 0;
	}
}

static void mtk_pcs_lynxi_get_state(struct phylink_pcs *pcs,
				    struct phylink_link_state *state)
{
@@ -241,6 +256,7 @@ static void mtk_pcs_lynxi_disable(struct phylink_pcs *pcs)
}

static const struct phylink_pcs_ops mtk_pcs_lynxi_ops = {
	.pcs_inband_caps = mtk_pcs_lynxi_inband_caps,
	.pcs_get_state = mtk_pcs_lynxi_get_state,
	.pcs_config = mtk_pcs_lynxi_config,
	.pcs_an_restart = mtk_pcs_lynxi_restart_an,