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

IB: nes: convert to SKB paged frag API.

Signed-off-by: default avatarIan Campbell <ian.campbell@citrix.com>
Reviewed-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Faisal Latif <faisal.latif@intel.com>
Cc: Roland Dreier <roland@kernel.org>
Cc: Sean Hefty <sean.hefty@intel.com>
Cc: Hal Rosenstock <hal.rosenstock@gmail.com>
Cc: linux-rdma@vger.kernel.org
Cc: netdev@vger.kernel.org
Acked-by: default avatarFaisal Latif <faisal.latif@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 70b1052a
...@@ -441,10 +441,10 @@ static int nes_nic_send(struct sk_buff *skb, struct net_device *netdev) ...@@ -441,10 +441,10 @@ static int nes_nic_send(struct sk_buff *skb, struct net_device *netdev)
nesnic->tx_skb[nesnic->sq_head] = skb; nesnic->tx_skb[nesnic->sq_head] = skb;
for (skb_fragment_index = 0; skb_fragment_index < skb_shinfo(skb)->nr_frags; for (skb_fragment_index = 0; skb_fragment_index < skb_shinfo(skb)->nr_frags;
skb_fragment_index++) { skb_fragment_index++) {
bus_address = pci_map_page( nesdev->pcidev, skb_frag_t *frag =
skb_shinfo(skb)->frags[skb_fragment_index].page, &skb_shinfo(skb)->frags[skb_fragment_index];
skb_shinfo(skb)->frags[skb_fragment_index].page_offset, bus_address = skb_frag_dma_map(&nesdev->pcidev->dev,
skb_shinfo(skb)->frags[skb_fragment_index].size, frag, 0, frag->size,
PCI_DMA_TODEVICE); PCI_DMA_TODEVICE);
wqe_fragment_length[wqe_fragment_index] = wqe_fragment_length[wqe_fragment_index] =
cpu_to_le16(skb_shinfo(skb)->frags[skb_fragment_index].size); cpu_to_le16(skb_shinfo(skb)->frags[skb_fragment_index].size);
...@@ -561,10 +561,11 @@ static int nes_netdev_start_xmit(struct sk_buff *skb, struct net_device *netdev) ...@@ -561,10 +561,11 @@ static int nes_netdev_start_xmit(struct sk_buff *skb, struct net_device *netdev)
/* Map all the buffers */ /* Map all the buffers */
for (tso_frag_count=0; tso_frag_count < skb_shinfo(skb)->nr_frags; for (tso_frag_count=0; tso_frag_count < skb_shinfo(skb)->nr_frags;
tso_frag_count++) { tso_frag_count++) {
tso_bus_address[tso_frag_count] = pci_map_page( nesdev->pcidev, skb_frag_t *frag =
skb_shinfo(skb)->frags[tso_frag_count].page, &skb_shinfo(skb)->frags[tso_frag_count];
skb_shinfo(skb)->frags[tso_frag_count].page_offset, tso_bus_address[tso_frag_count] =
skb_shinfo(skb)->frags[tso_frag_count].size, skb_frag_dma_map(&nesdev->pcidev->dev,
frag, 0, frag->size,
PCI_DMA_TODEVICE); PCI_DMA_TODEVICE);
} }
......
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