lkml.org 
[lkml]   [2022]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] net: fs_enet: sync rx dma buffer before reading
On Sat, 21 May 2022 06:44:41 +0000 Christophe Leroy wrote:
> > Hm, I think the patch is necessary, sorry if you're also saying that
> > and I'm misinterpreting.
>
> Well, I say the contrary.
>
> On the mainline the patch may be applied as is, it won't harm.
>
> However, it is gets applied to kernel 4.9 (based on the fixes: tag), it
> will break the driver for at least powerpc 8xx.

I see, we should make a note of that in the commit message so it doesn't
get sucked into stable.

> > Without the dma_sync_single_for_cpu() if swiotlb is used the data
> > will not be copied back into the original buffer if there is no sync.
>
> I don't know how SWIOTLB works or even what it is, does any of the
> microcontrollers embedding freescale ethernet uses that at all ?

AFAIU SWIOTLB basically forces the use of bounce buffers even if the
device can reach the entire DRAM. I think some people also use it for
added security? IDK. I mostly use it to check if I'm using the DMA API
"right" :)

\
 
 \ /
  Last update: 2022-05-21 19:45    [W:0.200 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site