Skip to content

net: ethernet: mtk_soc_eth: implement Clause 45 MDIO access

Daniel Golle linux-arm-kernel linux-mediatek lkml netdev 7 versions – In review

Get series with b4
b4 am Ycpj/[email protected]

Versions newest first · linked by author and title

  1. v7 Latest2 patches 4 repliesIn review
  2. v62 patches 0 repliesSuperseded
  3. v52 patches 0 repliesSuperseded
Earlier versions · 4
VersionPostedPatchesRepliesStatus
v42 patches0 repliesSuperseded
v31 patch1 replySuperseded
v21 patch0 repliesSuperseded
v11 patch3 repliesSuperseded

Patches in v7 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2net: ethernet: mtk_eth_soc: fix return value of MDIO opsdrivers/net/ethernet/mediatek/mtk_eth_soc.c+9 -130 replies
2/2net: ethernet: mtk_eth_soc: implement Clause 45 MDIO accessdrivers/net/ethernet/mediatek/mtk_eth_soc.c drivers/net/ethernet/mediatek/mtk_eth_soc.h+50 -819 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchDaniel GolleAndrew Lunn
1/2
2/2T-b T-b T-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v7 thread

Cover letter [PATCH v7 0/2] net: ethernet: mtk_soc_eth: implement Clause 45 MDIO access

As it turned out some clean-up would be needed, first address return value and type of mdio read and write functions in mtk_eth_soc and generally clean up and unify both functions.
Then add support to access Clause 45 phy registers.

Both commits are tested on the Bananapi BPi-R64 board having MediaTek MT7531BE DSA gigE switch using clause 22 MDIO and Ubiquiti UniFi 6 LR access point having Aquantia AQR112C PHY using clause 45 MDIO.

v7: remove unneeded variables and order OR-ed call parameters
v6: further clean up functions and more cleanly separate patches
v5: fix wrong variable name in first patch covered by follow-up patch
v4: clean-up return values and types, split into two commits
v3: return -1 instead of 0xffff on error in _mtk_mdio_write
v2: use MII_DEVADDR_C45_SHIFT and MII_REGADDR_C45_MASK to extract
device id and register address. Unify read and write functions to have identical types and parameter names where possible as we are anyway already replacing both function bodies.

Daniel Golle (2):
net: ethernet: mtk_eth_soc: fix return value of MDIO ops
net: ethernet: mtk_eth_soc: implement Clause 45 MDIO access

 drivers/net/ethernet/mediatek/mtk_eth_soc.c | 75 +++++++++++++++------
 drivers/net/ethernet/mediatek/mtk_eth_soc.h |  3 +
 2 files changed, 58 insertions(+), 20 deletions(-)
Signature · 1 line
2.34.1