From: John Rama <john.rama01@gmail.com>
To: Florian Fainelli <f.fainelli@gmail.com>,
netdev@vger.kernel.org, Andrew Lunn <andrew@lunn.ch>,
Vivien Didelot <vivien.didelot@gmail.com>
Subject: Re: DSA: external phy address and port number of switch conflicts
Date: Tue, 18 Dec 2018 13:55:50 -0500 [thread overview]
Message-ID: <5C1942B6.8090506@gmail.com> (raw)
In-Reply-To: <631866cf-f419-68ac-3519-d090f0096ca0@gmail.com>
Hi Florian,
On 2018/12/17 18:03, Florian Fainelli wrote:
> On 12/17/18 2:55 PM, John Rama wrote:
>> Hi, Andrew, Florian and Viven
>>
>> thank you your feedback !!
>>
>>>> I would recommend checking a newer kernel anyway which would have
>>>> support for the mv88e6xxx internal MDIO bus as it might allow you to
>>>> solve that specific problem. A kernel that contains
>>>> a3c53be55c955b7150cda17874c3fcb4eeb97a89 ("net: dsa: mv88e6xxx: Support
>>>> multiple MDIO busses") might work better and actually help here, though
>>>> I don't know enough about that specific switch model, Andrew or Vivien
>>>> would.
>>>>
>>>>>
>>
>> I tried with kernel 4.9.0, and confirmed that same problem happens.
>> (I wanted to try more latest one, but newer version is using phylink,
>> which I need couple of time to understand how it works)
>> I think this is not the driver side issue, maybe dsa side (but not sure for newer kernel)
>> or I misunderstanding some concept.
>>
>>> Since you have the switch in single address mode, i don't see why this
>>> should not work.
>>
>> Why conflicts happens is because of the code at slave.c (@kernel 4.9.0)
>>
>> /* pseudo code */
>> dsa_slave_phy_setup() {
>> phy_dn = of_parse_phandle(port_dn, "phy-handle", 0);
>> if (phy_dn) {
>> phy_id = of_mdio_parse_addr(&slave_dev->dev, phy_dn);
>> dsa_slave_phy_connect(p, slave_dev, phy_id); <= register with phy_id
>> }
>> if (!p->phy) {
>> dsa_slave_phy_connect(p, slave_dev, p->port); <= register with port number
>> }
>> }
>
> That was later fixed with this commit:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=399ba77a94e1ee01f747b168c429a121164ac962
>
> can you try to backport that change and see if that helps?
>
Yes, that's the one !!
I confirmed that the problem is solved by backporting this patch to both kernel 4.9.0 and 4.1.15.
Thanks a lot.
John
next prev parent reply other threads:[~2018-12-18 18:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-14 0:12 DSA: external phy address and port number of switch conflicts John Rama
2018-12-14 5:08 ` Florian Fainelli
2018-12-17 22:55 ` John Rama
2018-12-17 23:03 ` Florian Fainelli
2018-12-18 18:55 ` John Rama [this message]
2018-12-14 8:38 ` Andrew Lunn
2018-12-14 16:24 ` Vivien Didelot
2018-12-14 16:31 ` John Rama
-- strict thread matches above, loose matches on Subject: below --
2018-12-13 23:51 John Rama
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=5C1942B6.8090506@gmail.com \
--to=john.rama01@gmail.com \
--cc=andrew@lunn.ch \
--cc=f.fainelli@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=vivien.didelot@gmail.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).