From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 872B4C77B78 for ; Mon, 24 Apr 2023 01:50:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229797AbjDXBuT (ORCPT ); Sun, 23 Apr 2023 21:50:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229509AbjDXBuS (ORCPT ); Sun, 23 Apr 2023 21:50:18 -0400 Received: from smtpbg153.qq.com (smtpbg153.qq.com [13.245.218.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9444E19A; Sun, 23 Apr 2023 18:50:14 -0700 (PDT) X-QQ-mid: Yeas51t1682300979t085t31667 Received: from 7082A6556EBF4E69829842272A565F7C (jiawenwu@trustnetic.com [183.129.236.74]) X-QQ-SSF: 00400000000000F0FM9000000000000 From: =?utf-8?b?Smlhd2VuIFd1?= X-BIZMAIL-ID: 10473020202358225154 To: "'Simon Horman'" Cc: , , , , , , , , , References: <20230422045621.360918-1-jiawenwu@trustnetic.com> <20230422045621.360918-9-jiawenwu@trustnetic.com> In-Reply-To: Subject: RE: [PATCH net-next v4 8/8] net: txgbe: Support phylink MAC layer Date: Mon, 24 Apr 2023 09:49:37 +0800 Message-ID: <002901d9764f$073e7d10$15bb7730$@trustnetic.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQLYcl6q9PfLE2IPpEOvRSb72esQRAGSvu55Ap8o7ditGil7wA== Content-Language: zh-cn X-QQ-SENDSIZE: 520 Feedback-ID: Yeas:trustnetic.com:qybglogicsvr:qybglogicsvr5 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 > > ... > > > +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().