Netdev List
 help / color / mirror / Atom feed
From: Nathan Whitehorn <nwhitehorn@pa.msu.edu>
To: netdev@vger.kernel.org
Cc: theo.lebrun@bootlin.com, conor.dooley@microchip.com,
	charles.perry@microchip.com, andrew@lunn.ch,
	Nathan Whitehorn <nwhitehorn@pa.msu.edu>
Subject: [PATCH net-next v4 1/2] net: macb: Poll for link state changes when using the internal PCS.
Date: Fri,  7 Aug 2026 16:07:46 -0400	[thread overview]
Message-ID: <20260807201741.3275-2-nwhitehorn@pa.msu.edu> (raw)
In-Reply-To: <20260807201741.3275-1-nwhitehorn@pa.msu.edu>

When used with an offboard transceiver (e.g. an SFP), link state needs
to be measured at the PCS rather than an onboard PHY. Poll the link
state when the PCS is active to allow the kernel to detect link state
changes in this case.

Signed-off-by: Nathan Whitehorn <nwhitehorn@pa.msu.edu>
Reviewed-by: Théo Lebrun <theo.lebrun@bootlin.com>
---
 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 d394f1f43b68..c15a9c7e69d3 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -1025,6 +1025,7 @@ static int macb_mii_probe(struct net_device *dev)
 	struct macb *bp = netdev_priv(dev);
 
 	bp->phylink_sgmii_pcs.ops = &macb_phylink_pcs_ops;
+	bp->phylink_sgmii_pcs.poll = true;
 	bp->phylink_usx_pcs.ops = &macb_phylink_usx_pcs_ops;
 
 	bp->phylink_config.dev = &dev->dev;
-- 
2.34.1


  reply	other threads:[~2026-08-07 20:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-07 20:07 [PATCH net-next v4 0/2] net: macb: 1000BASE-X on internal PCS Nathan Whitehorn
2026-08-07 20:07 ` Nathan Whitehorn [this message]
2026-08-12  1:54   ` [PATCH net-next v4 1/2] net: macb: Poll for link state changes when using the " Jakub Kicinski
2026-08-12  2:48     ` Nathan Whitehorn
2026-08-07 20:07 ` [PATCH net-next v4 2/2] net: macb: add support for 1000BASE-X autonegotiation to PCS Nathan Whitehorn
2026-08-12  1:54   ` Jakub Kicinski
2026-08-12  2:58     ` Nathan Whitehorn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260807201741.3275-2-nwhitehorn@pa.msu.edu \
    --to=nwhitehorn@pa.msu.edu \
    --cc=andrew@lunn.ch \
    --cc=charles.perry@microchip.com \
    --cc=conor.dooley@microchip.com \
    --cc=netdev@vger.kernel.org \
    --cc=theo.lebrun@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox