[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <002901d9764f$073e7d10$15bb7730$@trustnetic.com>
Date: Mon, 24 Apr 2023 09:49:37 +0800
From: Jiawen Wu <jiawenwu@...stnetic.com>
To: "'Simon Horman'" <simon.horman@...igine.com>
Cc: <netdev@...r.kernel.org>, <andrew@...n.ch>,
<linux@...linux.org.uk>, <jarkko.nikula@...ux.intel.com>,
<olteanv@...il.com>, <andriy.shevchenko@...ux.intel.com>,
<hkallweit1@...il.com>, <linux-i2c@...r.kernel.org>,
<linux-gpio@...r.kernel.org>, <mengyuanlou@...-swift.com>
Subject: RE: [PATCH net-next v4 8/8] net: txgbe: Support phylink MAC layer
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@...stnetic.com>
>
> ...
>
> > +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().
Powered by blists - more mailing lists