Skip to content

net: dsa: realtek: MDIO interface and RTL8367S,RTL8367RB-VB

Luiz Angelo Daros de Luca netdev 4 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (master)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest13 patches 6 repliesApplied 13/13
  2. v511 patches 0 repliesSuperseded
  3. v411 patches 76 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v311 patches6 repliesSuperseded

Patches in v6 All 13 applied

#Subject and filesSizeRepliesApplied
1/13net: dsa: realtek-smi: fix kdoc warningsdrivers/net/dsa/realtek-smi-core.h drivers/net/dsa/rtl8366rb.c+4 -21 replyApplied
2/13net: dsa: realtek-smi: move to subdirectoryMAINTAINERS drivers/net/dsa/Kconfig drivers/net/dsa/Makefile +7 more+26 -150 repliesApplied
3/13net: dsa: realtek: rename realtek_smi to realtek_privdrivers/net/dsa/realtek/realtek-smi-core.c drivers/net/dsa/realtek/realtek.h drivers/net/dsa/realtek/rtl8365mb.c +2 more+672 -6720 repliesApplied
4/13net: dsa: realtek: remove direct calls to realtek-smidrivers/net/dsa/realtek/realtek-smi-core.c drivers/net/dsa/realtek/realtek.h drivers/net/dsa/realtek/rtl8365mb.c +1 more+27 -250 repliesApplied
5/13net: dsa: realtek: convert subdrivers into modulesdrivers/net/dsa/realtek/Kconfig drivers/net/dsa/realtek/Makefile drivers/net/dsa/realtek/realtek-smi.c +3 more+35 -33 repliesApplied
6/13net: dsa: realtek: add new mdio interface for driversdrivers/net/dsa/realtek/Kconfig drivers/net/dsa/realtek/Makefile drivers/net/dsa/realtek/realtek-mdio.c +4 more+317 -80 repliesApplied
7/13net: dsa: realtek: rtl8365mb: rename extport to extintdrivers/net/dsa/realtek/rtl8365mb.c+76 -480 repliesApplied
8/13net: dsa: realtek: rtl8365mb: use GENMASK(n-1,0) instead of BIT(n)-1drivers/net/dsa/realtek/rtl8365mb.c+1 -10 repliesApplied
9/13net: dsa: realtek: rtl8365mb: use DSA CPU portdrivers/net/dsa/realtek/rtl8365mb.c+14 -90 repliesApplied
10/13net: dsa: realtek: rtl8365mb: add RTL8367S supportdrivers/net/dsa/realtek/Kconfig drivers/net/dsa/realtek/realtek-mdio.c drivers/net/dsa/realtek/realtek-smi.c +1 more+37 -120 repliesApplied
11/13net: dsa: realtek: rtl8365mb: add RTL8367RB-VB supportdrivers/net/dsa/realtek/rtl8365mb.c+8 -02 repliesApplied
12/13net: dsa: realtek: rtl8365mb: allow non-cpu extint portsdrivers/net/dsa/realtek/rtl8365mb.c+26 -350 repliesApplied
13/13net: dsa: realtek: rtl8365mb: fix trap_door > 7drivers/net/dsa/realtek/rtl8365mb.c+2 -20 repliesApplied

Reviews trailers per patch

8 of 13 patches have a Reviewed-by or Acked-by.

PatchArınç ÜNALAlvin ŠipragaLinus WalleijFlorian FainelliVladimir Oltean
1/13R-b
2/13T-b R-b R-b R-b R-b
3/13T-b R-b R-b R-b R-b
4/13R-b R-b R-b
5/13T-b R-b R-b R-b
6/13T-b
7/13
8/13T-b R-b R-b R-b
9/13T-b R-b R-b
10/13T-b R-b R-b
11/13
12/13
13/13

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v6 thread

Cover letter [PATCH net-next v6 00/13] net: dsa: realtek: MDIO interface and RTL8367S,RTL8367RB-VB

The old realtek-smi driver was linking subdrivers into a single realtek-smi.ko After this series, each subdriver will be an independent module required by either realtek-smi (platform driver) or the new realtek-mdio (mdio driver). Both interface drivers (SMI or MDIO) are independent, and they might even work side-by-side, although it will be difficult to find such device. The subdriver can be individually selected but only at buildtime, saving some storage space for custom embedded systems.

Existing realtek-smi devices continue to work untouched during the tests. The realtek-smi was moved into a realtek subdirectory, but it normally does not break things.

I couldn't identify a fixed relation between port numbers (0..9) and external interfaces (0..2), and I'm not sure if it is fixed for each chip version or a device configuration. Until there is more info about it, there is a new port property "realtek,ext-int" that can inform the external interface.

The rtl8365mb might now handle multiple CPU ports and extint ports not used as CPU ports. RTL8367S has an SGMII external interface, but my test device (TP-Link Archer C5v4) uses only the second RGMII interface. We need a test device with more external ports to test these features. The driver still cannot handle SGMII ports.

RTL8367RB-VB support was added using information from Frank Wunderlich <[email protected]> but I didn't test it myself.

The rtl8365mb was tested with a MDIO-connected RTL8367S (TP-Link Acher C5v4) and a SMI-connected RTL8365MB-VC switch (Asus RT-AC88U)

The rtl8366rb subdriver was not tested with this patch series, but it was only slightly touched. It would be nice to test it, especially in an MDIO-connected switch.

Best,

Luiz

Changelog:

v1-v2)
- formatting fixes
- dropped the rtl8365mb->rtl8367c rename
- other suggestions

v2-v3)
* realtek-mdio.c:
- cleanup realtek-mdio.c (BUG_ON, comments and includes)
- check devm_regmap_init return code
- removed realtek,rtl8366s string from realtek-mdio
* realtek-smi.c:
- removed void* type cast
* rtl8365mb.c:
- using macros to identify EXT interfaces
- rename some extra extport->extint cases
- allow extint as non cpu (not tested)
- allow multple cpu ports (not tested)
- dropped cpu info from struct rtl8365mb
* dropped dt-bindings changes (dealing outside this series)
* formatting issues fixed

v3-v4)
* fix cover message numbering 0/13 -> 0/11
* use static for realtek_mdio_read_reg
- Reported-by: kernel test robot <[email protected]>
* use dsa_switch_for_each_cpu_port
* mention realtek_smi_{variant,ops} to realtek_{variant,ops} in commit message

v5) sent again v4 branch. Sorry

v4-v6)
- added support for RTL8367RB-VB
- cleanup mdio_{read,write}, removing misterious START_OP, checking and returning errors
- renamed priv->phy_id to priv->mdio_addr
- duplicated priv->ds_ops into ds_ops_{smi,mdio}. ds_ops_smi must not set
phy_read or else both dsa and this driver might free slave_mii.
Dropped
401fd75c92f37
- Map port to extint using code instead of device-tree property. Added comment
about port number, port description and external interfaces. Dropped 'realtek,ext-int' device-tree property
- Redacted the non-cpu ext port commit message, not highlighting the possibility of using multiple CPU ports as it was just a byproduct.
- In a possible case of multiple cpu ports, use the first one as the trap port.
Dropped 'realtek,trap-port' device-tree property
- Some formatting fixes
- BUG: rtl8365mb_phy_mode_supported was still checking for a cpu port and not
an external interface
- BUG: fix trapdoor masking for port>7. Got a compiler error with a bigger
constant value
- WARN: completed kdoc for rtl8366rb_drop_untagged()
- WARN: removed marks from incomplete kdoc