Subject: Re: [PATCH net-next v4 8/8] net: txgbe: Support phylink MAC layer

From: Simon Horman <[email-masked]>
Date: Sun, 23 Apr 2023 21:57:41 +0200

On Sat, Apr 22, 2023 at 12:56:21PM +0800, Jiawen Wu wrote:
> Add phylink support to Wangxun 10Gb Ethernet controller for the 10GBASE-R
> interface.
> 
> Signed-off-by: Jiawen Wu <[email-masked]>

...

> +static int txgbe_phylink_init(struct txgbe *txgbe)
> +{
> +	struct phylink_config *config;
> +	struct fwnode_handle *fwnode;
> +	struct wx *wx = txgbe->wx;
> +	phy_interface_t phy_mode;
> +	struct phylink *phylink;
> +
> +	config = devm_kzalloc(&wx->pdev->dev, sizeof(*config), GFP_KERNEL);
> +	if (!config)
> +		return -ENOMEM;
> +
> +	config->dev = &wx->netdev->dev;
> +	config->type = PHYLINK_NETDEV;
> +	config->mac_capabilities = MAC_10000FD | MAC_1000FD | MAC_SYM_PAUSE | MAC_ASYM_PAUSE;
> +	phy_mode = PHY_INTERFACE_MODE_10GBASER;
> +	__set_bit(PHY_INTERFACE_MODE_10GBASER, config->supported_interfaces);
> +	fwnode = software_node_fwnode(txgbe->nodes.group[SWNODE_PHYLINK]);
> +	phylink = phylink_create(config, fwnode, phy_mode, &txgbe_mac_ops);
> +	if (IS_ERR(phylink))
> +		return PTR_ERR(phylink);
> +
> +	txgbe->phylink = phylink;
> +
> +	return 0;
> +}

Hi Jiawen,

txgbe_phylink_init() seems unused.
Perhaps it needs to be wired-up somewhere?