diff options
author | Stephen M. Cameron <scameron@beardog.cce.hp.com> | 2010-07-19 14:46:54 -0400 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2010-08-07 12:52:30 -0400 |
commit | 8112586063fe53958d60218631d661533f304504 (patch) | |
tree | 7ee667fe782fe1c6b14fece28fbab5c3d24a0e4e /drivers/block/cciss.c | |
parent | b2a4a43dbaf10383703d512bbe560d5a24da0bf2 (diff) |
cciss: cleanup interrupt_not_for_us
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>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'drivers/block/cciss.c')
-rw-r--r-- | 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 35a9f08cf74f..fdf1b79eb347 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c | |||
@@ -3376,8 +3376,7 @@ static inline int interrupt_pending(ctlr_info_t *h) | |||
3376 | 3376 | ||
3377 | static inline long interrupt_not_for_us(ctlr_info_t *h) | 3377 | static inline long interrupt_not_for_us(ctlr_info_t *h) |
3378 | { | 3378 | { |
3379 | return !(h->msi_vector || h->msix_vector) && | 3379 | return ((h->access.intr_pending(h) == 0) || |
3380 | ((h->access.intr_pending(h) == 0) || | ||
3381 | (h->interrupts_enabled == 0)); | 3380 | (h->interrupts_enabled == 0)); |
3382 | } | 3381 | } |
3383 | 3382 | ||
@@ -3470,10 +3469,6 @@ static irqreturn_t do_cciss_intx(int irq, void *dev_id) | |||
3470 | 3469 | ||
3471 | if (interrupt_not_for_us(h)) | 3470 | if (interrupt_not_for_us(h)) |
3472 | return IRQ_NONE; | 3471 | return IRQ_NONE; |
3473 | /* | ||
3474 | * If there are completed commands in the completion queue, | ||
3475 | * we had better do something about it. | ||
3476 | */ | ||
3477 | spin_lock_irqsave(&h->lock, flags); | 3472 | spin_lock_irqsave(&h->lock, flags); |
3478 | while (interrupt_pending(h)) { | 3473 | while (interrupt_pending(h)) { |
3479 | raw_tag = get_next_completion(h); | 3474 | raw_tag = get_next_completion(h); |
@@ -3484,7 +3479,6 @@ static irqreturn_t do_cciss_intx(int irq, void *dev_id) | |||
3484 | raw_tag = process_nonindexed_cmd(h, raw_tag); | 3479 | raw_tag = process_nonindexed_cmd(h, raw_tag); |
3485 | } | 3480 | } |
3486 | } | 3481 | } |
3487 | |||
3488 | spin_unlock_irqrestore(&h->lock, flags); | 3482 | spin_unlock_irqrestore(&h->lock, flags); |
3489 | return IRQ_HANDLED; | 3483 | return IRQ_HANDLED; |
3490 | } | 3484 | } |
@@ -3498,12 +3492,6 @@ static irqreturn_t do_cciss_msix_intr(int irq, void *dev_id) | |||
3498 | unsigned long flags; | 3492 | unsigned long flags; |
3499 | u32 raw_tag; | 3493 | u32 raw_tag; |
3500 | 3494 | ||
3501 | if (interrupt_not_for_us(h)) | ||
3502 | return IRQ_NONE; | ||
3503 | /* | ||
3504 | * If there are completed commands in the completion queue, | ||
3505 | * we had better do something about it. | ||
3506 | */ | ||
3507 | spin_lock_irqsave(&h->lock, flags); | 3495 | spin_lock_irqsave(&h->lock, flags); |
3508 | raw_tag = get_next_completion(h); | 3496 | raw_tag = get_next_completion(h); |
3509 | while (raw_tag != FIFO_EMPTY) { | 3497 | while (raw_tag != FIFO_EMPTY) { |
@@ -3512,7 +3500,6 @@ static irqreturn_t do_cciss_msix_intr(int irq, void *dev_id) | |||
3512 | else | 3500 | else |
3513 | raw_tag = process_nonindexed_cmd(h, raw_tag); | 3501 | raw_tag = process_nonindexed_cmd(h, raw_tag); |
3514 | } | 3502 | } |
3515 | |||
3516 | spin_unlock_irqrestore(&h->lock, flags); | 3503 | spin_unlock_irqrestore(&h->lock, flags); |
3517 | return IRQ_HANDLED; | 3504 | return IRQ_HANDLED; |
3518 | } | 3505 | } |