Netdev List
 help / color / mirror / Atom feed
From: Thomas Chou <thomas@wytron.com.tw>
To: netdev@vger.kernel.org
Cc: thierry.reding@avionic-design.de,
	Nios2 development list <nios2-dev@sopc.et.ntust.edu.tw>,
	linux-kernel@vger.kernel.org, Thomas Chou <thomas@wytron.com.tw>
Subject: [PATCH 2/2] ethoc: clear only pending irqs
Date: Thu,  8 Oct 2009 08:16:43 +0800	[thread overview]
Message-ID: <1254961003-2453-2-git-send-email-thomas@wytron.com.tw> (raw)
In-Reply-To: <1254961003-2453-1-git-send-email-thomas@wytron.com.tw>

This patch fixed the problem of dropped packets due to lost of
interrupt requests. We should only clear what was pending at the
moment we read the irq source reg.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
---
 drivers/net/ethoc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ethoc.c b/drivers/net/ethoc.c
index 6b39723..ecc53d9 100644
--- a/drivers/net/ethoc.c
+++ b/drivers/net/ethoc.c
@@ -509,7 +509,7 @@ static irqreturn_t ethoc_interrupt(int irq, void *dev_id)
 		return IRQ_NONE;
 	}
 
-	ethoc_ack_irq(priv, INT_MASK_ALL);
+	ethoc_ack_irq(priv, pending);
 
 	if (pending & INT_MASK_BUSY) {
 		dev_err(&dev->dev, "packet dropped\n");
-- 
1.6.2.5


  reply	other threads:[~2009-10-08  0:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-08  0:16 [PATCH 1/2] ethoc: inline regs access Thomas Chou
2009-10-08  0:16 ` Thomas Chou [this message]
2009-10-19  4:24   ` [PATCH 2/2] ethoc: clear only pending irqs David Miller
2009-10-19  4:24 ` [PATCH 1/2] ethoc: inline regs access 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=1254961003-2453-2-git-send-email-thomas@wytron.com.tw \
    --to=thomas@wytron.com.tw \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nios2-dev@sopc.et.ntust.edu.tw \
    --cc=thierry.reding@avionic-design.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