]> git.baikalelectronics.ru Git - kernel.git/commit
Merge branch 'dsa-mv88e6xxx-phylink_generic_validate'
authorDavid S. Miller <davem@davemloft.net>
Thu, 3 Feb 2022 14:10:35 +0000 (14:10 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Feb 2022 14:10:35 +0000 (14:10 +0000)
commit5453ea5ba20c7f91bcff1b9ff1b366e18732505b
treefd8810c53c7092e8041844ee6255d7bd51c32fc7
parentdf33f2578337d4ee825c4afd96c050d95d195ac4
parentd00879fc91f0f4b759d68eed6bbd65736fc5d459
Merge branch 'dsa-mv88e6xxx-phylink_generic_validate'

Russell King says:

====================
net: dsa: mv88e6xxx: convert to phylink_generic_validate()

The overall objective of this series is to convert the mv88e6xxx DSA
driver to use phylink_generic_validate().

Patch 1 adds a new helper mv88e6352_g2_scratch_port_has_serdes() which
indicates whether an 88e6352 port has a serdes associated with it. This
is necessary as ports 4 and 5 will normally be in automedia mode, where
the CMODE field in the port status register will change e.g. between 15
(internal PHY) and 9 (1000base-X) depending on whether the serdes has
link.

The existing code caches the cmode field, and depending whether the
serdes has link at probe time, determines whether we allow things such
as the serdes statistics to be accessed. This means if the link isn't
up at probe time, the serdes is essentially unavailable.

Patch 1 addresses this by reading the pin configuration to find out
whether the serdes is attached to port 4 or port 5.

Patch 2 is a joint effort between myself and Marek BehĂșn, adding the
supported interfaces and MAC capabilities to all mv88e6xxx supported
switch devices. This is slightly more restrictive than the original
code as we didn't used to care too much about the interface mode, but
with this we do - which is why we must know if there's a serdes
associated now.

Patch 3 switches mv88e6xxx to use the generic validation by removing
the initialisation of the phylink_validate pointer in the dsa_ops
struct.

Patch 4 updates the statistics code to use the new helper in patch 1,
so the serdes statistics are available even if the link was down at
driver probe time.
====================

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