[PATCH 26/26] cciss: cleanup interrupt_not_for_us

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Stephen M. Cameron
Date: Monday, July 19, 2010 - 11:46 am

From: Stephen M. Cameron <scameron@beardog.cce.hp.com>

cciss: cleanup interrupt_not_for_us
In the case of MSI/MSIX interrutps, we don't need to check
if the interrupt is for us, and in the case of the intx interrupt
handler, when checking if the interrupt is for us, we don't need
to check if we're using MSI/MSIX, we know we're not.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
---
 drivers/block/cciss.c |   15 +--------------
 1 files changed, 1 insertions(+), 14 deletions(-)

diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index 35a9f08..fdf1b79 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -3376,8 +3376,7 @@ static inline int interrupt_pending(ctlr_info_t *h)
 
 static inline long interrupt_not_for_us(ctlr_info_t *h)
 {
-	return !(h->msi_vector || h->msix_vector) &&
-		((h->access.intr_pending(h) == 0) ||
+	return ((h->access.intr_pending(h) == 0) ||
 		(h->interrupts_enabled == 0));
 }
 
@@ -3470,10 +3469,6 @@ static irqreturn_t do_cciss_intx(int irq, void *dev_id)
 
 	if (interrupt_not_for_us(h))
 		return IRQ_NONE;
-	/*
-	 * If there are completed commands in the completion queue,
-	 * we had better do something about it.
-	 */
 	spin_lock_irqsave(&h->lock, flags);
 	while (interrupt_pending(h)) {
 		raw_tag = get_next_completion(h);
@@ -3484,7 +3479,6 @@ static irqreturn_t do_cciss_intx(int irq, void *dev_id)
 				raw_tag = process_nonindexed_cmd(h, raw_tag);
 		}
 	}
-
 	spin_unlock_irqrestore(&h->lock, flags);
 	return IRQ_HANDLED;
 }
@@ -3498,12 +3492,6 @@ static irqreturn_t do_cciss_msix_intr(int irq, void *dev_id)
 	unsigned long flags;
 	u32 raw_tag;
 
-	if (interrupt_not_for_us(h))
-		return IRQ_NONE;
-	/*
-	 * If there are completed commands in the completion queue,
-	 * we had better do something about it.
-	 */
 	spin_lock_irqsave(&h->lock, flags);
 	raw_tag = get_next_completion(h);
 	while (raw_tag != FIFO_EMPTY) {
@@ -3512,7 +3500,6 @@ static irqreturn_t do_cciss_msix_intr(int irq, void *dev_id)
 		else
 			raw_tag = process_nonindexed_cmd(h, raw_tag);
 	}
-
 	spin_unlock_irqrestore(&h->lock, flags);
 	return IRQ_HANDLED;
 }

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 00/26] cciss updates July 19, 2010 , Stephen M. Cameron, (Mon Jul 19, 11:44 am)
[PATCH 01/26] cciss: Set the performant mode bit in the sc ..., Stephen M. Cameron, (Mon Jul 19, 11:44 am)
[PATCH 02/26] cciss: save pdev pointer in per hba structur ..., Stephen M. Cameron, (Mon Jul 19, 11:44 am)
[PATCH 03/26] cciss: factor out cciss_lookup_board_id, Stephen M. Cameron, (Mon Jul 19, 11:44 am)
[PATCH 04/26] cciss: factor out cciss_board_disabled, Stephen M. Cameron, (Mon Jul 19, 11:45 am)
[PATCH 05/26] cciss: remove board_id parameter from cciss_ ..., Stephen M. Cameron, (Mon Jul 19, 11:45 am)
[PATCH 06/26] cciss: factor out cciss_find_memory_BAR(), Stephen M. Cameron, (Mon Jul 19, 11:45 am)
[PATCH 07/26] cciss: factor out cciss_wait_for_board_ready(), Stephen M. Cameron, (Mon Jul 19, 11:45 am)
[PATCH 08/26] cciss: factor out cciss_find_cfgtables, Stephen M. Cameron, (Mon Jul 19, 11:45 am)
[PATCH 09/26] cciss: fix leak of ioremapped memory, Stephen M. Cameron, (Mon Jul 19, 11:45 am)
[PATCH 10/26] cciss: factor out cciss_find_board_params, Stephen M. Cameron, (Mon Jul 19, 11:45 am)
[PATCH 11/26] cciss: factor out CISS_signature_present(), Stephen M. Cameron, (Mon Jul 19, 11:45 am)
[PATCH 12/26] cciss: factor out cciss_enable_scsi_prefetch(), Stephen M. Cameron, (Mon Jul 19, 11:45 am)
[PATCH 13/26] cciss: factor out cciss_p600_dma_prefetch_qu ..., Stephen M. Cameron, (Mon Jul 19, 11:45 am)
[PATCH 14/26] cciss: cleanup some debug ifdefs, Stephen M. Cameron, (Mon Jul 19, 11:45 am)
[PATCH 15/26] cciss: make cciss_put_controller_into_perfor ..., Stephen M. Cameron, (Mon Jul 19, 11:45 am)
[PATCH 16/26] cciss: factor out cciss_wait_for_mode_change ..., Stephen M. Cameron, (Mon Jul 19, 11:46 am)
[PATCH 17/26] cciss: factor out cciss_enter_performant_mode, Stephen M. Cameron, (Mon Jul 19, 11:46 am)
[PATCH 18/26] cciss: factor out cciss_find_cfg_addrs., Stephen M. Cameron, (Mon Jul 19, 11:46 am)
[PATCH 19/26] cciss: factor out cciss_reset_devices(), Stephen M. Cameron, (Mon Jul 19, 11:46 am)
[PATCH 20/26] cciss: fix hard reset code., Stephen M. Cameron, (Mon Jul 19, 11:46 am)
[PATCH 21/26] cciss: sanitize max commands, Stephen M. Cameron, (Mon Jul 19, 11:46 am)
[PATCH 22/26] cciss: forbid hard reset of 640x boards, Stephen M. Cameron, (Mon Jul 19, 11:46 am)
[PATCH 23/26] cciss: use consistent variable names, Stephen M. Cameron, (Mon Jul 19, 11:46 am)
[PATCH 24/26] cciss: separate cmd_alloc() and cmd_special_ ..., Stephen M. Cameron, (Mon Jul 19, 11:46 am)
[PATCH 25/26] cciss: change printks to dev_warn, etc., Stephen M. Cameron, (Mon Jul 19, 11:46 am)
[PATCH 26/26] cciss: cleanup interrupt_not_for_us, Stephen M. Cameron, (Mon Jul 19, 11:46 am)
Re: [PATCH 00/26] cciss updates July 19, 2010, Jens Axboe, (Tue Jul 20, 7:05 pm)