netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yegor Yefremov <yegorslists@googlemail.com>
To: netdev <netdev@vger.kernel.org>
Cc: davem@davemloft.net
Subject: [PATCH 1/1] KS8695: update ksp->next_rx_desc_read at the end of rx loop
Date: Tue, 16 Mar 2010 16:42:06 +0100	[thread overview]
Message-ID: <f69abfc31003160842r59c25bbdl2029d3f20e668e53@mail.gmail.com> (raw)

KS8695: update ksp->next_rx_desc_read at the end of rx loop

There is no need to adjust the next rx descriptor after each packet,
so do it only once at the end of the routine.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>

Index: linux-2.6.34-rc1/drivers/net/arm/ks8695net.c
===================================================================
--- linux-2.6.34-rc1.orig/drivers/net/arm/ks8695net.c
+++ linux-2.6.34-rc1/drivers/net/arm/ks8695net.c
@@ -538,12 +538,13 @@ rx_finished:
 			 */
 			last_rx_processed = buff_n;
 			buff_n = (buff_n + 1) & MAX_RX_DESC_MASK;
-			/*And note which RX descriptor we last did */
-			if (likely(last_rx_processed != -1))
-				ksp->next_rx_desc_read =
-					(last_rx_processed + 1) &
-					MAX_RX_DESC_MASK;
 	}
+
+	/*And note which RX descriptor we last did */
+	if (likely(last_rx_processed != -1))
+		ksp->next_rx_desc_read =
+			(last_rx_processed + 1) & MAX_RX_DESC_MASK;
+
 	/* And refill the buffers */
 	ks8695_refill_rxbuffers(ksp);

             reply	other threads:[~2010-03-16 15:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-16 15:42 Yegor Yefremov [this message]
2010-03-16 15:52 ` [PATCH 1/1] KS8695: update ksp->next_rx_desc_read at the end of rx loop Eric Dumazet
2010-03-17  9:39   ` Yegor Yefremov
2010-03-17  9:40     ` Yegor Yefremov
2010-03-20  5:44       ` David Miller

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=f69abfc31003160842r59c25bbdl2029d3f20e668e53@mail.gmail.com \
    --to=yegorslists@googlemail.com \
    --cc=davem@davemloft.net \
    --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).