diff options
author | Ian Campbell <Ian.Campbell@citrix.com> | 2011-08-29 19:18:23 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-08-30 17:58:00 -0400 |
commit | b061b39e3ae18ad75466258cf2116e18fa5bbd80 (patch) | |
tree | a7ebd42989a1acd45ec14cbeb7d86f66cf04ca1a /drivers/net/ethernet/emulex | |
parent | 9b22c7352b1882e45c7f24fe1575cee1846844cd (diff) |
benet: convert to SKB paged frag API.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Sathya Perla <sathya.perla@emulex.com>
Cc: Subbu Seetharaman <subbu.seetharaman@emulex.com>
Cc: Ajit Khaparde <ajit.khaparde@emulex.com>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/emulex')
-rw-r--r-- | drivers/net/ethernet/emulex/benet/be_main.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c index 3d55b4767ae..2b7d1ba1e13 100644 --- a/drivers/net/ethernet/emulex/benet/be_main.c +++ b/drivers/net/ethernet/emulex/benet/be_main.c | |||
@@ -638,8 +638,8 @@ static int make_tx_wrbs(struct be_adapter *adapter, struct be_queue_info *txq, | |||
638 | for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) { | 638 | for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) { |
639 | struct skb_frag_struct *frag = | 639 | struct skb_frag_struct *frag = |
640 | &skb_shinfo(skb)->frags[i]; | 640 | &skb_shinfo(skb)->frags[i]; |
641 | busaddr = dma_map_page(dev, frag->page, frag->page_offset, | 641 | busaddr = skb_frag_dma_map(dev, frag, 0, |
642 | frag->size, DMA_TO_DEVICE); | 642 | frag->size, DMA_TO_DEVICE); |
643 | if (dma_mapping_error(dev, busaddr)) | 643 | if (dma_mapping_error(dev, busaddr)) |
644 | goto dma_err; | 644 | goto dma_err; |
645 | wrb = queue_head_node(txq); | 645 | wrb = queue_head_node(txq); |
@@ -1066,7 +1066,7 @@ static void skb_fill_rx_data(struct be_adapter *adapter, struct be_rx_obj *rxo, | |||
1066 | skb->tail += curr_frag_len; | 1066 | skb->tail += curr_frag_len; |
1067 | } else { | 1067 | } else { |
1068 | skb_shinfo(skb)->nr_frags = 1; | 1068 | skb_shinfo(skb)->nr_frags = 1; |
1069 | skb_shinfo(skb)->frags[0].page = page_info->page; | 1069 | skb_frag_set_page(skb, 0, page_info->page); |
1070 | skb_shinfo(skb)->frags[0].page_offset = | 1070 | skb_shinfo(skb)->frags[0].page_offset = |
1071 | page_info->page_offset + hdr_len; | 1071 | page_info->page_offset + hdr_len; |
1072 | skb_shinfo(skb)->frags[0].size = curr_frag_len - hdr_len; | 1072 | skb_shinfo(skb)->frags[0].size = curr_frag_len - hdr_len; |
@@ -1091,7 +1091,7 @@ static void skb_fill_rx_data(struct be_adapter *adapter, struct be_rx_obj *rxo, | |||
1091 | if (page_info->page_offset == 0) { | 1091 | if (page_info->page_offset == 0) { |
1092 | /* Fresh page */ | 1092 | /* Fresh page */ |
1093 | j++; | 1093 | j++; |
1094 | skb_shinfo(skb)->frags[j].page = page_info->page; | 1094 | skb_frag_set_page(skb, j, page_info->page); |
1095 | skb_shinfo(skb)->frags[j].page_offset = | 1095 | skb_shinfo(skb)->frags[j].page_offset = |
1096 | page_info->page_offset; | 1096 | page_info->page_offset; |
1097 | skb_shinfo(skb)->frags[j].size = 0; | 1097 | skb_shinfo(skb)->frags[j].size = 0; |
@@ -1173,7 +1173,7 @@ static void be_rx_compl_process_gro(struct be_adapter *adapter, | |||
1173 | if (i == 0 || page_info->page_offset == 0) { | 1173 | if (i == 0 || page_info->page_offset == 0) { |
1174 | /* First frag or Fresh page */ | 1174 | /* First frag or Fresh page */ |
1175 | j++; | 1175 | j++; |
1176 | skb_shinfo(skb)->frags[j].page = page_info->page; | 1176 | skb_frag_set_page(skb, j, page_info->page); |
1177 | skb_shinfo(skb)->frags[j].page_offset = | 1177 | skb_shinfo(skb)->frags[j].page_offset = |
1178 | page_info->page_offset; | 1178 | page_info->page_offset; |
1179 | skb_shinfo(skb)->frags[j].size = 0; | 1179 | skb_shinfo(skb)->frags[j].size = 0; |