lkml.org 
[lkml]   [2010]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] Gigabit Ethernet driver of Topcliff PCH
From
On Tue, 7 Sep 2010 10:13:22 +0900
"Masayuki Ohtake" <masa-korg@dsn.okisemi.com> wrote:

> > Probably, this trick doesn't work because zero could be a valid DMA
> > address on some architctures.
> >
>
> The flag which shows mapped will be added.
> And it is used instead of "if (buffer_info->dma) ".

Sounds fine. That's what other drivers do.


> > > + /*-- Set Buffer infomation --*/
> > > + buffer_info->length = skb->len;
> > > + buffer_info->dma =
> > > + pci_map_single(adapter->pdev, skb->data, buffer_info->length,
> > > + PCI_DMA_TODEVICE);
> >
> > Needs to handle mapping failure (dma_mapping_errro)?
>
> Error process will be added.

Nice.


> > Can you use dma_map_* API instead of pci_map_*? Please read:
> >
>
> This DMA of device is not standard. Personal use of Gigabit Ethernet device.
> So, I guess that I do not need to use DMA-API.

Sorry, I'm not sure what you mean. If a driver does DMA, it must use
the DMA API. Your driver already uses the DMA API (pci_dma_*),
however, pci_map_* API is obsolete so please use dma_map_* API
instead.

Thanks,


\
 
 \ /
  Last update: 2010-09-07 05:25    [W:0.089 / U:0.412 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site