Message ID | 1580137671-22081-2-git-send-email-madalin.bucur@oss.nxp.com |
---|---|
State | Changes Requested |
Delegated to: | David Miller |
Headers | show |
Series | net: phy: aquantia: indicate rate adaptation | expand |
diff --git a/drivers/net/phy/aquantia_main.c b/drivers/net/phy/aquantia_main.c index 975789d9349d..36fdd523b758 100644 --- a/drivers/net/phy/aquantia_main.c +++ b/drivers/net/phy/aquantia_main.c @@ -209,6 +209,9 @@ static int aqr_config_aneg(struct phy_device *phydev) u16 reg; int ret; + /* add here as this is called for all devices */ + phydev->rate_adaptation = 1; + if (phydev->autoneg == AUTONEG_DISABLE) return genphy_c45_pma_setup_forced(phydev); diff --git a/include/linux/phy.h b/include/linux/phy.h index dd4a91f1feaa..2a5c202333fc 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -387,6 +387,9 @@ struct phy_device { /* Interrupts are enabled */ unsigned interrupts:1; + /* Rate adaptation in the PHY */ + unsigned rate_adaptation:1; + enum phy_state state; u32 dev_flags;
Some PHYs are able to perform rate adaptation between the system interface and the line interfaces. When such a PHY is deployed, the ethernet driver should not limit the modes supported or advertised by the PHY. This patch introduces the bit that allows checking for this feature in the phy_device structure and its use for the Aquantia PHYs that have this capability. Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com> --- drivers/net/phy/aquantia_main.c | 3 +++ include/linux/phy.h | 3 +++ 2 files changed, 6 insertions(+)