aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/ethernet/nvidia/forcedeth.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/net/ethernet/nvidia/forcedeth.c b/drivers/net/ethernet/nvidia/forcedeth.c
index 98bb64bc24d9..4e39b8c04397 100644
--- a/drivers/net/ethernet/nvidia/forcedeth.c
+++ b/drivers/net/ethernet/nvidia/forcedeth.c
@@ -2146,8 +2146,11 @@ static netdev_tx_t nv_start_xmit(struct sk_buff *skb, struct net_device *dev)
2146 prev_tx = put_tx; 2146 prev_tx = put_tx;
2147 prev_tx_ctx = np->put_tx_ctx; 2147 prev_tx_ctx = np->put_tx_ctx;
2148 bcnt = (size > NV_TX2_TSO_MAX_SIZE) ? NV_TX2_TSO_MAX_SIZE : size; 2148 bcnt = (size > NV_TX2_TSO_MAX_SIZE) ? NV_TX2_TSO_MAX_SIZE : size;
2149 np->put_tx_ctx->dma = pci_map_page(np->pci_dev, frag->page, frag->page_offset+offset, bcnt, 2149 np->put_tx_ctx->dma = skb_frag_dma_map(
2150 PCI_DMA_TODEVICE); 2150 &np->pci_dev->dev,
2151 frag, offset,
2152 bcnt,
2153 PCI_DMA_TODEVICE);
2151 np->put_tx_ctx->dma_len = bcnt; 2154 np->put_tx_ctx->dma_len = bcnt;
2152 np->put_tx_ctx->dma_single = 0; 2155 np->put_tx_ctx->dma_single = 0;
2153 put_tx->buf = cpu_to_le32(np->put_tx_ctx->dma); 2156 put_tx->buf = cpu_to_le32(np->put_tx_ctx->dma);
@@ -2257,8 +2260,11 @@ static netdev_tx_t nv_start_xmit_optimized(struct sk_buff *skb,
2257 prev_tx = put_tx; 2260 prev_tx = put_tx;
2258 prev_tx_ctx = np->put_tx_ctx; 2261 prev_tx_ctx = np->put_tx_ctx;
2259 bcnt = (size > NV_TX2_TSO_MAX_SIZE) ? NV_TX2_TSO_MAX_SIZE : size; 2262 bcnt = (size > NV_TX2_TSO_MAX_SIZE) ? NV_TX2_TSO_MAX_SIZE : size;
2260 np->put_tx_ctx->dma = pci_map_page(np->pci_dev, frag->page, frag->page_offset+offset, bcnt, 2263 np->put_tx_ctx->dma = skb_frag_dma_map(
2261 PCI_DMA_TODEVICE); 2264 &np->pci_dev->dev,
2265 frag, offset,
2266 bcnt,
2267 PCI_DMA_TODEVICE);
2262 np->put_tx_ctx->dma_len = bcnt; 2268 np->put_tx_ctx->dma_len = bcnt;
2263 np->put_tx_ctx->dma_single = 0; 2269 np->put_tx_ctx->dma_single = 0;
2264 put_tx->bufhigh = cpu_to_le32(dma_high(np->put_tx_ctx->dma)); 2270 put_tx->bufhigh = cpu_to_le32(dma_high(np->put_tx_ctx->dma));