netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Dale Farnsworth" <dale@farnsworth.org>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: netdev@vger.kernel.org, Manish Lachwani <mlachwani@mvista.com>
Subject: PATCH mv643xx_eth: Unmap DMA buffers in receive path
Date: Wed, 13 Sep 2006 09:21:08 -0700	[thread overview]
Message-ID: <20060913162108.GA2171@xyzzy.farnsworth.org> (raw)
In-Reply-To: <45076774.5030909@pobox.com>

From: Dale Farnsworth <dale@farnsworth.org>

Fix a missing call to dma_unmap_single() in the receive path.  Without
this call, errors have been observed on non-cache-coherent systems.

Signed-off-by Dale Farnsworth <dale@farnsworth.org>

---

> ACK, but
> error: patch failed: drivers/net/mv643xx_eth.c:402
> error: drivers/net/mv643xx_eth.c: patch does not apply

Sorry.  Patch was against an old version.
This one's current.

-Dale

 drivers/net/mv643xx_eth.c |    2 ++
  1 file changed, 2 insertions(+)


diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
index 760c61b..eeab1df 100644
--- a/drivers/net/mv643xx_eth.c
+++ b/drivers/net/mv643xx_eth.c
@@ -385,6 +385,8 @@ static int mv643xx_eth_receive_queue(str
 	struct pkt_info pkt_info;
 
 	while (budget-- > 0 && eth_port_receive(mp, &pkt_info) == ETH_OK) {
+		dma_unmap_single(NULL, pkt_info.buf_ptr, RX_SKB_SIZE,
+							DMA_FROM_DEVICE);
 		mp->rx_desc_count--;
 		received_packets++;
 

      reply	other threads:[~2006-09-13 16:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-12 18:22 mv643xx_eth: Unmap DMA buffers in receive path Dale Farnsworth
2006-09-13  2:05 ` Jeff Garzik
2006-09-13 16:21   ` Dale Farnsworth [this message]

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=20060913162108.GA2171@xyzzy.farnsworth.org \
    --to=dale@farnsworth.org \
    --cc=jgarzik@pobox.com \
    --cc=mlachwani@mvista.com \
    --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).