Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: pcs: lynxi: implement pcs_disable op

When switching from 10GBase-R/5GBase-R/USXGMII to one of the interface
modes provided by mtk-pcs-lynxi we need to make sure to always perform
a full configuration of the PHYA.

Implement pcs_disable op which resets the stored interface mode to
PHY_INTERFACE_MODE_NA to trigger a full reconfiguration once the LynxI
PCS driver had previously been deselected in favor of another PCS
driver such as the to-be-added driver for the USXGMII PCS found in
MT7988.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Link: https://lore.kernel.org/r/f23d1a60d2c9d2fb72e32dcb0eaa5f7e867a3d68.1692327891.git.daniel@makrotopia.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Daniel Golle and committed by
Jakub Kicinski
90308679 7eb6deb3

+8
+8
drivers/net/pcs/pcs-mtk-lynxi.c
··· 233 233 } 234 234 } 235 235 236 + static void mtk_pcs_lynxi_disable(struct phylink_pcs *pcs) 237 + { 238 + struct mtk_pcs_lynxi *mpcs = pcs_to_mtk_pcs_lynxi(pcs); 239 + 240 + mpcs->interface = PHY_INTERFACE_MODE_NA; 241 + } 242 + 236 243 static const struct phylink_pcs_ops mtk_pcs_lynxi_ops = { 237 244 .pcs_get_state = mtk_pcs_lynxi_get_state, 238 245 .pcs_config = mtk_pcs_lynxi_config, 239 246 .pcs_an_restart = mtk_pcs_lynxi_restart_an, 240 247 .pcs_link_up = mtk_pcs_lynxi_link_up, 248 + .pcs_disable = mtk_pcs_lynxi_disable, 241 249 }; 242 250 243 251 struct phylink_pcs *mtk_pcs_lynxi_create(struct device *dev,