]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: prepare phylib to deal with PHY's extending Clause 22
authorHeiner Kallweit <hkallweit1@gmail.com>
Fri, 9 Aug 2019 18:43:50 +0000 (20:43 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 12 Aug 2019 04:24:32 +0000 (21:24 -0700)
commit33482834e988888dfa4fbd461bedc53ad5436f0e
tree943918e8d6d99d2ad989d17e8ff790c668c279ac
parent58424fd0276250bd96d2449b556a593a88e4c2ec
net: phy: prepare phylib to deal with PHY's extending Clause 22

The integrated PHY in 2.5Gbps chip RTL8125 is the first (known to me)
PHY that uses standard Clause 22 for all modes up to 1Gbps and adds
2.5Gbps control using vendor-specific registers. To use phylib for
the standard part little extensions are needed:
- Move most of genphy_config_aneg to a new function
  __genphy_config_aneg that takes a parameter whether restarting
  auto-negotiation is needed (depending on whether content of
  vendor-specific advertisement register changed).
- Don't clear phydev->lp_advertising in genphy_read_status so that
  we can set non-C22 mode flags before.

Basically both changes mimic the behavior of the equivalent Clause 45
functions.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy_device.c
include/linux/phy.h