mirror of
https://github.com/torvalds/linux.git
synced 2024-12-11 13:41:55 +00:00
qede: Fix incorrrect usage of APIs for un-mapping DMA memory
Driver uses incorrect APIs to unmap DMA memory which were mapped using dma_map_single(). This patch fixes it to use appropriate APIs for un-mapping DMA memory. Signed-off-by: Manish Chopra <manish.chopra@cavium.com> Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com> Signed-off-by: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
15c6de2c65
commit
fabd545c6d
@ -1199,8 +1199,8 @@ static int qede_selftest_transmit_traffic(struct qede_dev *edev,
|
||||
}
|
||||
|
||||
first_bd = (struct eth_tx_1st_bd *)qed_chain_consume(&txq->tx_pbl);
|
||||
dma_unmap_page(&edev->pdev->dev, BD_UNMAP_ADDR(first_bd),
|
||||
BD_UNMAP_LEN(first_bd), DMA_TO_DEVICE);
|
||||
dma_unmap_single(&edev->pdev->dev, BD_UNMAP_ADDR(first_bd),
|
||||
BD_UNMAP_LEN(first_bd), DMA_TO_DEVICE);
|
||||
txq->sw_tx_cons++;
|
||||
txq->sw_tx_ring[idx].skb = NULL;
|
||||
|
||||
|
@ -313,8 +313,8 @@ static int qede_free_tx_pkt(struct qede_dev *edev,
|
||||
split_bd_len = BD_UNMAP_LEN(split);
|
||||
bds_consumed++;
|
||||
}
|
||||
dma_unmap_page(&edev->pdev->dev, BD_UNMAP_ADDR(first_bd),
|
||||
BD_UNMAP_LEN(first_bd) + split_bd_len, DMA_TO_DEVICE);
|
||||
dma_unmap_single(&edev->pdev->dev, BD_UNMAP_ADDR(first_bd),
|
||||
BD_UNMAP_LEN(first_bd) + split_bd_len, DMA_TO_DEVICE);
|
||||
|
||||
/* Unmap the data of the skb frags */
|
||||
for (i = 0; i < skb_shinfo(skb)->nr_frags; i++, bds_consumed++) {
|
||||
@ -359,8 +359,8 @@ static void qede_free_failed_tx_pkt(struct qede_dev *edev,
|
||||
nbd--;
|
||||
}
|
||||
|
||||
dma_unmap_page(&edev->pdev->dev, BD_UNMAP_ADDR(first_bd),
|
||||
BD_UNMAP_LEN(first_bd) + split_bd_len, DMA_TO_DEVICE);
|
||||
dma_unmap_single(&edev->pdev->dev, BD_UNMAP_ADDR(first_bd),
|
||||
BD_UNMAP_LEN(first_bd) + split_bd_len, DMA_TO_DEVICE);
|
||||
|
||||
/* Unmap the data of the skb frags */
|
||||
for (i = 0; i < nbd; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user