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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday, April 24, 2023 3:58 AM, Simon Horman wrote:
> 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 <jiawenwu@xxxxxxxxxxxxxx>
> 
> ...
> 
> > +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?
> 

Oops, I forgot to add it to txgbe_init_phy().





[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux