All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Zelenoff <antonz@parallels.com>
To: <davem@davemloft.net>
Cc: <antonz@parallels.com>, <netdev@vger.kernel.org>,
	<jcliburn@gmail.com>, <csnook@redhat.com>,
	<khorenko@parallels.com>
Subject: [PATCH 4/9] atl1: use defined functions to disable irq
Date: Fri, 13 Apr 2012 20:09:49 +0400	[thread overview]
Message-ID: <1334333394-38404-5-git-send-email-antonz@parallels.com> (raw)
In-Reply-To: <1334333394-38404-1-git-send-email-antonz@parallels.com>

Looks like direct writes to IMR register is not good idea,
because there are exist functions to make this work.

Signed-off-by: Tony Zelenoff <antonz@parallels.com>
---
 drivers/net/ethernet/atheros/atlx/atl1.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/atheros/atlx/atl1.c b/drivers/net/ethernet/atheros/atlx/atl1.c
index a8935df..4fcdf57 100644
--- a/drivers/net/ethernet/atheros/atlx/atl1.c
+++ b/drivers/net/ethernet/atheros/atlx/atl1.c
@@ -266,7 +266,7 @@ static s32 atl1_reset_hw(struct atl1_hw *hw)
 	 * interrupts & Clear any pending interrupt events
 	 */
 	/*
-	 * iowrite32(0, hw->hw_addr + REG_IMR);
+	 * atlx_irq_disable(adapter);
 	 * iowrite32(0xffffffff, hw->hw_addr + REG_ISR);
 	 */
 
@@ -2512,7 +2512,7 @@ static irqreturn_t atl1_intr(int irq, void *data)
 				dev_printk(KERN_DEBUG, &adapter->pdev->dev,
 					"pcie phy link down %x\n", status);
 			if (netif_running(adapter->netdev)) {	/* reset MAC */
-				iowrite32(0, adapter->hw.hw_addr + REG_IMR);
+				atlx_irq_disable(adapter);
 				schedule_work(&adapter->reset_dev_task);
 				return IRQ_HANDLED;
 			}
@@ -2524,7 +2524,7 @@ static irqreturn_t atl1_intr(int irq, void *data)
 				dev_printk(KERN_DEBUG, &adapter->pdev->dev,
 					"pcie DMA r/w error (status = 0x%x)\n",
 					status);
-			iowrite32(0, adapter->hw.hw_addr + REG_IMR);
+			atlx_irq_disable(adapter);
 			schedule_work(&adapter->reset_dev_task);
 			return IRQ_HANDLED;
 		}
-- 
1.7.1

  parent reply	other threads:[~2012-04-13 16:09 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-13 16:09 [PATCH 0/9] atl1: add napi to Atheros L1 NIC Tony Zelenoff
2012-04-13 16:09 ` [PATCH 1/9] atl1: handle rx in separate condition Tony Zelenoff
2012-04-13 16:09 ` [PATCH 2/9] atl1: make driver napi compatible Tony Zelenoff
2012-04-13 17:15   ` Ben Hutchings
2012-04-13 19:22     ` David Miller
2012-04-13 16:09 ` [PATCH 3/9] atl1: add napi process of tx interrupts Tony Zelenoff
2012-04-13 16:09 ` Tony Zelenoff [this message]
2012-04-13 16:09 ` [PATCH 5/9] atl1: make function to set imr of card Tony Zelenoff
2012-04-13 16:09 ` [PATCH 6/9] atl1: add value to check ability of reenabling IRQs Tony Zelenoff
2012-04-13 16:09 ` [PATCH 7/9] atl1: enable errors and link ints when rx/tx scheduled Tony Zelenoff
2012-04-13 16:09 ` [PATCH 8/9] atl1: do not process interrupts in cycle in handler Tony Zelenoff
2012-04-13 16:09 ` [PATCH 9/9] atl1: do not drop rx/tx interrupts before they are scheduled Tony Zelenoff
2012-04-15 17:03 ` [PATCH 0/9] atl1: add napi to Atheros L1 NIC David Miller
2012-04-15 17:28   ` David Miller
2012-04-16  7:22     ` Tony Zelenoff
2012-04-16 18:20       ` David Miller
2012-04-16 20:51       ` Chris Snook
2012-04-17  8:42         ` Tony Zelenoff

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=1334333394-38404-5-git-send-email-antonz@parallels.com \
    --to=antonz@parallels.com \
    --cc=csnook@redhat.com \
    --cc=davem@davemloft.net \
    --cc=jcliburn@gmail.com \
    --cc=khorenko@parallels.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 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.