From: Andrew Lunn <andrew@lunn•ch>
To: Madalin-cristian Bucur <madalin.bucur@nxp•com>
Cc: David Miller <davem@davemloft•net>,
"netdev@vger•kernel.org" <netdev@vger•kernel.org>,
"f.fainelli@gmail•com" <f.fainelli@gmail•com>,
"linux-kernel@vger•kernel.org" <linux-kernel@vger•kernel.org>
Subject: Re: [PATCH] fsl/fman: remove of_node
Date: Tue, 3 Oct 2017 15:00:32 +0200 [thread overview]
Message-ID: <20171003130032.GI13548@lunn.ch> (raw)
In-Reply-To: <AM5PR0402MB26914CBD37E3F28C17562258EC720@AM5PR0402MB2691.eurprd04.prod.outlook.com>
On Tue, Oct 03, 2017 at 08:49:31AM +0000, Madalin-cristian Bucur wrote:
> > -----Original Message-----
> > From: David Miller [mailto:davem@davemloft•net]
> > Sent: Tuesday, October 03, 2017 2:05 AM
> > To: Madalin-cristian Bucur <madalin.bucur@nxp•com>
> > Subject: Re: [PATCH] fsl/fman: remove of_node
> >
> > From: Madalin Bucur <madalin.bucur@nxp•com>
> > Date: Mon, 2 Oct 2017 13:31:37 +0300
> >
> > > The FMan MAC driver allocates a platform device for the Ethernet
> > > driver to probe on. Setting pdev->dev.of_node with the MAC node
> > > triggers the MAC driver probing of the new platform device. While
> > > this fails quickly and does not affect the functionality of the
> > > drivers, it is incorrect and must be removed. This was added to
> > > address a report that DSA code using of_find_net_device_by_node()
> > > is unable to use the DPAA interfaces. Error message seen before
> > > this fix:
> > >
> > > fsl_mac dpaa-ethernet.0: __devm_request_mem_region(mac) failed
> > > fsl_mac: probe of dpaa-ethernet.0 failed with error -16
> > >
> > > Signed-off-by: Madalin Bucur <madalin.bucur@nxp•com>
> >
> > Is the DSA issue no longer something we need to be concerned
> > about? If not, why? You have to explain this.
>
> My patch removes the of_node that was set to a device that was not an
> of_device, preventing duplicated probing of both the real of_device
> and the "fake" one created through this assignment.
>
> I understand that the DSA issue that triggered the initial change
> was related to DSA finding the network devices using
> of_find_net_device_by_node(), something that will not work for the
> DPAA case where the netdevice does not have an of_node. I do not know
> enough about DSA to come up with a solution for this problem now.
> Andrew, Florian, can you please comment on this?
>
> Thanks,
Hi Madalin
I guess the real fix is to throw away the platform device. But that is
a big change.
I've not looked at the code in detail. Why is the platform device
needed?
Andrew
next prev parent reply other threads:[~2017-10-03 13:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-02 10:31 [PATCH] fsl/fman: remove of_node Madalin Bucur
2017-10-02 23:04 ` David Miller
2017-10-03 8:49 ` Madalin-cristian Bucur
2017-10-03 13:00 ` Andrew Lunn [this message]
2017-10-04 9:59 ` Madalin-cristian Bucur
2017-10-04 13:09 ` Andrew Lunn
2017-10-04 4:43 ` David Miller
2017-10-04 9:53 ` Madalin-cristian Bucur
2017-10-10 14:01 ` Madalin-cristian Bucur
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=20171003130032.GI13548@lunn.ch \
--to=andrew@lunn$(echo .)ch \
--cc=davem@davemloft$(echo .)net \
--cc=f.fainelli@gmail$(echo .)com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=madalin.bucur@nxp$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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