From: Michael Walle <michael@walle.cc>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
cphealy@gmail.com, davem@davemloft.net, hkallweit1@gmail.com,
mkubecek@suse.cz, netdev@vger.kernel.org
Subject: Re: [PATCH net-next v1 0/9] Ethernet Cable test support
Date: Thu, 30 Apr 2020 23:16:15 +0200 [thread overview]
Message-ID: <efe18bc054ea6e363e7f9610be123cb1@walle.cc> (raw)
In-Reply-To: <c52e7043-cbd5-8fa0-96e6-e29e783d3a5f@gmail.com>
Am 2020-04-30 22:19, schrieb Florian Fainelli:
> On 4/30/20 1:13 PM, Michael Walle wrote:
>> Am 2020-04-30 22:04, schrieb Florian Fainelli:
>>> On 4/30/20 12:41 PM, Andrew Lunn wrote:
>>>>> ECD. The registers looks exactly like the one from the Marvell
>>>>> PHYs,
>>>>> which makes me wonder if both have the same building block or if
>>>>> one
>>>>> imitated the registers of the other. There are subtle differences
>>>>> like one bit in the broadcom PHY is "break link" and is
>>>>> self-clearing,
>>>>> while the bit on the Marvell PHY is described as "perform
>>>>> diagnostics
>>>>> on link break".
>>>>
>>>> Should we be sharing code between the two drivers?
>>>
>>> Yes, I am amazed how how identical they are, nearly on a bit level
>>> identical, the coincidence is uncanny. The expansion registers are
>>> also
>>> 0x10 - 0x15 just in the reverse order,
>>
>> At what PHY are you looking? I've just found some datasheets where
>> they
>> are at 0xC0 to 0xC5.
>
> BCM54810 because that's what I have on my desk right now, but 0x10
> would
> be the offset relative to the expansion register space, which would
> translate into this:
>
> https://github.com/ffainelli/linux/commits/broadcom-cable-tests
>
> (sorry for the mess it is a patchwork of tests on various platforms,
> based on an earlier branch from Andrew).
Ah thanks, now I see what you mean with CD vs ECD. In your latest WIP
you're using ECD, so did both actually work with a link?
Also according to you header files bit 14 of the ECD_CTRL is the
"run after aneg bit"; in the BCM54140 it is just marked as reserved.
I guess I'm trying the CD on the BCM54140 tomorrow.
-michael
>
>>
>>> you know, so as to make it not
>>> too obvious this looks about the same ;) I wonder if we managed to
>>> find
>>> something here.
>>>
>>>>
>>>>> What do you mean by calibrate it?
>>>>
>>>> Some of the Marvell documentation talks about calibrating for losses
>>>> on the PCB. Run a diagnostics with no cable plugged in, and get the
>>>> cable length to the 'fault'. This gives you the distance to the RJ45
>>>> socket. You should then subtract that from all subsequent results.
>>>> But since this is board design specific, i decided to ignore it. I
>>>> suppose it could be stuffed into a DT property, but i got the
>>>> feeling
>>>> it is not worth it, given the measurement granularity of 80cm.
>>>
>>> OK, accuracy is different here, they are said to be +/- 5m accurate
>>> for
>>> cable faults and +/- 10m accurate for good cables.
>>
>> Accuracy != granularity. But yes, if one digit correspond to 80cm it
>> doesn't really make sense to remove the PCB trace error if you assume
>> that it might add just one digit at most.
>
> One of the test racks that I use has very short cables, but I guess it
> does not matter if they get reported as 80cm or 160cm...
prev parent reply other threads:[~2020-04-30 21:16 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-25 18:06 [PATCH net-next v1 0/9] Ethernet Cable test support Andrew Lunn
2020-04-25 18:06 ` [PATCH net-next v1 1/9] net: phy: Add cable test support to state machine Andrew Lunn
2020-04-26 19:46 ` Michal Kubecek
2020-04-26 20:31 ` Andrew Lunn
2020-04-26 21:22 ` Florian Fainelli
2020-04-25 18:06 ` [PATCH net-next v1 2/9] net: phy: Add support for polling cable test Andrew Lunn
2020-04-25 19:49 ` Florian Fainelli
2020-04-25 20:10 ` Andrew Lunn
2020-04-26 21:19 ` Florian Fainelli
2020-04-26 22:07 ` Andrew Lunn
2020-04-25 18:06 ` [PATCH net-next v1 3/9] net: ethtool: netlink: Add support for triggering a " Andrew Lunn
2020-04-26 19:36 ` Michal Kubecek
2020-04-26 20:38 ` Andrew Lunn
2020-04-26 20:50 ` Michal Kubecek
2020-04-25 18:06 ` [PATCH net-next v1 4/9] net: ethtool: Add attributes for cable test reports Andrew Lunn
2020-04-25 20:00 ` Randy Dunlap
2020-04-26 20:25 ` Michal Kubecek
2020-04-26 21:12 ` Andrew Lunn
2020-04-27 7:13 ` Michal Kubecek
2020-04-29 16:16 ` Michael Walle
2020-04-29 18:57 ` Andrew Lunn
2020-04-29 18:58 ` Florian Fainelli
2020-04-29 19:32 ` Michael Walle
2020-04-25 18:06 ` [PATCH net-next v1 5/9] net: ethtool: Make helpers public Andrew Lunn
2020-04-25 18:06 ` [PATCH net-next v1 6/9] net: ethtool: Add infrastructure for reporting cable test results Andrew Lunn
2020-04-25 18:06 ` [PATCH net-next v1 7/9] net: ethtool: Add helpers for reporting " Andrew Lunn
2020-04-25 18:06 ` [PATCH net-next v1 8/9] net: phy: marvell: Add cable test support Andrew Lunn
2020-04-25 18:06 ` [PATCH net-next v1 9/9] net: phy: Put interface into oper testing during cable test Andrew Lunn
2020-04-29 16:02 ` [PATCH net-next v1 0/9] Ethernet Cable test support Michael Walle
2020-04-29 16:32 ` Andrew Lunn
2020-04-30 17:48 ` Michael Walle
2020-04-30 18:23 ` Andrew Lunn
2020-04-30 19:44 ` Michael Walle
2020-04-30 20:51 ` Andrew Lunn
2020-04-30 18:34 ` Florian Fainelli
2020-04-30 19:31 ` Michael Walle
2020-04-30 19:38 ` Florian Fainelli
2020-04-30 19:52 ` Michael Walle
2020-04-30 19:41 ` Andrew Lunn
2020-04-30 20:01 ` Michael Walle
2020-04-30 20:56 ` Andrew Lunn
2020-04-30 20:04 ` Florian Fainelli
2020-04-30 20:13 ` Michael Walle
2020-04-30 20:19 ` Florian Fainelli
2020-04-30 21:16 ` Michael Walle [this message]
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=efe18bc054ea6e363e7f9610be123cb1@walle.cc \
--to=michael@walle.cc \
--cc=andrew@lunn.ch \
--cc=cphealy@gmail.com \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=mkubecek@suse.cz \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).