Only indicate irq-handled if that is really true

Driver currently returns IRQ_HANDLED for all interrupts.  Fix this.

Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
diff -Nru a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c
--- a/drivers/scsi/3w-9xxx.c    2005-03-02 02:14:42 -05:00
+++ b/drivers/scsi/3w-9xxx.c    2005-03-02 02:14:42 -05:00
@@ -1176,14 +1176,14 @@
        /* See if the interrupt matches this instance */
        if (tw_dev->tw_pci_dev->irq == (unsigned int)irq) {
 
-               handled = 1;
-
                /* Read the registers */
                status_reg_value = readl(TW_STATUS_REG_ADDR(tw_dev));
 
                /* Check if this is our interrupt, otherwise bail */
                if (!(status_reg_value & TW_STATUS_VALID_INTERRUPT))
                        goto twa_interrupt_bail;
+
+               handled = 1;
 
                /* Check controller for errors */
                if (twa_check_bits(status_reg_value)) {
diff -Nru a/drivers/scsi/3w-xxxx.c b/drivers/scsi/3w-xxxx.c
--- a/drivers/scsi/3w-xxxx.c    2005-03-02 02:14:42 -05:00
+++ b/drivers/scsi/3w-xxxx.c    2005-03-02 02:14:42 -05:00
@@ -2091,14 +2091,14 @@
        /* See if the interrupt matches this instance */
        if (tw_dev->tw_pci_dev->irq == (unsigned int)irq) {
 
-               handled = 1;
-
                /* Read the registers */
                status_reg_value = inl(TW_STATUS_REG_ADDR(tw_dev));
 
                /* Check if this is our interrupt, otherwise bail */
                if (!(status_reg_value & TW_STATUS_VALID_INTERRUPT))
                        goto tw_interrupt_bail;
+
+               handled = 1;
 
                /* Check controller for errors */
                if (tw_check_bits(status_reg_value)) {

Reply via email to