netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Chris Snook" <csnook@redhat.com>
To: jeff@garzik.org, jacliburn@bellsouth.net, csnook@redhat.com,
	john.ronciak@intel.com, jesse.brandeburg@intel.com,
	auke-jan.h.kok@intel.com
Cc: netdev@vger.kernel.org
Subject: [PATCH 3/3] remove irq_sem from ixgb
Date: Mon, 19 Feb 2007 20:12:52 -0500	[thread overview]
Message-ID: <20070220.EUt.93968700@egw.corp.redhat.com> (raw)
In-Reply-To: <20070220.Bq5.44322700@egw.corp.redhat.com>

From: Chris Snook <csnook@redhat.com>

Remove irq_sem from ixgb.  Currently untested, but similar to tested patches
on atl1 and e1000.

Signed-off-by: Chris Snook <csnook@redhat.com>
--
diff -urp linux-2.6.20-git14.orig/drivers/net/ixgb/ixgb.h
linux-2.6.20-git14/drivers/net/ixgb/ixgb.h
--- linux-2.6.20-git14.orig/drivers/net/ixgb/ixgb.h	2007-02-19
14:32:16.000000000 -0500
+++ linux-2.6.20-git14/drivers/net/ixgb/ixgb.h	2007-02-19 15:04:50.000000000
-0500
@@ -161,7 +161,6 @@ struct ixgb_adapter {
 	uint16_t link_speed;
 	uint16_t link_duplex;
 	spinlock_t tx_lock;
-	atomic_t irq_sem;
 	struct work_struct tx_timeout_task;

 	struct timer_list blink_timer;
diff -urp linux-2.6.20-git14.orig/drivers/net/ixgb/ixgb_main.c
linux-2.6.20-git14/drivers/net/ixgb/ixgb_main.c
--- linux-2.6.20-git14.orig/drivers/net/ixgb/ixgb_main.c	2007-02-19
14:32:16.000000000 -0500
+++ linux-2.6.20-git14/drivers/net/ixgb/ixgb_main.c	2007-02-19
15:06:52.000000000 -0500
@@ -201,7 +201,6 @@ module_exit(ixgb_exit_module);
 static void
 ixgb_irq_disable(struct ixgb_adapter *adapter)
 {
-	atomic_inc(&adapter->irq_sem);
 	IXGB_WRITE_REG(&adapter->hw, IMC, ~0);
 	IXGB_WRITE_FLUSH(&adapter->hw);
 	synchronize_irq(adapter->pdev->irq);
@@ -215,12 +214,10 @@ ixgb_irq_disable(struct ixgb_adapter *ad
 static void
 ixgb_irq_enable(struct ixgb_adapter *adapter)
 {
-	if(atomic_dec_and_test(&adapter->irq_sem)) {
-		IXGB_WRITE_REG(&adapter->hw, IMS,
-			       IXGB_INT_RXT0 | IXGB_INT_RXDMT0 | IXGB_INT_TXDW |
-			       IXGB_INT_LSC);
-		IXGB_WRITE_FLUSH(&adapter->hw);
-	}
+	IXGB_WRITE_REG(&adapter->hw, IMS,
+		       IXGB_INT_RXT0 | IXGB_INT_RXDMT0 | IXGB_INT_TXDW |
+		       IXGB_INT_LSC);
+	IXGB_WRITE_FLUSH(&adapter->hw);
 }

 int
@@ -584,7 +581,6 @@ ixgb_sw_init(struct ixgb_adapter *adapte
 	/* enable flow control to be programmed */
 	hw->fc.send_xon = 1;

-	atomic_set(&adapter->irq_sem, 1);
 	spin_lock_init(&adapter->tx_lock);

 	return 0;
@@ -1755,7 +1751,6 @@ ixgb_intr(int irq, void *data)
 		  of the posted write is intentionally left out.
 		*/

-		atomic_inc(&adapter->irq_sem);
 		IXGB_WRITE_REG(&adapter->hw, IMC, ~0);
 		__netif_rx_schedule(netdev);
 	}


      parent reply	other threads:[~2007-02-20  1:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-20  0:57 [PATCH 0/3] remove irq_sem cruft from e1000 and derivatives Chris Snook
2007-02-20  1:03 ` [PATCH 1/3] remove irq_sem from atl1 Chris Snook
2007-02-27  9:32   ` Jeff Garzik
2007-02-27 17:28     ` Chris Snook
2007-02-20  1:06 ` [PATCH 0/3] remove irq_sem cruft from e1000 and derivatives Auke Kok
2007-02-20  1:10 ` [PATCH 2/3] remove irq_sem from e1000 Chris Snook
2007-04-09 17:54   ` Kok, Auke
2007-04-09 20:34     ` Chris Snook
2007-02-20  1:12 ` Chris Snook [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=20070220.EUt.93968700@egw.corp.redhat.com \
    --to=csnook@redhat.com \
    --cc=auke-jan.h.kok@intel.com \
    --cc=jacliburn@bellsouth.net \
    --cc=jeff@garzik.org \
    --cc=jesse.brandeburg@intel.com \
    --cc=john.ronciak@intel.com \
    --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).