forked from luck/tmp_suning_uos_patched
ibmveth: Fix DMA unmap error
Commit 6e8ab30ec6
(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>
This commit is contained in:
parent
52b9aca7ae
commit
33a48ab105
|
@ -1026,7 +1026,12 @@ static netdev_tx_t ibmveth_start_xmit(struct sk_buff *skb,
|
||||||
netdev->stats.tx_bytes += skb->len;
|
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,
|
dma_unmap_page(&adapter->vdev->dev, descs[i].fields.address,
|
||||||
descs[i].fields.flags_len & IBMVETH_BUF_LEN_MASK,
|
descs[i].fields.flags_len & IBMVETH_BUF_LEN_MASK,
|
||||||
DMA_TO_DEVICE);
|
DMA_TO_DEVICE);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user