From: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
To: netdev@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
Thomas Gleixner <tglx@linutronix.de>,
Rakesh Ranjan <rakesh.ranjan@vnl.in>,
Bruno Bittner <Bruno.Bittner@sick.com>,
stable@vger.kernel.org, Holger Dengler <dengler@linutronix.de>,
Jan Altenberg <jan@linutronix.de>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Subject: [PATCH 2/4] net: ethernet: davinci_cpdma: fix descriptor handling
Date: Fri, 18 Jan 2013 11:06:10 +0100 [thread overview]
Message-ID: <1358503572-5057-2-git-send-email-sebastian@breakpoint.cc> (raw)
In-Reply-To: <1358503572-5057-1-git-send-email-sebastian@breakpoint.cc>
From: Thomas Gleixner <tglx@linutronix.de>
According to the datasheet there is a miss-queued buffer condition
handling required in the processing. This is implemented correctly
when descriptors are queued for TX, but during TX cleanup of already
transmitted descriptors the condition is not handled correctly. That
leads to a stall of the TX queue which fills up and never gets processed.
Cc: Rakesh Ranjan <rakesh.ranjan@vnl.in>
Cc: Bruno Bittner <Bruno.Bittner@sick.com>
Cc: stable@vger.kernel.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
[dengler: patch description]
Signed-off-by: Holger Dengler <dengler@linutronix.de>
[jan: forward ported]
Signed-off-by: Jan Altenberg <jan@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
drivers/net/ethernet/ti/davinci_cpdma.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/ti/davinci_cpdma.c b/drivers/net/ethernet/ti/davinci_cpdma.c
index dd5f2db..709c437 100644
--- a/drivers/net/ethernet/ti/davinci_cpdma.c
+++ b/drivers/net/ethernet/ti/davinci_cpdma.c
@@ -756,7 +756,8 @@ static int __cpdma_chan_process(struct cpdma_chan *chan)
chan->count--;
chan->stats.good_dequeue++;
- if (status & CPDMA_DESC_EOQ) {
+ if ((status & CPDMA_DESC_EOQ) && (chan->head) &&
+ (!(status & CPDMA_DESC_TD_COMPLETE))) {
chan->stats.requeue++;
chan_write(chan, hdp, desc_phys(pool, chan->head));
}
--
1.7.6.5
next prev parent reply other threads:[~2013-01-18 10:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-18 10:06 [PATCH 1/4] net: ethernet: davinci cpdma: Enable interrupt while waiting for teardown complete Sebastian Andrzej Siewior
2013-01-18 10:06 ` Sebastian Andrzej Siewior [this message]
2013-01-18 10:06 ` [PATCH 3/4] net: ethernet: ti cpsw: Split up DMA descriptor pool Sebastian Andrzej Siewior
2013-01-18 17:14 ` Mugunthan V N
2013-01-18 10:06 ` [PATCH 4/4] net: ethernet: ti cpsw: separate interrupt handler for TX, RX, and MISC Sebastian Andrzej Siewior
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=1358503572-5057-2-git-send-email-sebastian@breakpoint.cc \
--to=sebastian@breakpoint.cc \
--cc=Bruno.Bittner@sick.com \
--cc=bigeasy@linutronix.de \
--cc=davem@davemloft.net \
--cc=dengler@linutronix.de \
--cc=jan@linutronix.de \
--cc=netdev@vger.kernel.org \
--cc=rakesh.ranjan@vnl.in \
--cc=stable@vger.kernel.org \
--cc=tglx@linutronix.de \
/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).