Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3c91d114 authored by Ioana Ciornei's avatar Ioana Ciornei Committed by David S. Miller
Browse files

Documentation: net: dsa: transition to the rst format



This patch also performs some minor adjustments such as numbering for
the receive path sequence, conversion of keywords to inline literals and
adding an index page so it looks better in the output of 'make htmldocs'.

Signed-off-by: default avatarIoana Ciornei <ciorneiioana@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 056b21fb
Loading
Loading
Loading
Loading
+14 −13
Original line number Diff line number Diff line
=============================================
Broadcom Starfighter 2 Ethernet switch driver
=============================================

@@ -25,27 +26,27 @@ are connected at a lower speed.
The switch hardware block is typically interfaced using MMIO accesses and
contains a bunch of sub-blocks/registers:

* SWITCH_CORE: common switch registers
* SWITCH_REG: external interfaces switch register
* SWITCH_MDIO: external MDIO bus controller (there is another one in SWITCH_CORE,
- ``SWITCH_CORE``: common switch registers
- ``SWITCH_REG``: external interfaces switch register
- ``SWITCH_MDIO``: external MDIO bus controller (there is another one in SWITCH_CORE,
  which is used for indirect PHY accesses)
* SWITCH_INDIR_RW: 64-bits wide register helper block
* SWITCH_INTRL2_0/1: Level-2 interrupt controllers
* SWITCH_ACB: Admission control block
* SWITCH_FCB: Fail-over control block
- ``SWITCH_INDIR_RW``: 64-bits wide register helper block
- ``SWITCH_INTRL2_0/1``: Level-2 interrupt controllers
- ``SWITCH_ACB``: Admission control block
- ``SWITCH_FCB``: Fail-over control block

Implementation details
======================

The driver is located in drivers/net/dsa/bcm_sf2.c and is implemented as a DSA
driver; see Documentation/networking/dsa/dsa.txt for details on the subsystem
The driver is located in ``drivers/net/dsa/bcm_sf2.c`` and is implemented as a DSA
driver; see ``Documentation/networking/dsa/dsa.rst`` for details on the subsystem
and what it provides.

The SF2 switch is configured to enable a Broadcom specific 4-bytes switch tag
which gets inserted by the switch for every packet forwarded to the CPU
interface, conversely, the CPU network interface should insert a similar tag for
packets entering the CPU port. The tag format is described in
net/dsa/tag_brcm.c.
``net/dsa/tag_brcm.c``.

Overall, the SF2 driver is a fairly regular DSA driver; there are a few
specifics covered below.
@@ -54,7 +55,7 @@ Device Tree probing
-------------------

The DSA platform device driver is probed using a specific compatible string
provided in net/dsa/dsa.c. The reason for that is because the DSA subsystem gets
provided in ``net/dsa/dsa.c``. The reason for that is because the DSA subsystem gets
registered as a platform device driver currently. DSA will provide the needed
device_node pointers which are then accessible by the switch driver setup
function to setup resources such as register ranges and interrupts. This
@@ -70,7 +71,7 @@ Broadcom switches connected to a SF2 require the use of the DSA slave MDIO bus
in order to properly configure them. By default, the SF2 pseudo-PHY address, and
an external switch pseudo-PHY address will both be snooping for incoming MDIO
transactions, since they are at the same address (30), resulting in some kind of
"double" programming. Using DSA, and setting ds->phys_mii_mask accordingly, we
"double" programming. Using DSA, and setting ``ds->phys_mii_mask`` accordingly, we
selectively divert reads and writes towards external Broadcom switches
pseudo-PHY addresses. Newer revisions of the SF2 hardware have introduced a
configurable pseudo-PHY address which circumvents the initial design limitation.
@@ -86,7 +87,7 @@ firmware gets reloaded. The SF2 driver relies on such events to properly set its
MoCA interface carrier state and properly report this to the networking stack.

The MoCA interfaces are supported using the PHY library's fixed PHY/emulated PHY
device and the switch driver registers a fixed_link_update callback for such
device and the switch driver registers a ``fixed_link_update`` callback for such
PHYs which reflects the link state obtained from the interrupt handler.


+141 −138

File changed and moved.

Preview size limit exceeded, changes collapsed.

+10 −0
Original line number Diff line number Diff line
===============================
Distributed Switch Architecture
===============================

.. toctree::
   :maxdepth: 1

   dsa
   bcm_sf2
   lan9303
+3 −3
Original line number Diff line number Diff line
==============================
LAN9303 Ethernet switch driver
==============================

@@ -9,10 +10,9 @@ host master network interface (e.g. fixed link).
Driver details
==============

The driver is implemented as a DSA driver, see
Documentation/networking/dsa/dsa.txt.
The driver is implemented as a DSA driver, see ``Documentation/networking/dsa/dsa.rst``.

See Documentation/devicetree/bindings/net/dsa/lan9303.txt for device tree
See ``Documentation/devicetree/bindings/net/dsa/lan9303.txt`` for device tree
binding.

The LAN9303 can be managed both via MDIO and I2C, both supported by this driver.
+1 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ Contents:
   device_drivers/intel/i40e
   device_drivers/intel/iavf
   device_drivers/intel/ice
   dsa/index
   devlink-info-versions
   ieee802154
   kapi