lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b7137a4a-cb87-4aa5-958f-a83d3239e967@linux.dev>
Date: Thu, 12 Jun 2025 11:38:56 -0400
From: Sean Anderson <sean.anderson@...ux.dev>
To: Randy Dunlap <rdunlap@...radead.org>, netdev@...r.kernel.org,
 Andrew Lunn <andrew+netdev@...n.ch>, "David S . Miller"
 <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
 Russell King <linux@...linux.org.uk>
Cc: Vineeth Karumanchi <vineeth.karumanchi@....com>,
 Heiner Kallweit <hkallweit1@...il.com>, linux-kernel@...r.kernel.org,
 Kory Maincent <kory.maincent@...tlin.com>,
 Daniel Golle <daniel@...rotopia.org>, Simon Horman <horms@...nel.org>,
 Christian Marangi <ansuelsmth@...il.com>, Lei Wei <quic_leiwei@...cinc.com>,
 Jonathan Corbet <corbet@....net>, linux-doc@...r.kernel.org
Subject: Re: [net-next PATCH v6 03/10] net: pcs: Add subsystem

On 6/10/25 20:24, Randy Dunlap wrote:
> Hi,
> 
> 
>> diff --git a/Documentation/networking/pcs.rst b/Documentation/networking/pcs.rst
>> new file mode 100644
>> index 000000000000..4b41ba884160
>> --- /dev/null
>> +++ b/Documentation/networking/pcs.rst
>> @@ -0,0 +1,102 @@
>> +.. SPDX-License-Identifier: GPL-2.0
>> +
>> +=============
>> +PCS Subsystem
>> +=============
>> +
>> +The PCS (Physical Coding Sublayer) subsystem handles the registration and lookup
>> +of PCS devices. These devices contain the upper sublayers of the Ethernet
>> +physical layer, generally handling framing, scrambling, and encoding tasks. PCS
>> +devices may also include PMA (Physical Medium Attachment) components. PCS
>> +devices transfer data between the Link-layer MAC device, and the rest of the
>> +physical layer, typically via a serdes. The output of the serdes may be
>> +connected more-or-less directly to the medium when using fiber-optic or
>> +backplane connections (1000BASE-SX, 1000BASE-KX, etc). It may also communicate
>> +with a separate PHY (such as over SGMII) which handles the connection to the
>> +medium (such as 1000BASE-T).
>> +
>> +Looking up PCS Devices
>> +----------------------
>> +
>> +There are generally two ways to look up a PCS device. If the PCS device is
>> +internal to a larger device (such as a MAC or switch), and it does not share an
>> +implementation with an existing PCS, then it does not need to be registered with
>> +the PCS subsystem. Instead, you can populate a :c:type:`phylink_pcs`
>> +in your probe function. Otherwise, you must look up the PCS.
>> +
>> +If your device has a :c:type:`fwnode_handle`, you can add a PCS using the
>> +``pcs-handle`` property::
>> +
>> +    ethernet-controller {
>> +        // ...
>> +        pcs-handle = <&pcs>;
>> +        pcs-handle-names = "internal";
>> +    };
>> +
>> +Then, during your probe function, you can get the PCS using :c:func:`pcs_get`::
> 
> It's preferable to use                               PCS using pcs_get()::
> instead of the :c:func: notation to make the .rst file more human-readable.
> They produce the same generated output.

If you find this syntax useful, then you should update
Documentation/doc-guide/{kernel-doc,sphinx}.rst. I did not use it
because it I did not know about it because it is not documented.

--Sean

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ