summaryrefslogtreecommitdiff
path: root/drivers/net/phy/phy_device.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2020-01-03 23:13:28 +0000
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2022-01-18 10:17:17 +0000
commitd616127db70a3303fbb99b5f89f1f0ee8207a641 (patch)
tree3d7552eb19667f9c85a32ead943734bac947c9f6 /drivers/net/phy/phy_device.c
parenta656c56b4bd62971638f4fe222c4f019b8d66c66 (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/phy/phy_device.c')
-rw-r--r--drivers/net/phy/phy_device.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index 6a18b74ab373..23667658b9c6 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -2798,6 +2798,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);