From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750861Ab0IGEGh (ORCPT ); Tue, 7 Sep 2010 00:06:37 -0400 Received: from sm-d311v.smileserver.ne.jp ([203.211.202.206]:39944 "EHLO sm-d311v.smileserver.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750738Ab0IGEGb (ORCPT ); Tue, 7 Sep 2010 00:06:31 -0400 Message-ID: <000401cb4e42$0c7b5b10$66f8800a@maildom.okisemi.com> From: "Masayuki Ohtake" To: "FUJITA Tomonori" Cc: , , , , , , , , , , , , , , , , , , , , , References: <4C7D0E7A.5060309@dsn.okisemi.com><20100903112248Q.fujita.tomonori@lab.ntt.co.jp><001a01cb4e2a$5f870bf0$66f8800a@maildom.okisemi.com> <20100907122012O.fujita.tomonori@lab.ntt.co.jp> Subject: Re: [PATCH] Gigabit Ethernet driver of Topcliff PCH Date: Tue, 7 Sep 2010 13:06:15 +0900 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1983 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1983 X-Hosting-Pf: 0 X-NAI-Spam-Score: 3.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Fujita > > 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. Thank you for the explanation. I understood and use dma_map_* . Thanks Ohtake ----- Original Message ----- From: "FUJITA Tomonori" To: Cc: ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; Sent: Tuesday, September 07, 2010 12:21 PM Subject: Re: [PATCH] Gigabit Ethernet driver of Topcliff PCH > On Tue, 7 Sep 2010 10:13:22 +0900 > "Masayuki Ohtake" 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, > -- > To unsubscribe from this list: send the line "unsubscribe netdev" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >