linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: davem@davemloft.net (David Miller)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] net/macb: move to circ_buf macros and fix initial condition
Date: Mon, 19 Nov 2012 14:22:41 -0500 (EST)	[thread overview]
Message-ID: <20121119.142241.1136499358405707363.davem@davemloft.net> (raw)
In-Reply-To: <1353340821-12658-1-git-send-email-nicolas.ferre@atmel.com>

From: Nicolas Ferre <nicolas.ferre@atmel.com>
Date: Mon, 19 Nov 2012 17:00:21 +0100

> Move to circular buffers management macro and correct an error
> with circular buffer initial condition.
> 
> Without this patch, the macb_tx_ring_avail() function was
> not reporting the proper ring availability at startup:
> macb macb: eth0: BUG! Tx Ring full when queue awake!
> macb macb: eth0: tx_head = 0, tx_tail = 0
> And hanginig forever...
> 
> I remove the macb_tx_ring_avail() function and use the
> proven macros from circ_buf.h. CIRC_CNT() is used in the
> "consumer" part of the driver: macb_tx_interrupt() to match
> advice from Documentation/circular-buffers.txt.
> 
> Reported-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> Tested-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

Applied, thanks.

> ---
> v2: - added tags from Jean-Christophe PLAGNIOL-VILLARD

Note that under normal circumstances, if the only change is the
tags that people added in replies, you don't need to do this.

Patchwork accumulates all of the signoffs, acks, tested-by,
reviewed-by, etc. tags made in replies to the patch automatically for
me, so when I apply the patch they will be there.

      reply	other threads:[~2012-11-19 19:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-19 15:17 [PATCH] net/macb: move to circ_buf macros and fix initial condition Nicolas Ferre
2012-11-19 15:33 ` Jean-Christophe PLAGNIOL-VILLARD
2012-11-19 16:00 ` [PATCH v2] " Nicolas Ferre
2012-11-19 19:22   ` David Miller [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=20121119.142241.1136499358405707363.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=linux-arm-kernel@lists.infradead.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).