From: Jay Cliburn <jacliburn@bellsouth.net>
To: jeff@garzik.org
Cc: jacliburn@bellsouth.net, csnook@redhat.com,
atl1-devel@lists.sourceforge.net, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 1/5] atl1: remove irq_sem
Date: Sun, 15 Jul 2007 11:03:25 -0500 [thread overview]
Message-ID: <1184515409355-git-send-email-jacliburn@bellsouth.net> (raw)
In-Reply-To: <11845154092908-git-send-email-jacliburn@bellsouth.net>
Remove unnecessary irq_sem code.
Signed-off-by: Chris Snook <csnook@redhat.com>
Signed-off-by: Jay Cliburn <jacliburn@bellsouth.net>
---
drivers/net/atl1/atl1.h | 1 -
drivers/net/atl1/atl1_main.c | 6 ++----
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/net/atl1/atl1.h b/drivers/net/atl1/atl1.h
index b1c6034..a769e7b 100644
--- a/drivers/net/atl1/atl1.h
+++ b/drivers/net/atl1/atl1.h
@@ -236,7 +236,6 @@ struct atl1_adapter {
u16 link_speed;
u16 link_duplex;
spinlock_t lock;
- atomic_t irq_sem;
struct work_struct tx_timeout_task;
struct work_struct link_chg_task;
struct work_struct pcie_dma_to_rst_task;
diff --git a/drivers/net/atl1/atl1_main.c b/drivers/net/atl1/atl1_main.c
index 3bb40dd..ef12dba 100644
--- a/drivers/net/atl1/atl1_main.c
+++ b/drivers/net/atl1/atl1_main.c
@@ -162,7 +162,6 @@ static int __devinit atl1_sw_init(struct atl1_adapter *adapter)
hw->cmb_tx_timer = 1; /* about 2us */
hw->smb_timer = 100000; /* about 200ms */
- atomic_set(&adapter->irq_sem, 0);
spin_lock_init(&adapter->lock);
spin_lock_init(&adapter->mb_lock);
@@ -268,8 +267,8 @@ err_nomem:
*/
static void atl1_irq_enable(struct atl1_adapter *adapter)
{
- if (likely(!atomic_dec_and_test(&adapter->irq_sem)))
- iowrite32(IMR_NORMAL_MASK, adapter->hw.hw_addr + REG_IMR);
+ iowrite32(IMR_NORMAL_MASK, adapter->hw.hw_addr + REG_IMR);
+ ioread32(adapter->hw.hw_addr + REG_IMR);
}
static void atl1_clear_phy_int(struct atl1_adapter *adapter)
@@ -1195,7 +1194,6 @@ static u32 atl1_configure(struct atl1_adapter *adapter)
*/
static void atl1_irq_disable(struct atl1_adapter *adapter)
{
- atomic_inc(&adapter->irq_sem);
iowrite32(0, adapter->hw.hw_addr + REG_IMR);
ioread32(adapter->hw.hw_addr + REG_IMR);
synchronize_irq(adapter->pdev->irq);
--
1.5.2.2
next prev parent reply other threads:[~2007-07-15 16:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-15 16:03 [PATCH 0/5] atl1: miscellaneous cleanup and code reorganization Jay Cliburn
2007-07-15 16:03 ` Jay Cliburn [this message]
2007-07-16 22:30 ` [PATCH 1/5] atl1: remove irq_sem Jeff Garzik
2007-07-15 16:03 ` [PATCH 2/5] atl1: header file cleanup Jay Cliburn
2007-07-15 16:03 ` [PATCH 3/5] atl1: cleanup atl1_main Jay Cliburn
2007-07-15 16:03 ` [PATCH 4/5] atl1: fix excessively indented code Jay Cliburn
2007-07-15 16:03 ` [PATCH 5/5] atl1: reorder atl1_main functions Jay Cliburn
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=1184515409355-git-send-email-jacliburn@bellsouth.net \
--to=jacliburn@bellsouth.net \
--cc=atl1-devel@lists.sourceforge.net \
--cc=csnook@redhat.com \
--cc=jeff@garzik.org \
--cc=linux-kernel@vger.kernel.org \
--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 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.