OSDN Git Service

Merge branch 'mtk_eth_soc-refactoring-and-clause45'
authorDavid S. Miller <davem@davemloft.net>
Wed, 5 Jan 2022 11:22:17 +0000 (11:22 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 5 Jan 2022 11:22:17 +0000 (11:22 +0000)
commit2a5ab39beb277528d58cac609c0862f8a6c231d3
tree7f5e3fd981fd9eb14bdc722d5aad7ca4ef05d7c9
parentffd32ea6b13c97904cae59bdb13a843d52756578
parente2e7f6e29c99a1c6afc0e0aa4b9ea80302d28720
Merge branch 'mtk_eth_soc-refactoring-and-clause45'

Daniel Golle says:

====================
net: ethernet: mtk_eth_soc: refactoring and Clause 45

Rework 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, using newly
introduced helper inline functions added by a patch Russell King has
suggested in a reply to an earlier version of this series [1].

All three 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.

[1]: https://lore.kernel.org/netdev/Ycr5Cna76eg2B0An@shell.armlinux.org.uk/

v11: also address return value of mtk_mdio_busy_wait
v10: correct order of SoB lines in 2/3, change patch order in series
v9: improved formatting and Cc missing maintainer
v8: add patch from Russel King, switch to bitfield helper macros
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.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>