Skip to content

Commit

Permalink
net: phylink: allow half-duplex modes with RATE_MATCH_PAUSE
Browse files Browse the repository at this point in the history
PHYs performing rate-matching using MAC-side flow-control always
perform duplex-matching as well in case they are supporting
half-duplex modes at all.
No longer remove half-duplex modes from their capabilities.

Suggested-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/b157c0c289cfba024039a96e635d037f9d946745.1728617993.git.daniel@makrotopia.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Daniel Golle authored and Jakub Kicinski committed Oct 15, 2024
1 parent 42386ae commit ff1585e
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions drivers/net/phy/phylink.c
Original file line number Diff line number Diff line change
Expand Up @@ -599,15 +599,8 @@ static unsigned long phylink_get_capabilities(phy_interface_t interface,
* max speed at full duplex.
*/
if (mac_capabilities &
phylink_cap_from_speed_duplex(max_speed, DUPLEX_FULL)) {
/* Although a duplex-matching phy might exist, we
* conservatively remove these modes because the MAC
* will not be aware of the half-duplex nature of the
* link.
*/
phylink_cap_from_speed_duplex(max_speed, DUPLEX_FULL))
matched_caps = GENMASK(__fls(caps), __fls(MAC_10HD));
matched_caps &= ~(MAC_1000HD | MAC_100HD | MAC_10HD);
}
break;
}
case RATE_MATCH_CRS:
Expand Down

0 comments on commit ff1585e

Please sign in to comment.