]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[SCSI] qla4xxx: Fail probe_adapter if IRQ allocation fails
authorPoornima Vonti <poornima.vonti@qlogic.com>
Thu, 20 Sep 2012 11:35:07 +0000 (07:35 -0400)
committerJames Bottomley <JBottomley@Parallels.com>
Mon, 24 Sep 2012 08:39:52 +0000 (12:39 +0400)
If IRQ allocation fails, it means system has run out of interrupt
vectors, so fail probe_adapter in case of IRQ allocation failure
and dont retry adapter initialization.

Signed-off-by: Poornima Vonti <poornima.vonti@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/qla4xxx/ql4_os.c

index 81b3038c385c7f951e970ee3db70710ecc0f1a0d..29bd2258ab6f1f0e37dcf9550146cbfe76c46902 100644 (file)
@@ -5240,6 +5240,11 @@ static int __devinit qla4xxx_probe_adapter(struct pci_dev *pdev,
         * NOTE: interrupts enabled upon successful completion
         */
        status = qla4xxx_initialize_adapter(ha, INIT_ADAPTER);
+
+       /* Dont retry adapter initialization if IRQ allocation failed */
+       if (!test_bit(AF_IRQ_ATTACHED, &ha->flags))
+               goto skip_retry_init;
+
        while ((!test_bit(AF_ONLINE, &ha->flags)) &&
            init_retry_count++ < MAX_INIT_RETRIES) {
 
@@ -5264,6 +5269,7 @@ static int __devinit qla4xxx_probe_adapter(struct pci_dev *pdev,
                status = qla4xxx_initialize_adapter(ha, INIT_ADAPTER);
        }
 
+skip_retry_init:
        if (!test_bit(AF_ONLINE, &ha->flags)) {
                ql4_printk(KERN_WARNING, ha, "Failed to initialize adapter\n");