diff options
author | Russell King <rmk+kernel@armlinux.org.uk> | 2020-01-03 23:13:28 +0000 |
---|---|---|
committer | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2024-05-07 10:49:44 +0100 |
commit | 298c1dca6f7f87a1ef7b8d0a1356c81e88c45762 (patch) | |
tree | d8c7a3a42527f918079b63d10702c281287424cc /drivers/net | |
parent | 91076ef35b1ae107aa1d917e126089eec7ab2c9c (diff) |
net: phy: add resolved pause support [*not for mainline*]
Allow phylib drivers to pass the hardware-resolved pause state to MAC
drivers, rather than using the software-based pause resolution code.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/phy/phy_device.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index 0b8ccc228c2a..b467a1eda778 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c @@ -2888,6 +2888,12 @@ void phy_get_pause(struct phy_device *phydev, bool *tx_pause, bool *rx_pause) return; } + if (phydev->resolved_pause_valid) { + *tx_pause = phydev->resolved_tx_pause; + *rx_pause = phydev->resolved_rx_pause; + return; + } + return linkmode_resolve_pause(phydev->advertising, phydev->lp_advertising, tx_pause, rx_pause); |