Skip to content

Commit 3f4a09a

Browse files
committed
FROMLIST: net: phy: qcom: qca808x: Add .get_rate_matching support
Add support for rate matching to the QCA8081 PHY driver to correctly report its capabilities. Some boards[0][1] with this PHY currently report support only for 2.5G. Implement the .get_rate_matching callback to allow phylink to determine the actual PHY capabilities and report them accurately. Before: # ethtool eth0 Settings for eth0: Supported ports: [ ] Supported link modes: 2500baseT/Full Supported pause frame use: Symmetric Receive-only ... After: # ethtool eth0 Settings for eth0: Supported ports: [ ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full 2500baseT/Full Supported pause frame use: Symmetric Receive-only ... [0] https://lore.kernel.org/all/20250905192350.1223812-3-umang.chheda@oss.qualcomm.com/ [1] https://lore.kernel.org/all/20250908-lemans-evk-bu-v4-12-5c319c696a7d@oss.qualcomm.com/ (cherry picked from commit d02d173) Link: https://lore.kernel.org/netdev/20250914-qca808x_rate_match-v1-1-0f9e6a331c3b@oss.qualcomm.com/ Signed-off-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
1 parent 4060836 commit 3f4a09a

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

drivers/net/phy/qcom/qca808x.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,15 @@ static void qca808x_get_phy_stats(struct phy_device *phydev,
643643
qcom_phy_get_stats(stats, priv->hw_stats);
644644
}
645645

646+
static int qca808x_get_rate_matching(struct phy_device *phydev,
647+
phy_interface_t iface)
648+
{
649+
if (iface == PHY_INTERFACE_MODE_2500BASEX)
650+
return RATE_MATCH_PAUSE;
651+
652+
return RATE_MATCH_NONE;
653+
}
654+
646655
static struct phy_driver qca808x_driver[] = {
647656
{
648657
/* Qualcomm QCA8081 */
@@ -674,6 +683,7 @@ static struct phy_driver qca808x_driver[] = {
674683
.led_polarity_set = qca808x_led_polarity_set,
675684
.update_stats = qca808x_update_stats,
676685
.get_phy_stats = qca808x_get_phy_stats,
686+
.get_rate_matching = qca808x_get_rate_matching,
677687
}, };
678688

679689
module_phy_driver(qca808x_driver);

0 commit comments

Comments
 (0)