From ab7e11d9d0293ef1802d6ae8aab39ce58472b167 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Mon, 29 Aug 2011 23:18:30 +0000 Subject: greth: convert to SKB paged frag API. In order to avoid long lines also use phys_to_virt(page_to_phys(page)) => page_address(page) (since the are effectively the same thing for lowmem pages). Also dump the frag's size instead of the headlen when dumping a frag. Signed-off-by: Ian Campbell Cc: netdev@vger.kernel.org Signed-off-by: David S. Miller --- drivers/net/ethernet/aeroflex/greth.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'drivers/net/ethernet/aeroflex') diff --git a/drivers/net/ethernet/aeroflex/greth.c b/drivers/net/ethernet/aeroflex/greth.c index a5f6b07f8f3..bc3bd34c43f 100644 --- a/drivers/net/ethernet/aeroflex/greth.c +++ b/drivers/net/ethernet/aeroflex/greth.c @@ -113,9 +113,8 @@ static void greth_print_tx_packet(struct sk_buff *skb) for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) { print_hex_dump(KERN_DEBUG, "TX: ", DUMP_PREFIX_OFFSET, 16, 1, - phys_to_virt(page_to_phys(skb_shinfo(skb)->frags[i].page)) + - skb_shinfo(skb)->frags[i].page_offset, - length, true); + skb_frag_address(&skb_shinfo(skb)->frags[i]), + skb_shinfo(skb)->frags[i].size, true); } } @@ -528,11 +527,8 @@ greth_start_xmit_gbit(struct sk_buff *skb, struct net_device *dev) greth_write_bd(&bdp->stat, status); - dma_addr = dma_map_page(greth->dev, - frag->page, - frag->page_offset, - frag->size, - DMA_TO_DEVICE); + dma_addr = skb_frag_dma_map(greth->dev, frag, 0, frag->size, + DMA_TO_DEVICE); if (unlikely(dma_mapping_error(greth->dev, dma_addr))) goto frag_map_error; -- cgit v1.2.3-70-g09d2