Commit 671173c3 authored by Ian Campbell's avatar Ian Campbell Committed by David S. Miller

forcedeth: convert to SKB paged frag API.

Signed-off-by: default avatarIan Campbell <ian.campbell@citrix.com>
Cc: netdev@vger.kernel.org
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4bf5adbf
...@@ -2146,8 +2146,11 @@ static netdev_tx_t nv_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -2146,8 +2146,11 @@ static netdev_tx_t nv_start_xmit(struct sk_buff *skb, struct net_device *dev)
prev_tx = put_tx; prev_tx = put_tx;
prev_tx_ctx = np->put_tx_ctx; prev_tx_ctx = np->put_tx_ctx;
bcnt = (size > NV_TX2_TSO_MAX_SIZE) ? NV_TX2_TSO_MAX_SIZE : size; bcnt = (size > NV_TX2_TSO_MAX_SIZE) ? NV_TX2_TSO_MAX_SIZE : size;
np->put_tx_ctx->dma = pci_map_page(np->pci_dev, frag->page, frag->page_offset+offset, bcnt, np->put_tx_ctx->dma = skb_frag_dma_map(
PCI_DMA_TODEVICE); &np->pci_dev->dev,
frag, offset,
bcnt,
PCI_DMA_TODEVICE);
np->put_tx_ctx->dma_len = bcnt; np->put_tx_ctx->dma_len = bcnt;
np->put_tx_ctx->dma_single = 0; np->put_tx_ctx->dma_single = 0;
put_tx->buf = cpu_to_le32(np->put_tx_ctx->dma); 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,8 +2260,11 @@ static netdev_tx_t nv_start_xmit_optimized(struct sk_buff *skb,
prev_tx = put_tx; prev_tx = put_tx;
prev_tx_ctx = np->put_tx_ctx; prev_tx_ctx = np->put_tx_ctx;
bcnt = (size > NV_TX2_TSO_MAX_SIZE) ? NV_TX2_TSO_MAX_SIZE : size; bcnt = (size > NV_TX2_TSO_MAX_SIZE) ? NV_TX2_TSO_MAX_SIZE : size;
np->put_tx_ctx->dma = pci_map_page(np->pci_dev, frag->page, frag->page_offset+offset, bcnt, np->put_tx_ctx->dma = skb_frag_dma_map(
PCI_DMA_TODEVICE); &np->pci_dev->dev,
frag, offset,
bcnt,
PCI_DMA_TODEVICE);
np->put_tx_ctx->dma_len = bcnt; np->put_tx_ctx->dma_len = bcnt;
np->put_tx_ctx->dma_single = 0; np->put_tx_ctx->dma_single = 0;
put_tx->bufhigh = cpu_to_le32(dma_high(np->put_tx_ctx->dma)); put_tx->bufhigh = cpu_to_le32(dma_high(np->put_tx_ctx->dma));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment