From: Brian King <brking@linux.vnet.ibm.com>
To: netdev@vger.kernel.org
Cc: santil@linux.vnet.ibm.com, anton@samba.org, brking@linux.vnet.ibm.com
Subject: [PATCH 1/1] ibmveth: Fix DMA unmap error
Date: Wed, 07 Sep 2011 16:37:34 -0500 [thread overview]
Message-ID: <201109072137.p87LbV51024857@d01av04.pok.ibm.com> (raw)
Commit 6e8ab30ec677925e8999a9f5bdb028736d22d48c introduced a DMA mapping
API inconsistency resulting in dma_unmap_page getting called on memory
mapped via dma_map_single. This was seen when CONFIG_DMA_API_DEBUG was
enabled. Fix up this API usage inconsistency.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
---
drivers/net/ibmveth.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff -puN drivers/net/ibmveth.c~ibmveth_fix_mapping_issue drivers/net/ibmveth.c
--- linux-2.6/drivers/net/ibmveth.c~ibmveth_fix_mapping_issue 2011-09-07 16:28:19.000000000 -0500
+++ linux-2.6-bjking1/drivers/net/ibmveth.c 2011-09-07 16:28:19.000000000 -0500
@@ -1026,7 +1026,12 @@ retry_bounce:
netdev->stats.tx_bytes += skb->len;
}
- for (i = 0; i < skb_shinfo(skb)->nr_frags + 1; i++)
+ dma_unmap_single(&adapter->vdev->dev,
+ descs[0].fields.address,
+ descs[0].fields.flags_len & IBMVETH_BUF_LEN_MASK,
+ DMA_TO_DEVICE);
+
+ for (i = 1; i < skb_shinfo(skb)->nr_frags + 1; i++)
dma_unmap_page(&adapter->vdev->dev, descs[i].fields.address,
descs[i].fields.flags_len & IBMVETH_BUF_LEN_MASK,
DMA_TO_DEVICE);
_
reply other threads:[~2011-09-07 21:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=201109072137.p87LbV51024857@d01av04.pok.ibm.com \
--to=brking@linux.vnet.ibm.com \
--cc=anton@samba.org \
--cc=netdev@vger.kernel.org \
--cc=santil@linux.vnet.ibm.com \
/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