net: phy: split devices_in_package
authorRussell King <rmk+kernel@armlinux.org.uk>
Thu, 18 Jun 2020 13:46:08 +0000 (14:46 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 20 Jun 2020 03:17:15 +0000 (20:17 -0700)
commit320ed3bf900075614c43499dc01db8d25717b986
treee4e04ee83eedd2d513ae8b2004108cfd401a6712
parent5ba33cf4839266f059a6e2342c005709cc6cf256
net: phy: split devices_in_package

We have two competing requirements for the devices_in_package field.
We want to use it as a bit array indicating which MMDs are present, but
we also want to know if the Clause 22 registers are present.

Since "devices in package" is a term used in the 802.3 specification,
keep this as the as-specified values read from the PHY, and introduce
a new member "mmds_present" to indicate which MMDs are actually
present in the PHY, derived from the "devices in package" value.

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy-c45.c
drivers/net/phy/phy_device.c
drivers/net/phy/phylink.c
include/linux/phy.h