From patchwork Fri Mar 1 16:43:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Chevallier X-Patchwork-Id: 208940 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:fa17:b0:10a:f01:a869 with SMTP id ju23csp6354dyc; Fri, 1 Mar 2024 08:50:26 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWdKHOKibCoOwgD/EYl+WCGtDr5wKX7sl668hEMe4L6WGF6oG5TEQrtbPfHhWq24krxCxc2dFxXt07ePBKdw7MqGpjH6A== X-Google-Smtp-Source: AGHT+IGkjpaxFTb8DgfJkAN3B5pqwM1899fPT5JRf8Vtk9pl8Vf9YNhT9gaIaAj2+FvGuRZg8NJF X-Received: by 2002:a05:620a:4e3:b0:787:2acd:c1fe with SMTP id b3-20020a05620a04e300b007872acdc1femr2128449qkh.31.1709311826652; Fri, 01 Mar 2024 08:50:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709311826; cv=pass; d=google.com; s=arc-20160816; b=DkY3HDSB/HuDdkP1b4FOiUNH00dkwcSept2vcySk+CIFQBDsa/B57UKEvDYhRR44tR Kpjx2wC6W6parzmIkPQBxQR9RtvDBAB/B5KuNCuzbyA6IUDOMbOgqX3/I8H6BN8o6+zS Mtq1XHgYIK9oSybgjn7ImU1ZGuqm9xX4Yog5+omCwakuuJEq1gvYvgu+UQw1GD+ovc62 6J0YGrcvhzWs8D9JklXhK+WCVcNZyWev39cvYrb0IXI9AlM7SpAEBH7jzhvl3d63X2FZ fLdE24OjU8dt2AvIMy3lPV3W8zogdvmbHiutFlXfnjWV7ecEyIXwClHFmB8UAHjdWW43 TZIA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=HdKbotaExDpWBCOtfR3VZjJCq8E0opyDA13hf7YPanw=; fh=ucD0yDUQK4vkOjaD7gGMeT6G/Uk5SnXQjlHJp9K/X74=; b=SyH2NtpZ+gjqXHrYlBdp3LSKmhqCzdSH5eU/K9htbz/+z/YN63MIvAzSAlgIqCwFxX xqd1i7iWOgk4bM6D6GMmzA8CdtmkCxna5P3xPfw3M2spcgFgsjG/n7EZYvRM2B4rwma7 vUhCU3IQn7J2pGf43Px6ItiRQClA4e3DSBt7ZFsv0ge8tsJ7QJlLkqWwFCI19nSG1zpb SQn0LrSuFryCBTBrrh8F6FtYCDQWQLea/jEcfbF74G9BENKXpIsuHYBpTLNA+cREGzZP 9yoKKp8ko/pSje1/T1MTWeOUZUZGw9WeX0Z+BxeOF34bGuRHE3JQ2+kOQMD7JaqFsXSB YEzg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="f/OkB35A"; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-88751-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88751-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id v19-20020ae9e313000000b00787854dfd76si3967104qkf.350.2024.03.01.08.50.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 08:50:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-88751-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="f/OkB35A"; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-88751-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88751-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 324C71C21F53 for ; Fri, 1 Mar 2024 16:50:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8D3613BBE8; Fri, 1 Mar 2024 16:43:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="f/OkB35A" Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 005D93A292; Fri, 1 Mar 2024 16:43:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.193 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709311396; cv=none; b=V0mSuPO7h5Xf/yNoy3t64UQhieXN+wxBgxM2kweUb33QZ3SNGSTtCOc6PQtn1bag+ldN7BwOei8McMs6iGu+tPa9RCTLFitkCXw16gZxR2Q6H+lTWX3nsRXQnM4PYqvDwqHQLV8V4LRbJldr3oAnVPYl3ntkEHciPU4KrdzIftw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709311396; c=relaxed/simple; bh=75AEy1zWlndPq1U/Un/5Ks4p3OAHhznbncWj8YPNmHo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MKLFjhtrL5zQKP54EnxaMgV3mVoaMTdq0hFcQWaNa7JdxrlHbgiqO/IjteMijPNpEjivY/S0V1WDDfU21+HkDjP6nQQVSHvTDLD7QaR9mVNBZKJDrbqUYtk5TMCVlbjtWSFdfN4q8aPQ0oVEyfG9c1AVrzig3vtjGp728Ki6RDE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=f/OkB35A; arc=none smtp.client-ip=217.70.183.193 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id BF0BE240007; Fri, 1 Mar 2024 16:43:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1709311392; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HdKbotaExDpWBCOtfR3VZjJCq8E0opyDA13hf7YPanw=; b=f/OkB35A2676PpVlRJk6dGvqH9ekmaS77ZvkVd4TvB/z2SPkBT2Wsu6wBNmzo/oZ+lERAS VaLYhZa4rrahGnXuZpvREphUjZ4KftugfvhfCvdhbogtaXBD98ZX1u7518ehFmWnPKS/o3 Kj5kXyltmb52sAzska7c5yhGLsvQQjpNKKkeDQabu1VqdJVCmTszPYLhqcFP+8YwSF+uej o8B2IuaVpu+AEkAF6DDTujfaiGlUFdVyINhuVpySPhyKVbh7cp5ICRBq2jLURqNpQRI9Ri shydik66g4ahOLvRXMZrLF//IW0lS0TGk+ohAaBjZePgn113x2ZtH5f5nFAzGQ== From: Maxime Chevallier To: davem@davemloft.net Cc: Maxime Chevallier , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, Andrew Lunn , Jakub Kicinski , Eric Dumazet , Paolo Abeni , Russell King , Florian Fainelli , Heiner Kallweit , Jonathan Corbet Subject: [PATCH net-next v3 1/2] doc: sfp-phylink: update the porting guide with PCS handling Date: Fri, 1 Mar 2024 17:43:07 +0100 Message-ID: <20240301164309.3643849-2-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240301164309.3643849-1-maxime.chevallier@bootlin.com> References: <20240301164309.3643849-1-maxime.chevallier@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-GND-Sasl: maxime.chevallier@bootlin.com X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792343357969744039 X-GMAIL-MSGID: 1792343357969744039 Now that phylink has a comprehensive PCS support, update the porting guide to explain the process of supporting the PCS configuration. This also removed outdated references to phylink_config fields that no longer exists. Signed-off-by: Maxime Chevallier --- V3: Remove stray whitespace and wrap a long line V2: Squash both V1 patches together to create this one. Documentation/networking/sfp-phylink.rst | 147 ++++++++++++++++++++--- 1 file changed, 133 insertions(+), 14 deletions(-) diff --git a/Documentation/networking/sfp-phylink.rst b/Documentation/networking/sfp-phylink.rst index 8054d33f449f..5bf285d73e8a 100644 --- a/Documentation/networking/sfp-phylink.rst +++ b/Documentation/networking/sfp-phylink.rst @@ -231,16 +231,136 @@ this documentation. For further information on these methods, please see the inline documentation in :c:type:`struct phylink_mac_ops `. -9. Remove calls to of_parse_phandle() for the PHY, - of_phy_register_fixed_link() for fixed links etc. from the probe - function, and replace with: +9. Fill-in the :c:type:`struct phylink_config ` fields with + a reference to the :c:type:`struct device ` associated to your + :c:type:`struct net_device `: .. code-block:: c - struct phylink *phylink; priv->phylink_config.dev = &dev.dev; priv->phylink_config.type = PHYLINK_NETDEV; + Fill-in the various speeds, pause and duplex modes your MAC can handle: + + .. code-block:: c + + priv->phylink_config.mac_capabilities = MAC_SYM_PAUSE | MAC_10 | MAC_100 | MAC_1000FD; + +10. Some Ethernet controllers work in pair with a PCS (Physical Coding Sublayer) + block, that can handle among other things the encoding/decoding, link + establishment detection and autonegotiation. While some MACs have internal + PCS whose operation is transparent, some other require dedicated PCS + configuration for the link to become functional. In that case, phylink + provides a PCS abstraction through :c:type:`struct phylink_pcs `. + + Identify if your driver has one or more internal PCS blocks, and/or if + your controller can use an external PCS block that might be internally + connected to your controller. + + If your controller doesn't have any internal PCS, you can go to step 11. + + If your Ethernet controller contains one or several PCS blocks, create + one :c:type:`struct phylink_pcs ` instance per PCS block within + your driver's private data structure: + + .. code-block:: c + + struct phylink_pcs pcs; + + Populate the relevant :c:type:`struct phylink_pcs_ops ` to + configure your PCS. Create a :c:func:`pcs_get_state` function that reports + the inband link state, a :c:func:`pcs_config` function to configure your + PCS according to phylink-provided parameters, and a :c:func:`pcs_validate` + function that report to phylink all accepted configuration parameters for + your PCS: + + .. code-block:: c + + struct phylink_pcs_ops foo_pcs_ops = { + .pcs_validate = foo_pcs_validate, + .pcs_get_state = foo_pcs_get_state, + .pcs_config = foo_pcs_config, + }; + + Arrange for PCS link state interrupts to be forwarded into + phylink, via: + + .. code-block:: c + + phylink_pcs_change(pcs, link_is_up); + + where ``link_is_up`` is true if the link is currently up or false + otherwise. If a PCS is unable to provide these interrupts, then + it should set ``pcs->pcs_poll = true;`` when creating the PCS. + +11. If your controller relies on, or accepts the presence of an external PCS + controlled through its own driver, add a pointer to a phylink_pcs instance + in your driver private data structure: + + .. code-block:: c + + struct phylink_pcs *pcs; + + The way of getting an instance of the actual PCS depends on the platform, + some PCS sit on an MDIO bus and are grabbed by passing a pointer to the + corresponding :c:type:`struct mii_bus ` and the PCS's address on + that bus. In this example, we assume the controller attaches to a Lynx PCS + instance: + + .. code-block:: c + + priv->pcs = lynx_pcs_create_mdiodev(bus, 0); + + Some PCS can be recovered based on firmware information: + + .. code-block:: c + + priv->pcs = lynx_pcs_create_fwnode(of_fwnode_handle(node)); + +12. Populate the :c:func:`mac_select_pcs` callback and add it to your + :c:type:`struct phylink_mac_ops ` set of ops. This function + must return a pointer to the relevant :c:type:`struct phylink_pcs ` + that will be used for the requested link configuration: + + .. code-block:: c + + static struct phylink_pcs *foo_select_pcs(struct phylink_config *config, + phy_interface_t interface) + { + struct foo_priv *priv = container_of(config, struct foo_priv, + phylink_config); + + if ( /* 'interface' needs a PCS to function */ ) + return priv->pcs; + + return NULL; + } + + See :c:func:`mvpp2_select_pcs` for an example of a driver that has multiple + internal PCS. + +13. Fill-in all the :c:type:`phy_interface_t ` (i.e. all MAC to + PHY link modes) that your MAC can output. The following example shows a + configuration for a MAC that can handle all RGMII modes, SGMII and 1000BaseX. + You must adjust these according to what your MAC and all PCS associated + with this MAC are capable of, and not just the interface you wish to use: + + .. code-block:: c + + phy_interface_set_rgmii(priv->phylink_config.supported_interfaces); + __set_bit(PHY_INTERFACE_MODE_SGMII, + priv->phylink_config.supported_interfaces); + __set_bit(PHY_INTERFACE_MODE_1000BASEX, + priv->phylink_config.supported_interfaces); + +14. Remove calls to of_parse_phandle() for the PHY, + of_phy_register_fixed_link() for fixed links etc. from the probe + function, and replace with: + + .. code-block:: c + + struct phylink *phylink; + phylink = phylink_create(&priv->phylink_config, node, phy_mode, &phylink_ops); if (IS_ERR(phylink)) { err = PTR_ERR(phylink); @@ -249,14 +369,14 @@ this documentation. priv->phylink = phylink; - and arrange to destroy the phylink in the probe failure path as - appropriate and the removal path too by calling: + and arrange to destroy the phylink in the probe failure path as + appropriate and the removal path too by calling: - .. code-block:: c + .. code-block:: c phylink_destroy(priv->phylink); -10. Arrange for MAC link state interrupts to be forwarded into +15. Arrange for MAC link state interrupts to be forwarded into phylink, via: .. code-block:: c @@ -264,17 +384,16 @@ this documentation. phylink_mac_change(priv->phylink, link_is_up); where ``link_is_up`` is true if the link is currently up or false - otherwise. If a MAC is unable to provide these interrupts, then - it should set ``priv->phylink_config.pcs_poll = true;`` in step 9. + otherwise. -11. Verify that the driver does not call:: +16. Verify that the driver does not call:: netif_carrier_on() netif_carrier_off() - as these will interfere with phylink's tracking of the link state, - and cause phylink to omit calls via the :c:func:`mac_link_up` and - :c:func:`mac_link_down` methods. + as these will interfere with phylink's tracking of the link state, + and cause phylink to omit calls via the :c:func:`mac_link_up` and + :c:func:`mac_link_down` methods. Network drivers should call phylink_stop() and phylink_start() via their suspend/resume paths, which ensures that the appropriate From patchwork Fri Mar 1 16:43:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Chevallier X-Patchwork-Id: 208941 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:fa17:b0:10a:f01:a869 with SMTP id ju23csp6366dyc; Fri, 1 Mar 2024 08:50:28 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXGdhMzNowy0K/bEaVUDIxwWk4Dijadjd/LLzPIhf4TkUCl3+/Mrfcn513FkZZx5g3jLxVOA/pqm98FHIE/6eoiEATzgQ== X-Google-Smtp-Source: AGHT+IGAtMT+6CcyF1eynrmdWNxrD4vEtkcB1c6+fVLTCnvyfzkyrTnwgVGgJ9naaDKfHQmO44o/ X-Received: by 2002:a05:622a:1c2:b0:42e:b8da:9d27 with SMTP id t2-20020a05622a01c200b0042eb8da9d27mr3289697qtw.12.1709311828293; Fri, 01 Mar 2024 08:50:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709311828; cv=pass; d=google.com; s=arc-20160816; b=xJo2sT1/lab5GHmD/POuravM5fJsFca93/kAOYJnsCGPhnCR474paiySisFcsg6OxM EScGaP2RpggAHZF5F/dwgaZABHx3D3bxK37wkO1/pjGXUwzCAEYVkt3dE8vXpa8uciBE PeUdUbbOSDRRdkbVkBKdgkxPNdoJDPM9Ihrx972vMYgNDWsVLlv/ZfAG0dFintwq3vTR p2ZkzO1MjfZHUmB3ne1/ChW4mgpjpqJlNjFaRolUAE1z3wnAVm+6o7Sx3qnVs08ZvQjM 59KIjlyy8vWzrD/yZRXeE2Gw0kN6T2vSFvtrdq0/YtuVUpqhECdFFjS4rvbzqcZ4Z2xn c1WA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=u/Hp6QCsVR3lVDylsB1ijKVlNWSb0JM4K1x2f3hSJP4=; fh=ucD0yDUQK4vkOjaD7gGMeT6G/Uk5SnXQjlHJp9K/X74=; b=JtGLteautke4QbxgRq7QfiI75g6XfQ9mhsVttMq37pygNw3FEpDiWuPmdn/k2AdI06 xaiWqpiF49O9Pl6CIvHSxr25YmFUJ1t1KMGzqUi0lkI0f06lySoK6zdbXiBzJt6jBg50 zxcxR+/MZCz9spEEs2ZesvLq+vLAlXf2XBWhsXNM4t5rOGtLEXupyg1tST1n0xMgbqjA 60IWHcv44PpERB4emobme7hwJIAlDrERMS/tKxe5nqe2epfkn6zIZEmlnh55jXPLUpnk caD5ZuSkMR+hOHeeJ6vNndPOiV5ypEUlhvt70eD5ToesOu2jKMJsbW3sRm+9dveMgHDP 9tZA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=lyZvkbYa; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-88752-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88752-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id y20-20020ac87094000000b0042ebc760378si3192157qto.477.2024.03.01.08.50.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 08:50:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-88752-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=lyZvkbYa; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-88752-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88752-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 1ADB71C20DC0 for ; Fri, 1 Mar 2024 16:50:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D33013B79C; Fri, 1 Mar 2024 16:43:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="lyZvkbYa" Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A45B479FD; Fri, 1 Mar 2024 16:43:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.193 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709311398; cv=none; b=AoeqGHBLpJkRk3tQ+hrlSCEmLcaogvnpB8HVvrhzcZM9Nkj8mBbDJOiZf5K0YNTXi+wd4KQ4HW9k4Jffdn+MxxbA72oc28xWCMXUvv+i7tKPOTZ5MgkT3rfpORmdrjoe5DthYK4N52oZMptTlY5DiuaMDqZy4mkCHNS8OLB+n9M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709311398; c=relaxed/simple; bh=7+yPGbyypKfVMjlezs3o4R5gwncoRyCHS/svquRSpl0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=B/gYCb7ul0g6rwAFyx/4rvreVxFlHgUae09Kn7iuiAaxT4Wi7cqVPgKKhWI/xoEnODHz3J532aszkXAb5afW25jH3YvnuqBOaA0zneNbi1DcrUpAg97JPC8asEM8g29XkwFribtTAZrT4FUaVSZWAGFgJ9uWOkGQNk1W3b0Qe1E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=lyZvkbYa; arc=none smtp.client-ip=217.70.183.193 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 7EA47240009; Fri, 1 Mar 2024 16:43:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1709311393; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=u/Hp6QCsVR3lVDylsB1ijKVlNWSb0JM4K1x2f3hSJP4=; b=lyZvkbYab/ryfg7rK0v4vcwr71SvChQQkG7kVQN9+DsImWVuVuJXR4jm+LK/i3T7GmSM0K tfJIvzPgPoPQrglouEeTLrU3eTU38ITPMVQtZUUkwSeAIaCwNXNzdWI0X487pz3uHdpZS3 o0CZKIQaGkJo1q7rMMV4VKZkKHlln6yr4P6A4ibwd3hxwdhDAxp1aYLpZqNUluSwGICMLt FyKC2SuHaQ22bgJXN1p5wuKnDuCVYCZ2ukfFT0pf9RGOT9Zo4xiTRQwbUGNHoVqPsZY8+c VSvBTx4n9z9sS6As4csz9iRHnCraOKBFn5KsYjIOpl5XIzUFDtXw7JXngQQUEQ== From: Maxime Chevallier To: davem@davemloft.net Cc: Maxime Chevallier , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, Andrew Lunn , Jakub Kicinski , Eric Dumazet , Paolo Abeni , Russell King , Florian Fainelli , Heiner Kallweit , Jonathan Corbet Subject: [PATCH net-next v3 2/2] net: phylink: clean the pcs_get_state documentation Date: Fri, 1 Mar 2024 17:43:08 +0100 Message-ID: <20240301164309.3643849-3-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240301164309.3643849-1-maxime.chevallier@bootlin.com> References: <20240301164309.3643849-1-maxime.chevallier@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-GND-Sasl: maxime.chevallier@bootlin.com X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792343359444825926 X-GMAIL-MSGID: 1792343359444825926 commit 4d72c3bb60dd ("net: phylink: strip out pre-March 2020 legacy code") dropped the mac_pcs_get_state ops in phylink_mac_ops in favor of dedicated PCS operation pcs_get_state. However, the documentation for the pcs_get_state ops was incorrectly converted and now self-references. Drop the extra comment. Signed-off-by: Maxime Chevallier --- V3: No changes V2: No changes include/linux/phylink.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/linux/phylink.h b/include/linux/phylink.h index 6ba411732a0d..9a57deefcb07 100644 --- a/include/linux/phylink.h +++ b/include/linux/phylink.h @@ -480,9 +480,6 @@ void pcs_disable(struct phylink_pcs *pcs); * negotiation completion state in @state->an_complete, and link up state * in @state->link. If possible, @state->lp_advertising should also be * populated. - * - * When present, this overrides pcs_get_state() in &struct - * phylink_pcs_ops. */ void pcs_get_state(struct phylink_pcs *pcs, struct phylink_link_state *state);