From: Poornima Vonti Date: Thu, 20 Sep 2012 11:35:07 +0000 (-0400) Subject: [SCSI] qla4xxx: Fail probe_adapter if IRQ allocation fails X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=7977f825a029bad2a37fbcbdd9623de996154b44;p=deliverable%2Flinux.git [SCSI] qla4xxx: Fail probe_adapter if IRQ allocation fails 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 Signed-off-by: Vikas Chaudhary Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index 81b3038c385c..29bd2258ab6f 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c @@ -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");