All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Ferre <nicolas.ferre@atmel.com>
To: Tord Andersson <tord.andersson@endian.se>, netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] macb: restore wrap bit when performing underrun cleanup
Date: Thu, 04 Aug 2011 09:58:45 +0100	[thread overview]
Message-ID: <4E3A5F45.9020609@atmel.com> (raw)
In-Reply-To: <1312445507-31382-1-git-send-email-tord.andersson@endian.se>

On 08/04/2011 09:11 AM, Tord Andersson wrote:
> When TX underrun occurs, a cleanup is performed that marks all buffers as used. As a side effect it also clears the wrap bit in the last buffer. This patch will restore the wrap bit.
>
> Signed-off-by: Tord Andersson<tord.andersson@endian.se>

Thanks for fixing this.

Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>

> ---
>   drivers/net/macb.c |    3 +++
>   1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/macb.c b/drivers/net/macb.c
> index 0fcdc25..dc4e305 100644
> --- a/drivers/net/macb.c
> +++ b/drivers/net/macb.c
> @@ -322,6 +322,9 @@ static void macb_tx(struct macb *bp)
>   		for (i = 0; i<  TX_RING_SIZE; i++)
>   			bp->tx_ring[i].ctrl = MACB_BIT(TX_USED);
>
> +		/* Add wrap bit */
> +		bp->tx_ring[TX_RING_SIZE - 1].ctrl |= MACB_BIT(TX_WRAP);
> +
>   		/* free transmit buffer in upper layer*/
>   		for (tail = bp->tx_tail; tail != head; tail = NEXT_TX(tail)) {
>   			struct ring_info *rp =&bp->tx_skb[tail];


-- 
Nicolas Ferre

      parent reply	other threads:[~2011-08-04  8:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-04  8:11 [PATCH] macb: restore wrap bit when performing underrun cleanup Tord Andersson
2011-08-04  8:43 ` David Miller
2011-08-04  8:58 ` Nicolas Ferre [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=4E3A5F45.9020609@atmel.com \
    --to=nicolas.ferre@atmel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=tord.andersson@endian.se \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.