From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: netdev@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>, "Andrew Lunn" <andrew@lunn.ch>,
"Florian Fainelli" <f.fainelli@gmail.com>,
"Luiz Angelo Daros de Luca" <luizluca@gmail.com>,
"Alvin Šipraga" <alsi@bang-olufsen.dk>,
"Madhuri Sripada" <madhuri.sripada@microchip.com>,
"Marcin Wojtas" <mw@semihalf.com>,
"Linus Walleij" <linus.walleij@linaro.org>,
"Tobias Waldekranz" <tobias@waldekranz.com>,
"Arun Ramadoss" <arun.ramadoss@microchip.com>,
"Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>,
"Jonathan Corbet" <corbet@lwn.net>
Subject: [PATCH net 2/4] docs: net: dsa: update platform_data documentation
Date: Fri, 8 Dec 2023 21:35:16 +0200 [thread overview]
Message-ID: <20231208193518.2018114-3-vladimir.oltean@nxp.com> (raw)
In-Reply-To: <20231208193518.2018114-1-vladimir.oltean@nxp.com>
We were documenting a bunch of stuff which was removed in commit
93e86b3bc842 ("net: dsa: Remove legacy probing support"). There's some
further cleanup to do in struct dsa_chip_data, so rather than describing
every possible field (when maybe we should be switching to kerneldoc
format), just say what's important about it.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
Documentation/networking/dsa/dsa.rst | 23 +++++++++++------------
1 file changed, 11 insertions(+), 12 deletions(-)
diff --git a/Documentation/networking/dsa/dsa.rst b/Documentation/networking/dsa/dsa.rst
index 0c326a42eb81..676c92136a0e 100644
--- a/Documentation/networking/dsa/dsa.rst
+++ b/Documentation/networking/dsa/dsa.rst
@@ -413,18 +413,17 @@ PHYs, external PHYs, or even external switches.
Data structures
---------------
-DSA data structures are defined in ``include/net/dsa.h`` as well as
-``net/dsa/dsa_priv.h``:
-
-- ``dsa_chip_data``: platform data configuration for a given switch device,
- this structure describes a switch device's parent device, its address, as
- well as various properties of its ports: names/labels, and finally a routing
- table indication (when cascading switches)
-
-- ``dsa_platform_data``: platform device configuration data which can reference
- a collection of dsa_chip_data structures if multiple switches are cascaded,
- the conduit network device this switch tree is attached to needs to be
- referenced
+DSA data structures are defined in ``include/linux/platform_data/dsa.h``,
+``include/net/dsa.h`` as well as ``net/dsa/dsa_priv.h``:
+
+- ``dsa_chip_data``: platform data configuration for a given switch device.
+ Most notably, it is necessary to the DSA core because it holds a reference to
+ the conduit interface. It must be accessible through the
+ ``ds->dev->platform_data`` pointer at ``dsa_register_switch()`` time. It is
+ populated by board-specific code. The hardware switch driver may also have
+ its own portion of ``platform_data`` description. In that case,
+ ``ds->dev->platform_data`` can point to a switch-specific structure, which
+ encapsulates ``struct dsa_chip_data`` as its first element.
- ``dsa_switch_tree``: structure assigned to the conduit network device under
``dsa_ptr``, this structure references a dsa_platform_data structure as well as
--
2.34.1
next prev parent reply other threads:[~2023-12-08 19:36 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-08 19:35 [PATCH net 0/4] Add some history to the DSA documentation Vladimir Oltean
2023-12-08 19:35 ` [PATCH net 1/4] docs: net: dsa: document the tagger-owned storage mechanism Vladimir Oltean
2023-12-08 22:15 ` Linus Walleij
2023-12-08 22:32 ` Florian Fainelli
2023-12-10 13:37 ` Alvin Šipraga
2023-12-08 19:35 ` Vladimir Oltean [this message]
2023-12-08 22:19 ` [PATCH net 2/4] docs: net: dsa: update platform_data documentation Linus Walleij
2023-12-09 0:52 ` Vladimir Oltean
2023-12-08 22:33 ` Florian Fainelli
2023-12-10 13:37 ` Alvin Šipraga
2023-12-08 19:35 ` [PATCH net 3/4] docs: net: dsa: update user MDIO bus documentation Vladimir Oltean
2023-12-08 22:22 ` Linus Walleij
2023-12-08 22:36 ` Florian Fainelli
2023-12-09 1:22 ` Vladimir Oltean
2023-12-09 21:49 ` Linus Walleij
2023-12-10 13:48 ` Alvin Šipraga
2023-12-11 14:35 ` Vladimir Oltean
2023-12-13 5:30 ` Luiz Angelo Daros de Luca
2023-12-13 12:06 ` Vladimir Oltean
2023-12-08 19:35 ` [PATCH net 4/4] docs: net: dsa: replace TODO section with info about history and devel ideas Vladimir Oltean
2023-12-08 22:40 ` Linus Walleij
2023-12-08 23:03 ` Florian Fainelli
2023-12-09 1:58 ` Vladimir Oltean
2023-12-11 17:29 ` Florian Fainelli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231208193518.2018114-3-vladimir.oltean@nxp.com \
--to=vladimir.oltean@nxp.com \
--cc=alsi@bang-olufsen.dk \
--cc=andrew@lunn.ch \
--cc=arun.ramadoss@microchip.com \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=luizluca@gmail.com \
--cc=madhuri.sripada@microchip.com \
--cc=mw@semihalf.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rmk+kernel@armlinux.org.uk \
--cc=tobias@waldekranz.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox