diff options
author | Russell King <rmk+kernel@armlinux.org.uk> | 2020-01-03 23:13:28 +0000 |
---|---|---|
committer | Russell King <rmk+kernel@armlinux.org.uk> | 2020-04-16 23:03:28 +0100 |
commit | f18575f16cc70d23151f5a4bf0472707effda411 (patch) | |
tree | 947eaa20ab26b29f84ed67fffc1361a1333e01c4 /drivers | |
parent | 5d049325c0a7ecd6582fce75f20a336d978c4b1d (diff) |
net: phy: add resolved pause support
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')
-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 022fcc8e7b6f..7175889cd9dd 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c @@ -2419,6 +2419,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); |