From: Christian Lamparter <chunkeey@gmail.com>
To: Marek Behun <marek.behun@nic.cz>
Cc: "Florian Fainelli" <f.fainelli@gmail.com>,
netdev@vger.kernel.org, "Andrew Lunn" <andrew@lunn.ch>,
"Michal Vokáč" <vokac.m@gmail.com>,
"John Crispin" <john@phrozen.org>,
"Wei Yongjun" <weiyongjun1@huawei.com>
Subject: Re: [PATCH net-next 1/1] net: dsa: qca8k: Fix internal PHY MDIO address
Date: Thu, 21 Mar 2019 23:24:13 +0100 [thread overview]
Message-ID: <2275278.j5OWp99DLc@debian64> (raw)
In-Reply-To: <20190321205555.358eaaee@nic.cz>
(Bottom post?)
On Thursday, March 21, 2019 8:55:55 PM CET Marek Behun wrote:
> Hi,
>
> Oh, I didn't know about Christian's patch.
>
> I shall test on our device tomorrow. If it works, we will use internal
> PHY access.
>
> But I think that qca8k_port_to_phy should be used in the external mode
> as well. On our device the PHYs are mapped on 0-4 on the master bus even
> in that mode.
Hm, it's not really a "external mode". But let's try one more time. The
idea is that if an external mdio-bus (from the SoC) has already registered
the PHY 0x0 - 0x4 from the QCA8337, the qca8k should not expose the same
PHYs as it's own mdio-bus because then the PHYs end up being registered twice.
If you look at the mdio-bus communications during boot you can definitly see
the funkyness: every PHY gets initialized twice. You can also see this
"duplication" in /sys/class/mdio_bus. In this directory you'll have a mdio-bus
from the SoC and another one dsa-0:0 from the qca8k. If you look into those
you'll notice that their both the same.
As for why this happend. I think I found the culprit in a "missed"
requirement from one of Andrew Lunn's reponses to the initial qca8k patch:
<https://lore.kernel.org/patchwork/patch/715974/#902734>
In this post, he described the Device-Tree dts configuration we use today.
But at the end he requests:
"and remove the phy_read() and phy_write() functions."
But from what I can tell, this important bit of information was lost
during the night. Because they show up in v2+:
https://lore.kernel.org/patchwork/patch/716989/
(So I guess I have to add Fixes: to my patch as well)
Cheers,
Christian
next prev parent reply other threads:[~2019-03-21 22:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-21 18:23 [PATCH net-next 1/1] net: dsa: qca8k: Fix internal PHY MDIO address Marek Behún
2019-03-21 18:26 ` Florian Fainelli
2019-03-21 19:55 ` Marek Behun
2019-03-21 22:24 ` Christian Lamparter [this message]
2019-03-21 23:01 ` Marek Behun
2019-03-22 0:05 ` Christian Lamparter
2019-03-25 17:51 ` Christian Lamparter
2019-03-25 19:34 ` Marek Behun
2019-03-21 19:56 ` Christian Lamparter
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=2275278.j5OWp99DLc@debian64 \
--to=chunkeey@gmail.com \
--cc=andrew@lunn.ch \
--cc=f.fainelli@gmail.com \
--cc=john@phrozen.org \
--cc=marek.behun@nic.cz \
--cc=netdev@vger.kernel.org \
--cc=vokac.m@gmail.com \
--cc=weiyongjun1@huawei.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;
as well as URLs for NNTP newsgroup(s).