Commit 4bf5adbf authored by Ian Campbell's avatar Ian Campbell Committed by David S. Miller

enic: convert to SKB paged frag API.

Signed-off-by: default avatarIan Campbell <ian.campbell@citrix.com>
Cc: Christian Benvenuti <benve@cisco.com>
Cc: Vasanthy Kolluri <vkolluri@cisco.com>
Cc: Roopa Prabhu <roprabhu@cisco.com>
Cc: David Wang <dwang2@cisco.com>
Cc: netdev@vger.kernel.org
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 877749bf
...@@ -591,9 +591,9 @@ static inline void enic_queue_wq_skb_cont(struct enic *enic, ...@@ -591,9 +591,9 @@ static inline void enic_queue_wq_skb_cont(struct enic *enic,
for (frag = skb_shinfo(skb)->frags; len_left; frag++) { for (frag = skb_shinfo(skb)->frags; len_left; frag++) {
len_left -= frag->size; len_left -= frag->size;
enic_queue_wq_desc_cont(wq, skb, enic_queue_wq_desc_cont(wq, skb,
pci_map_page(enic->pdev, frag->page, skb_frag_dma_map(&enic->pdev->dev,
frag->page_offset, frag->size, frag, 0, frag->size,
PCI_DMA_TODEVICE), PCI_DMA_TODEVICE),
frag->size, frag->size,
(len_left == 0), /* EOP? */ (len_left == 0), /* EOP? */
loopback); loopback);
...@@ -705,14 +705,14 @@ static inline void enic_queue_wq_skb_tso(struct enic *enic, ...@@ -705,14 +705,14 @@ static inline void enic_queue_wq_skb_tso(struct enic *enic,
for (frag = skb_shinfo(skb)->frags; len_left; frag++) { for (frag = skb_shinfo(skb)->frags; len_left; frag++) {
len_left -= frag->size; len_left -= frag->size;
frag_len_left = frag->size; frag_len_left = frag->size;
offset = frag->page_offset; offset = 0;
while (frag_len_left) { while (frag_len_left) {
len = min(frag_len_left, len = min(frag_len_left,
(unsigned int)WQ_ENET_MAX_DESC_LEN); (unsigned int)WQ_ENET_MAX_DESC_LEN);
dma_addr = pci_map_page(enic->pdev, frag->page, dma_addr = skb_frag_dma_map(&enic->pdev->dev, frag,
offset, len, offset, len,
PCI_DMA_TODEVICE); PCI_DMA_TODEVICE);
enic_queue_wq_desc_cont(wq, skb, enic_queue_wq_desc_cont(wq, skb,
dma_addr, dma_addr,
len, len,
......
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