From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergei Shtylyov Date: Wed, 15 Jul 2015 12:11:07 +0000 Subject: Re: [PATCH] ravb: do not invalidate cache for RX buffer twice Message-Id: <55A64DDB.4010108@cogentembedded.com> List-Id: References: <4759713.2ulGRKsd9L@wasted.cogentembedded.com> <55A639CE.2030201@cogentembedded.com> In-Reply-To: <55A639CE.2030201@cogentembedded.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: netdev@vger.kernel.org, David Miller Cc: linux-sh@vger.kernel.org On 7/15/2015 1:45 PM, Sergei Shtylyov wrote: >> First, dma_sync_single_for_cpu() shouldn't have been called in the first place >> (it's a streaming DMA API). dma_unmap_single() should have been called instead. > ^ > Oops, I meant comma here. >> Second, dma_unmap_single() call after handing the buffer to napi_gro_receive() >> makes little sense. > Moreover, 'desc->dptr' may not be valid at this point... >> Signed-off-by: Sergei Shtylyov >> --- >> The patch is against Dave Miller's 'net.git' repo. >> Don't know why I missed this DMA API misuse while working on the driver. :-< > Dave, do you want me to resend the patch with fixed up changelog? Oops, forgot to CC Dave. :-( WBR, Sergei