diff options
author | David S. Miller | 2017-03-22 12:43:01 -0700 |
---|---|---|
committer | David S. Miller | 2017-03-22 12:43:01 -0700 |
commit | 276a74d835fb0c2ee82831106b4e737421df91ae (patch) | |
tree | 2ba4ab3ac61887efe165a67bc58b5ef8d073d0e6 /net | |
parent | 2d72d5016f00fc7d64b95e79405787dea73669af (diff) | |
parent | 060fbc894bf9ac8a226d63c5b0c8059a527155e2 (diff) |
Merge branch 'phy-mmd-cleanup'
Russell King says:
====================
Clean up PHY MMD accessors
This series cleans up phylib's MMD accessors, so that we have a common
way of accessing the Clause 45 register set.
The current situation is far from ideal - we have phy_(read|write)_mmd()
which accesses Clause 45 registers over Clause 45 accesses, and we have
phy_(read|write)_mmd_indirect(), which accesses Clause 45 registers via
Clause 22 register 13/14.
Generic code uses the indirect methods to access standard Clause 45
features, and when we come to add Clause 45 PHY support to phylib, we
would need to make these conditional upon the PHY type, or duplicate
these functions.
An alternative solution is to merge these accessors together, and select
the appropriate access method depending upon the 802.3 clause that the
PHY conforms with. The result is that we have a single set of
phy_(read|write)_mmd() accessors.
For cases which require special handling, we still allow PHY drivers to
override all MMD accesses - except rather than just overriding the
indirect accesses. This keeps existing overrides working.
Combining the two also has another beneficial side effect - we get rid
of similar functions that take arguments in different orders. The
old direct accessors took the phy structure, devad and register number,
whereas the indirect accessors took the phy structure, register number
and devad in that order. Care must be taken when updating future
drivers that the argument order is correct, and the function name is
not merely replaced.
This patch set is against net-next.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions