From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Madalin-cristian Bucur <madalin.bucur@nxp.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] fsl/fman: propagate dma_ops
Date: Mon, 26 Jun 2017 18:24:17 +0200 [thread overview]
Message-ID: <CAMuHMdXAKTBGiFc37jQjjCV_9Mb2SE2t7KHWASSwdMcFpFKmrA@mail.gmail.com> (raw)
In-Reply-To: <AM5PR0402MB26914A0A9BB0877F420848B9ECDF0@AM5PR0402MB2691.eurprd04.prod.outlook.com>
Hi Madalin,
On Mon, Jun 26, 2017 at 4:55 PM, Madalin-cristian Bucur
<madalin.bucur@nxp.com> wrote:
>> -----Original Message-----
>> From: geert.uytterhoeven@gmail.com [mailto:geert.uytterhoeven@gmail.com]
>> On Behalf Of Geert Uytterhoeven
>> Sent: Monday, June 26, 2017 10:49 AM
>> To: Madalin-cristian Bucur <madalin.bucur@nxp.com>
>> Cc: netdev@vger.kernel.org; David S. Miller <davem@davemloft.net>;
>> linuxppc-dev@lists.ozlabs.org; linux-kernel@vger.kernel.org
>> Subject: Re: [PATCH 1/2] fsl/fman: propagate dma_ops
>>
> On Mon, Jun 19, 2017 at 5:04 PM, Madalin Bucur <madalin.bucur@nxp.com>
>> wrote:
>> > Make sure dma_ops are set, to be later used by the Ethernet driver.
>> >
>> > Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
>> > ---
>> > drivers/net/ethernet/freescale/fman/mac.c | 2 ++
>> > 1 file changed, 2 insertions(+)
>> >
>> > diff --git a/drivers/net/ethernet/freescale/fman/mac.c
>> b/drivers/net/ethernet/freescale/fman/mac.c
>> > index 0b31f85..6e67d22f 100644
>> > --- a/drivers/net/ethernet/freescale/fman/mac.c
>> > +++ b/drivers/net/ethernet/freescale/fman/mac.c
>> > @@ -623,6 +623,8 @@ static struct platform_device
>> *dpaa_eth_add_device(int fman_id,
>> > goto no_mem;
>> > }
>> >
>> > + set_dma_ops(&pdev->dev, get_dma_ops(priv->dev));
>> > +
>>
>> When compile-testing with f NO_DMA=3Dy:
>>
>> drivers/net/ethernet/freescale/fman/mac.c: In function
>> =E2=80=98dpaa_eth_add_device=E2=80=99:
>> drivers/net/ethernet/freescale/fman/mac.c:626: error: implicit
>> declaration of function =E2=80=98set_dma_ops=E2=80=99
>>
>> Reverting commit 5567e989198b5a8d fixes this regression in v4.12-rc7.
>>
>> Why is this change needed?
>> There's no single other call to the DMA API in this file?
>
> We're setting here the dma_ops that are later used in the other driver/pa=
tch.
> The problem is we now depend upon DMA but do not explicitly declare it:
>
> <<Code that depends on the dma-mapping API needs to set 'depends on HAS_D=
MA'
> in its Kconfig>>
Sure. But only if the driver really uses DMA.
I can stick a set_dma_ops() call in whatever driver, but that doesn't
mean it will
suddenly use DMA.
Why does the FMan driver suddenly has a dependency on DMA, if it doesn't
use DMA?
> I'll need to add this to the FMan driver Kconfig.
Why does the FMan driver need this?
Why can't his call be done in the driver that uses the DMA APIO?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k=
.org
In personal conversations with technical people, I call myself a hacker. Bu=
t
when I'm talking to journalists I just say "programmer" or something like t=
hat.
-- Linus Torvalds
next prev parent reply other threads:[~2017-06-26 16:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-19 15:04 [PATCH 0/2] fix loadable module for DPAA Ethernet Madalin Bucur
2017-06-19 15:04 ` [PATCH 1/2] fsl/fman: propagate dma_ops Madalin Bucur
2017-06-26 7:48 ` Geert Uytterhoeven
2017-06-26 14:55 ` Madalin-cristian Bucur
2017-06-26 16:24 ` Geert Uytterhoeven [this message]
2017-06-27 6:49 ` Madalin-cristian Bucur
2017-06-19 15:04 ` [PATCH 2/2] dpaa_eth: reuse the dma_ops provided by the FMan MAC device Madalin Bucur
2017-06-20 17:47 ` [PATCH 0/2] fix loadable module for DPAA Ethernet David Miller
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=CAMuHMdXAKTBGiFc37jQjjCV_9Mb2SE2t7KHWASSwdMcFpFKmrA@mail.gmail.com \
--to=geert@linux-m68k.org \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=madalin.bucur@nxp.com \
--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).