Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1684361
| From | Geert Uytterhoeven <geert@linux-m68k.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] dpaa_eth: use correct device for DMA mapping API |
| Date | 2017-07-10 17:40 +0200 |
| Message-ID | <u1IX0-6Op-27@gated-at.bofh.it> (permalink) |
| References | <u1IDE-6HQ-29@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Arnd,
On Mon, Jul 10, 2017 at 5:14 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> Geert Uytterhoeven ran into a build error without CONFIG_HAS_DMA,
> as a result of the driver calling set_dma_ops(). While we can
> fix the build error in the dma-mapping implementation, there is
> another problem in this driver:
>
> The configuration for the DMA is done by the platform code,
> looking up information about the system from the device tree.
> This copies the information only in an incomplete way, setting
> the dma_map_ops and forcing a specific mask, but ignoring all
> settings regarding IOMMU, coherence etc.
>
> A better way to avoid the problem is to only ever pass a device
> into the dma_mapping implementation that has been setup by the
> platform code. In this case, that is the parent device, so we
> can get that pointer at probe time. Fortunately, we already have
> a pointer in the device specific structure for that, so we only
> need to modify that.
Thank you, that looks like a much better solution!
> Fixes: fb52728a9294 ("dpaa_eth: reuse the dma_ops provided by the FMan MAC device")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Not tested, please see if this works before applying!
Indeed, please test first.
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. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] dpaa_eth: use correct device for DMA mapping API Arnd Bergmann <arnd@arndb.de> - 2017-07-10 17:20 +0200
Re: [PATCH] dpaa_eth: use correct device for DMA mapping API Geert Uytterhoeven <geert@linux-m68k.org> - 2017-07-10 17:40 +0200
Re: [PATCH] dpaa_eth: use correct device for DMA mapping API Robin Murphy <robin.murphy@arm.com> - 2017-07-10 18:00 +0200
RE: [PATCH] dpaa_eth: use correct device for DMA mapping API Madalin-cristian Bucur <madalin.bucur@nxp.com> - 2017-07-11 11:00 +0200
Re: [PATCH] dpaa_eth: use correct device for DMA mapping API Arnd Bergmann <arnd@arndb.de> - 2017-07-11 11:20 +0200
RE: [PATCH] dpaa_eth: use correct device for DMA mapping API Madalin-cristian Bucur <madalin.bucur@nxp.com> - 2017-07-11 16:30 +0200
csiph-web