Subject: Re: [PATCH net-next v1 0/9] Ethernet Cable test support

From: Andrew Lunn <[email-masked]>
Date: Thu, 30 Apr 2020 22:51:00 +0200

On Thu, Apr 30, 2020 at 09:44:12PM +0200, Michael Walle wrote:
> Am 2020-04-30 20:23, schrieb Andrew Lunn:
> > > Ok. I do have one problem. TDR works fine for the AR8031 and the
> > > BCM54140 as long as there is no link partner, i.e. open cable,
> > > shorted pairs etc. But as soon as there is a link partner and a
> > > link, both PHYs return garbage. As far as I understand TDR, there
> > > must not be a link, correct?
> > 
> > Correct.
> > 
> > The Marvell PHY will down the link and then wait 1.5 seconds before
> > starting TDR, if you set a bit. I _think_ it downs the link by turning
> > off autoneg.
> 
> According to the Atheros datasheet the "CDT can be performed when
> there is no link partner or when the link partner is auto-negotiating".
> One could interpret that as is is only allowed _during_ autoneg. But
> as far as I know there is no indication if autoneg is currently active,
> is it?
> 
> > Maybe there is some hints in 802.3 clause 22?
> 
> I'm just skimming over that, but even if the link could be disabled
> locally, shouldn't there still be link pulses from the peer?

I guessing here....

If the local end stops negotiating, the link peer will stop sending
traffic, and just sends link pulses. The PHY knows when the next set of
link pulses are expected from the link partner, since they should be
every 16ms. It can then avoid them when doing its TDR.

      Andrew