From: David Miller <davem@davemloft.net>
To: haokexin@gmail.com
Cc: netdev@vger.kernel.org, claudiu.manoil@freescale.com
Subject: Re: [PATCH net v2] gianfar: Fix dma check map error when DMA_API_DEBUG is enabled
Date: Thu, 11 Dec 2014 14:27:51 -0500 (EST) [thread overview]
Message-ID: <20141211.142751.14939995747583356.davem@davemloft.net> (raw)
In-Reply-To: <1418278121-20209-1-git-send-email-haokexin@gmail.com>
From: Kevin Hao <haokexin@gmail.com>
Date: Thu, 11 Dec 2014 14:08:41 +0800
> We need to use dma_mapping_error() to check the dma address returned
> by dma_map_single/page(). Otherwise we would get warning like this:
...
> For TX, we need to unmap the pages which has already been mapped and
> free the skb before return.
>
> For RX, move the dma mapping and error check to gfar_new_skb(). We
> would reuse the original skb in the rx ring when either allocating
> skb failure or dma mapping error.
>
> Signed-off-by: Kevin Hao <haokexin@gmail.com>
> Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com>
> ---
> v2: Just update the RX path to reuse the original skb when dma mapping error
> occurs as suggested by David.
Looks good, applied, thanks.
prev parent reply other threads:[~2014-12-11 19:27 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-05 10:37 [PATCH 0/2] DMA API usage fixes in gianfar Arseny Solokha
2014-12-05 10:37 ` [PATCH 1/2] gianfar: handle map error in gfar_new_rxbdp() Arseny Solokha
2014-12-09 20:37 ` David Miller
2014-12-05 10:37 ` [PATCH 2/2] gianfar: handle map error in gfar_start_xmit() Arseny Solokha
2014-12-05 12:42 ` Denis Kirjanov
2014-12-05 14:51 ` Claudiu Manoil
2014-12-09 20:39 ` David Miller
2014-12-10 11:03 ` David Laight
2014-12-05 14:48 ` [PATCH 0/2] DMA API usage fixes in gianfar Claudiu Manoil
2014-12-09 14:24 ` [PATCH net] gianfar: Fix dma check map error when DMA_API_DEBUG is enabled Claudiu Manoil
2014-12-10 18:13 ` David Miller
2014-12-11 2:06 ` Kevin Hao
2014-12-11 6:08 ` [PATCH net v2] " Kevin Hao
2014-12-11 17:05 ` Claudiu Manoil
2014-12-11 19:27 ` David Miller [this message]
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=20141211.142751.14939995747583356.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=claudiu.manoil@freescale.com \
--cc=haokexin@gmail.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).