Subject: Re: [PATCH 3/3] sh_eth: Fix dma mapping issue

From: Sergei Shtylyov <[email-masked]>
Date: Tue, 25 Nov 2014 23:07:56 +0300

Hello.

On 11/17/2014 07:09 AM, Simon Horman wrote:

>>> From: Mitsuhiro Kimura <[email-masked]>

>>> When CONFIG_DMA_API_DEBUG=y, many DMA error messages reports.
>>> In order to use DMA debug, This patch fix following issues.

>>> Issue 1:
>>> If dma_mapping_error function is not called appropriately after
>>> DMA mapping, DMA debug will report error message when DMA unmap
>>> function is called.

>>> Issue 2:
>>> If skb_reserve function is called after DMA mapping, the relationship
>>> between mapping addr and mapping size will be broken.
>>> In this case, DMA debug will report error messages when DMA sync
>>> function and DMA unmap function are called.

>>> Issue 3:
>>> If the size of frame data is less than ETH_ZLEN, the size is resized
>>> to ETH_ZLEN after DMA map function is called.
>>> In the TX skb freeing function, dma unmap function is called with that
>>> resized value. So, unmap size error will reported.

>>> Issue 4:
>>> In the rx function, DMA map function is called without DMA unmap function
>>> is called for RX skb reallocating.
>>> It will case the DMA debug error that number of debug entry is full and
>>> DMA debug logic is stopped.

>>     The rule of thumb is "fix one issue per patch". Please split accordingly.

>>> Signed-off-by: Mitsuhiro Kimura <[email-masked]>
>>> Signed-off-by: Yoshihiro Kaneko <[email-masked]>

>>     Thanks for beating me to it. Fixing these issues has been on my agenda
>> for a long time... :-)

> as this patch is somewhat involved and as you have pointed out needs a bit
> of work I'm wondering if you could take it over.

    Perhaps I could... but I'm busy with other stuff... not sure when can I 
get to it.

[...]

WBR, Sergei