diff options
author | Brian King <brking@linux.vnet.ibm.com> | 2011-09-07 10:41:03 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-09-16 15:26:32 -0400 |
commit | 33a48ab105a75d37021e422a0a3283241099b142 (patch) | |
tree | e52a8350d91f44cdc4c17d012354bfcf15771a42 /drivers | |
parent | 52b9aca7ae8726d1fb41b97dd1d243d107fef11b (diff) |
ibmveth: Fix DMA unmap error
Commit 6e8ab30ec677 (ibmveth: Add scatter-gather support) 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>
Acked-by: Anton Blanchard <anton@samba.org>
Cc: <stable@kernel.org> # v2.6.37+
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ibmveth.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/ibmveth.c b/drivers/net/ibmveth.c index 3e6679269400..dcf65d8f10d2 100644 --- a/drivers/net/ibmveth.c +++ b/drivers/net/ibmveth.c | |||
@@ -1026,7 +1026,12 @@ retry_bounce: | |||
1026 | netdev->stats.tx_bytes += skb->len; | 1026 | netdev->stats.tx_bytes += skb->len; |
1027 | } | 1027 | } |
1028 | 1028 | ||
1029 | for (i = 0; i < skb_shinfo(skb)->nr_frags + 1; i++) | 1029 | dma_unmap_single(&adapter->vdev->dev, |
1030 | descs[0].fields.address, | ||
1031 | descs[0].fields.flags_len & IBMVETH_BUF_LEN_MASK, | ||
1032 | DMA_TO_DEVICE); | ||
1033 | |||
1034 | for (i = 1; i < skb_shinfo(skb)->nr_frags + 1; i++) | ||
1030 | dma_unmap_page(&adapter->vdev->dev, descs[i].fields.address, | 1035 | dma_unmap_page(&adapter->vdev->dev, descs[i].fields.address, |
1031 | descs[i].fields.flags_len & IBMVETH_BUF_LEN_MASK, | 1036 | descs[i].fields.flags_len & IBMVETH_BUF_LEN_MASK, |
1032 | DMA_TO_DEVICE); | 1037 | DMA_TO_DEVICE); |