net: pcs: rzn1-miic: fill in PCS supported_interfaces
PATCH 1/1 net: pcs: rzn1-miic: fill in PCS supported_interfaces
Populate the PCS supported_interfaces bitmap with the interfaces that this PCS supports. This makes the manual checking in miic_validate() redundant, so remove that.
--- drivers/net/pcs/pcs-rzn1-miic.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-)
drivers/net/pcs/pcs-rzn1-miic.c +4 -12
@@ -268,17 +268,6 @@ static void miic_link_up(struct phylink_pcs *pcs, unsigned int neg_mode, (MIIC_CONVCTRL_CONV_SPEED | MIIC_CONVCTRL_FULLD), val); } -static int miic_validate (struct phylink_pcs *pcs,unsigned long *supported, -const struct phylink_link_state *state) -{ -if (phy_interface_mode_is_rgmii (state->interface) || - state->interface ==PHY_INTERFACE_MODE_RMII || - state->interface ==PHY_INTERFACE_MODE_MII ) -return 1 ; - -return -EINVAL ; -} -static int miic_pre_init (struct phylink_pcs *pcs) {struct miic_port *miic_port =phylink_pcs_to_miic_port (pcs);
@@ -307,7 +296,6 @@ static int miic_pre_init(struct phylink_pcs *pcs) }static const struct phylink_pcs_ops miic_phylink_ops = { - .pcs_validate = miic_validate, .pcs_config = miic_config, .pcs_link_up = miic_link_up, .pcs_pre_init = miic_pre_init,
@@ -363,6 +351,10 @@ struct phylink_pcs *miic_create(struct device *dev, struct device_node *np) miic_port->pcs.ops = &miic_phylink_ops; miic_port->pcs.neg_mode = true; +phy_interface_set_rgmii (miic_port->pcs.supported_interfaces); +__set_bit (PHY_INTERFACE_MODE_RMII , miic_port->pcs.supported_interfaces); +__set_bit (PHY_INTERFACE_MODE_MII , miic_port->pcs.supported_interfaces); +return &miic_port->pcs; }EXPORT_SYMBOL (miic_create);
Signature · 1 line
2.30.2
Quoted 5 lines · Russell King (Oracle)
Populate the PCS
supported_interfacesbitmap with the interfaces that this PCS supports. This makes the manual checking inmiic_validate()redundant, so remove that.Signed-off-by Russell King (Oracle) <[email protected]>
Andrew
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Wed, 05 Feb 2025 15:43:32 +0000 you wrote:
Populate the PCS
supported_interfacesbitmap with the interfaces that this PCS supports. This makes the manual checking inmiic_validate()redundant, so remove that.Signed-off-by Russell King (Oracle) <[email protected]>--- drivers/net/pcs/pcs-rzn1-miic.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-)
Here is the summary with links:
- [net-next] net: pcs: rzn1-miic: fill in PCS supported_interfaces
https://git.kernel.org/netdev/net-next/c/508df2de7b3e
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html