bnx2x: use correct dma_sync function
authorVladislav Zolotarov <vladz@broadcom.com>
Tue, 19 Jul 2011 01:37:42 +0000 (01:37 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 19 Jul 2011 16:57:46 +0000 (09:57 -0700)
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bnx2x/bnx2x_cmn.c
drivers/net/bnx2x/bnx2x_ethtool.c

index b05ce9306deac17a19a666cd8ddc6589b99b12bc..150147aa73b316b3df90b966a3d4d7eae880cf6c 100644 (file)
@@ -676,7 +676,7 @@ int bnx2x_rx_int(struct bnx2x_fastpath *fp, int budget)
                        /* non TPA */
                        len = le16_to_cpu(cqe_fp->pkt_len);
                        pad = cqe_fp->placement_offset;
-                       dma_sync_single_for_device(&bp->pdev->dev,
+                       dma_sync_single_for_cpu(&bp->pdev->dev,
                                        dma_unmap_addr(rx_buf, mapping),
                                                       pad + RX_COPY_THRESH,
                                                       DMA_FROM_DEVICE);
index ac0223135b7cd0d61d9d2dba867c5f515bc82269..eda0f7b82c540055df44b754e8a7f30e995c409f 100644 (file)
@@ -1752,7 +1752,7 @@ static int bnx2x_run_loopback(struct bnx2x *bp, int loopback_mode)
                goto test_loopback_rx_exit;
 
        rx_buf = &fp_rx->rx_buf_ring[RX_BD(fp_rx->rx_bd_cons)];
-       dma_sync_single_for_device(&bp->pdev->dev,
+       dma_sync_single_for_cpu(&bp->pdev->dev,
                                   dma_unmap_addr(rx_buf, mapping),
                                   fp_rx->rx_buf_size, DMA_FROM_DEVICE);
        skb = rx_buf->skb;