cxlflash: Fix async interrupt bypass logic
authorMatthew R. Ochs <mrochs@linux.vnet.ibm.com>
Wed, 21 Oct 2015 20:13:45 +0000 (15:13 -0500)
committerJames Bottomley <JBottomley@Odin.com>
Fri, 30 Oct 2015 08:13:16 +0000 (17:13 +0900)
A bug was introduced earlier in the development cycle when cleaning
up logic statements. Instead of skipping bits that are not set, set
bits are skipped, causing async interrupts to not be handled correctly.

To fix, simply add back in the proper evaluation for an unset bit.

Signed-off-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
Signed-off-by: Manoj N. Kumar <manoj@linux.vnet.ibm.com>
Reviewed-by: Brian King <brking@linux.vnet.ibm.com>
Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
drivers/scsi/cxlflash/main.c

index 98fdac1e1c4506a4392f6a90869b9e781475cc6b..ed9fd8c2d7db29ed2f3f0ab6c55b42932857a55e 100644 (file)
@@ -1315,7 +1315,7 @@ static irqreturn_t cxlflash_async_err_irq(int irq, void *data)
        /* check each bit that is on */
        for (i = 0; reg_unmasked; i++, reg_unmasked = (reg_unmasked >> 1)) {
                info = find_ainfo(1ULL << i);
-               if ((reg_unmasked & 0x1) || !info)
+               if (((reg_unmasked & 0x1) == 0) || !info)
                        continue;
 
                port = info->port;