Netdev List
 help / color / mirror / Atom feed
* [PATCH v3 1/2] net: macb: Allow SGMII only if we are a GEM in mac_validate
@ 2021-10-12 19:46 Sean Anderson
  2021-10-12 19:46 ` [PATCH v3 2/2] net: macb: Clean up macb_validate Sean Anderson
  0 siblings, 1 reply; 4+ messages in thread
From: Sean Anderson @ 2021-10-12 19:46 UTC (permalink / raw)
  To: netdev, David S . Miller, Jakub Kicinski
  Cc: Claudiu Beznea, Nicolas Ferre, Antoine Tenart, Russell King,
	Sean Anderson

This aligns mac_validate with mac_config. In mac_config, SGMII is only
enabled if macb_is_gem. Validate should care if the mac is a gem as
well.

Fixes: 7897b071ac3b ("net: macb: convert to phylink")
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
---

Changes in v3:
- Order bugfix patch first

Changes in v2:
- New

 drivers/net/ethernet/cadence/macb_main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index 683f14665c2c..cb0f86544955 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -528,6 +528,7 @@ static void macb_validate(struct phylink_config *config,
 
 	if (!macb_is_gem(bp) &&
 	    (state->interface == PHY_INTERFACE_MODE_GMII ||
+	     state->interface == PHY_INTERFACE_MODE_SGMII ||
 	     phy_interface_mode_is_rgmii(state->interface))) {
 		bitmap_zero(supported, __ETHTOOL_LINK_MODE_MASK_NBITS);
 		return;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-10-14 16:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-12 19:46 [PATCH v3 1/2] net: macb: Allow SGMII only if we are a GEM in mac_validate Sean Anderson
2021-10-12 19:46 ` [PATCH v3 2/2] net: macb: Clean up macb_validate Sean Anderson
2021-10-13  8:29   ` Antoine Tenart
2021-10-14 16:01     ` Sean Anderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox