lkml.org 
[lkml]   [2010]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] sky2: receive dma mapping error handling
From
Date
Stephen Hemminger <shemminger@linux-foundation.org> writes:

> - for (i = 0; i < skb_shinfo(skb)->nr_frags; i++)
> - re->frag_addr[i] = pci_map_page(pdev,
> +
> +map_page_error:
> + while (--i >= 0) {
> + pci_unmap_page(pdev, re->frag_addr[i],
> + skb_shinfo(skb)->frags[i].size,
> + PCI_DMA_FROMDEVICE);
> + }
> +
> + pci_unmap_single(pdev, re->data_addr, pci_unmap_len(re, data_size),
> + PCI_DMA_FROMDEVICE);

Better add a helper somewhere to do this, doesn't make sense
to duplicate this in all drivers (lots of drivers have similar
problems)

I remember looking at this some time ago but for some reason
the patches never made it out.

-Andi

--
ak@linux.intel.com -- Speaking for myself only.


\
 
 \ /
  Last update: 2010-02-02 23:47    [W:0.102 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site