aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ibmveth.c
diff options
context:
space:
mode:
authorBrian King <brking@linux.vnet.ibm.com>2011-09-07 10:41:03 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-10-03 14:40:32 -0400
commit63bac6629520236226e54128c873871f1ff1f018 (patch)
tree1f5545ef865bf257598f634bab7347a917d56f28 /drivers/net/ibmveth.c
parent3345c36f951a36962493b1f59f23e47b5a94d8d2 (diff)
ibmveth: Fix DMA unmap error
commit 33a48ab105a75d37021e422a0a3283241099b142 upstream. 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> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/net/ibmveth.c')
-rw-r--r--drivers/net/ibmveth.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/ibmveth.c b/drivers/net/ibmveth.c
index f9d49cc7517..dc9bac0e92f 100644
--- a/drivers/net/ibmveth.c
+++ b/drivers/net/ibmveth.c
@@ -1025,7 +1025,12 @@ retry_bounce:
1025 netdev->stats.tx_bytes += skb->len; 1025 netdev->stats.tx_bytes += skb->len;
1026 } 1026 }
1027 1027
1028 for (i = 0; i < skb_shinfo(skb)->nr_frags + 1; i++) 1028 dma_unmap_single(&adapter->vdev->dev,
1029 descs[0].fields.address,
1030 descs[0].fields.flags_len & IBMVETH_BUF_LEN_MASK,
1031 DMA_TO_DEVICE);
1032
1033 for (i = 1; i < skb_shinfo(skb)->nr_frags + 1; i++)
1029 dma_unmap_page(&adapter->vdev->dev, descs[i].fields.address, 1034 dma_unmap_page(&adapter->vdev->dev, descs[i].fields.address,
1030 descs[i].fields.flags_len & IBMVETH_BUF_LEN_MASK, 1035 descs[i].fields.flags_len & IBMVETH_BUF_LEN_MASK,
1031 DMA_TO_DEVICE); 1036 DMA_TO_DEVICE);