Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7977f825 authored by Poornima Vonti's avatar Poornima Vonti Committed by James Bottomley
Browse files

[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: default avatarPoornima Vonti <poornima.vonti@qlogic.com>
Signed-off-by: default avatarVikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent 109a008b
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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");