Subject: RE: [PATCH net-next 5/6] net: txgbe: Implement phylink pcs

From: Jiawen Wu <[email-masked]>
Date: Mon, 10 Apr 2023 15:32:12 +0800

> > +				       struct phylink_link_state *state)
> > +{
> > +	int lpa, bmsr;
> > +
> > +	/* For C37 1000BASEX mode */
> > +	if (linkmode_test_bit(ETHTOOL_LINK_MODE_Autoneg_BIT,
> > +			      state->advertising)) {
> > +		/* Reset link state */
> > +		state->link = false;
> > +
> > +		/* Poll for link jitter */
> > +		read_poll_timeout(pcs_read, lpa, lpa,
> > +				  100, 50000, false, txgbe,
> > +				  MDIO_MMD_VEND2, MII_LPA);
> 
> What jitter are you referring to? If the link is down (and thus this
> register reads zero), why do we have to spin here for 50ms each time?
> 

I found that when the last interrupt arrives, the link status is often
still down, but it will become up after a while. It is about 30ms on my
test.
I can't find a good way to solve this problem at the moment, so just
delay some time.