From: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>
To: "olteanv@gmail.com" <olteanv@gmail.com>
Cc: "andrew@lunn.ch" <andrew@lunn.ch>,
"davem@davemloft.net" <davem@davemloft.net>,
"fido_max@inbox.ru" <fido_max@inbox.ru>,
"vivien.didelot@gmail.com" <vivien.didelot@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"madalin.bucur@oss.nxp.com" <madalin.bucur@oss.nxp.com>,
"f.fainelli@gmail.com" <f.fainelli@gmail.com>
Subject: Re: [PATCH net 2/2] dpaa_eth: fix usage as DSA master, try 4
Date: Tue, 16 Jun 2020 15:15:16 +0000 [thread overview]
Message-ID: <ccd7c203fe1bd9a16dfc47394d8ff565548fa673.camel@infinera.com> (raw)
In-Reply-To: <CA+h21hq6iA0H25tHs=_EFNW9BVJBYMjkVGb8_hi82Gm=ei8Vdg@mail.gmail.com>
On Tue, 2020-06-16 at 18:12 +0300, Vladimir Oltean wrote:
> On Tue, 16 Jun 2020 at 18:08, Vladimir Oltean <olteanv@gmail.com> wrote:
> > On Tue, 16 Jun 2020 at 18:04, Joakim Tjernlund
> > <Joakim.Tjernlund@infinera.com> wrote:
> > > On Tue, 2020-06-16 at 17:56 +0300, Vladimir Oltean wrote:
> > > > CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
> > > >
> > > >
> > > > Hi Joakim,
> > > >
> > > > On Tue, 16 Jun 2020 at 17:51, Joakim Tjernlund
> > > > <Joakim.Tjernlund@infinera.com> wrote:
> > > > > On Tue, 2020-06-16 at 17:41 +0300, Vladimir Oltean wrote:
> > > > > > From: Vladimir Oltean <vladimir.oltean@nxp.com>
> > > > > >
> > > > > > The dpaa-eth driver probes on compatible string for the MAC node, and
> > > > > > the fman/mac.c driver allocates a dpaa-ethernet platform device that
> > > > > > triggers the probing of the dpaa-eth net device driver.
> > > > > >
> > > > > > All of this is fine, but the problem is that the struct device of the
> > > > > > dpaa_eth net_device is 2 parents away from the MAC which can be
> > > > > > referenced via of_node. So of_find_net_device_by_node can't find it, and
> > > > > > DSA switches won't be able to probe on top of FMan ports.
> > > > > >
> > > > > > It would be a bit silly to modify a core function
> > > > > > (of_find_net_device_by_node) to look for dev->parent->parent->of_node
> > > > > > just for one driver. We're just 1 step away from implementing full
> > > > > > recursion.
> > > > > >
> > > > > > On T1040, the /sys/class/net/eth0 symlink currently points to:
> > > > > >
> > > > > > ../../devices/platform/ffe000000.soc/ffe400000.fman/ffe4e6000.ethernet/net/eth0
> > > > >
> > > > > Just want to point out that on 4.19.x, the above patch still exists:
> > > > > cd /sys
> > > > > find -name eth0
> > > > > ./devices/platform/ffe000000.soc/ffe400000.fman/ffe4e6000.ethernet/net/eth0
> > > > > ./class/net/eth
> > > > >
> > > >
> > > > By 'current' I mean 'the net tree just before this patch is applied',
> > > > i.e. a v5.7 tree with "dpaa_eth: fix usage as DSA master, try 3"
> > > > reverted.
> > >
> > > Confused, with patch reverted(and DSA working) in 4.19, I have
> > > ../../devices/platform/ffe000000.soc/ffe400000.fman/ffe4e6000.ethernet/net/eth0
> > > Is that the wanted path? Because I figured you wanted to change it to the path further down in this email?
> > >
> > > Jocke
> >
> > Yes, this is the wanted path.
> > The path is fine for anything below commit 060ad66f9795 ("dpaa_eth:
> > change DMA device"), including your v4.19.y, that's the point. By
> > specifying that commit in the Fixes: tag, people who deal with
> > backporting to stable trees know to not backport it below that commit.
> > So your stable tree will only get the revert patch.
> >
> > -Vladimir
>
> Oh, sorry, now I see what you were saying. The paths are reversed in
> the commit description. It should be:
>
> Good:
>
> ../../devices/platform/ffe000000.soc/ffe400000.fman/ffe4e6000.ethernet/net/eth0
>
> Bad:
>
> ../../devices/platform/ffe000000.soc/ffe400000.fman/ffe4e6000.ethernet/dpaa-ethernet.0/net/eth0
>
> So I need to spin another version.
Thank you, I was doubting my(non native) understanding of English :)
Jocke
prev parent reply other threads:[~2020-06-16 15:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-16 14:41 [PATCH net 0/2] Reapply DSA fix for dpaa-eth with proper Fixes: tag Vladimir Oltean
2020-06-16 14:41 ` [PATCH net 1/2] Revert "dpaa_eth: fix usage as DSA master, try 3" Vladimir Oltean
2020-06-16 14:41 ` [PATCH net 2/2] dpaa_eth: fix usage as DSA master, try 4 Vladimir Oltean
2020-06-16 14:51 ` Joakim Tjernlund
2020-06-16 14:56 ` Vladimir Oltean
2020-06-16 15:04 ` Joakim Tjernlund
2020-06-16 15:08 ` Vladimir Oltean
2020-06-16 15:12 ` Vladimir Oltean
2020-06-16 15:15 ` Joakim Tjernlund [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=ccd7c203fe1bd9a16dfc47394d8ff565548fa673.camel@infinera.com \
--to=joakim.tjernlund@infinera.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=fido_max@inbox.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=madalin.bucur@oss.nxp.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--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
all inboxes | Powered by JetHome®