From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Daney Subject: Re: [PATCH] e100: Add missing dma sync for proper operation with non-coherent caches. Date: Tue, 26 Aug 2008 12:24:31 -0700 Message-ID: <48B4586F.6030201@avtrex.com> References: <48B3A8D0.2040108@avtrex.com> <48B45065.5050907@roinet.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: e1000-devel@lists.sourceforge.net, netdev@vger.kernel.org, linux-mips To: David Acker Return-path: In-Reply-To: <48B45065.5050907@roinet.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: e1000-devel-bounces@lists.sourceforge.net Errors-To: e1000-devel-bounces@lists.sourceforge.net List-Id: netdev.vger.kernel.org David Acker wrote: > David Daney wrote: >> diff --git a/drivers/net/e100.c b/drivers/net/e100.c >> index 19d32a2..fb8d551 100644 >> --- a/drivers/net/e100.c >> +++ b/drivers/net/e100.c >> @@ -1840,6 +1840,11 @@ static int e100_rx_indicate(struct nic *nic, >> struct rx *rx, >> >> if (readb(&nic->csr->scb.status) & rus_no_res) >> nic->ru_running = RU_SUSPENDED; >> + /* We are done looking at the buffer. Prepare it for >> + * more DMA. */ >> + pci_dma_sync_single_for_device(nic->pdev, rx->dma_addr, >> + sizeof(struct rfd), >> + PCI_DMA_FROMDEVICE); >> return -ENODATA; >> } >> > Should the call to pci_dma_sync_single_for_device be DMA_TO_DEVICE since > we are giving the memory back to the device? No. We are giving the memory back to the device, but the direction of the data transfer is from the device to memory. David Daney ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/