netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonas Bonn <jonas@southpole.se>
To: netdev@vger.kernel.org
Cc: Adam Edvardsson <adam.edvardsson@orsoc.se>,
	Jonas Bonn <jonas@southpole.se>
Subject: [PATCH 3/8] ethoc: enable interrupts after napi_complete
Date: Thu, 25 Nov 2010 13:30:27 +0100	[thread overview]
Message-ID: <1290688232-25142-4-git-send-email-jonas@southpole.se> (raw)
In-Reply-To: <1290688232-25142-1-git-send-email-jonas@southpole.se>

From: Adam Edvardsson <adam.edvardsson@orsoc.se>

Occasionally, it seems that some race is causing the interrupts to not be
reenabled otherwise with the end result that networking just stops working.
Enabling interrupts after calling napi_complete is more in line with what
other drivers do.

Signed-off-by: Jonas Bonn <jonas@southpole.se>
---
 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 e9e712e..db444a7 100644
--- a/drivers/net/ethoc.c
+++ b/drivers/net/ethoc.c
@@ -569,8 +569,8 @@ static int ethoc_poll(struct napi_struct *napi, int budget)
 
 	work_done = ethoc_rx(priv->netdev, budget);
 	if (work_done < budget) {
-		ethoc_enable_irq(priv, INT_MASK_RX);
 		napi_complete(napi);
+		ethoc_enable_irq(priv, INT_MASK_RX);
 	}
 
 	return work_done;
-- 
1.7.1


  parent reply	other threads:[~2010-11-25 12:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-25 12:30 ethoc driver changes (version 2) Jonas Bonn
2010-11-25 12:30 ` [PATCH 1/8] ethoc: Add device tree configuration Jonas Bonn
2010-11-25 12:30 ` [PATCH 2/8] ethoc: remove unused spinlock Jonas Bonn
2010-11-25 12:30 ` Jonas Bonn [this message]
2010-11-25 12:30 ` [PATCH 4/8] ethoc: Double check pending RX packet Jonas Bonn
2010-11-25 12:30 ` [PATCH 5/8] ethoc: rework interrupt handling Jonas Bonn
2010-11-25 12:30 ` [PATCH 6/8] ethoc: rework mdio read/write Jonas Bonn
2010-11-25 12:30 ` [PATCH 7/8] ethoc: fix function return type Jonas Bonn
2010-11-25 12:30 ` [PATCH 8/8] ethoc: remove division from loops Jonas Bonn
2010-11-28 19:17 ` ethoc driver changes (version 2) David Miller
  -- strict thread matches above, loose matches on Subject: below --
2010-11-24 13:40 ethoc driver updates Jonas Bonn
2010-11-24 13:40 ` [PATCH 3/8] ethoc: enable interrupts after napi_complete Jonas Bonn
2010-11-24 18:45   ` Laurent Chavey
     [not found]   ` <AANLkTim=Y6NGk8MSq=hJTrBKaYuk4SJ_7wA=f+UBy3d0@mail.gmail.com>
2010-11-24 19:33     ` Laurent Chavey

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=1290688232-25142-4-git-send-email-jonas@southpole.se \
    --to=jonas@southpole.se \
    --cc=adam.edvardsson@orsoc.se \
    --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).