netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Daney <ddaney@avtrex.com>
To: David Acker <dacker@roinet.com>
Cc: e1000-devel@lists.sourceforge.net, netdev@vger.kernel.org,
	linux-mips <linux-mips@linux-mips.org>
Subject: Re: [PATCH] e100: Add missing dma sync for proper operation with non-coherent caches.
Date: Tue, 26 Aug 2008 12:24:31 -0700	[thread overview]
Message-ID: <48B4586F.6030201@avtrex.com> (raw)
In-Reply-To: <48B45065.5050907@roinet.com>

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=/

  reply	other threads:[~2008-08-26 19:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-26  6:55 [PATCH] e100: Add missing dma sync for proper operation with non-coherent caches David Daney
2008-08-26 16:45 ` [E1000-devel] " Kok, Auke
2008-08-26 16:54   ` David Daney
2008-08-26 18:50 ` David Acker
2008-08-26 19:24   ` David Daney [this message]
2008-08-26 22:49 ` Ralf Baechle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48B4586F.6030201@avtrex.com \
    --to=ddaney@avtrex.com \
    --cc=dacker@roinet.com \
    --cc=e1000-devel@lists.sourceforge.net \
    --cc=linux-mips@linux-mips.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).