Skip to content

Commit

Permalink
[SCSI] qla4xxx: Fail probe_adapter if IRQ allocation fails
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Poornima Vonti authored and James Bottomley committed Sep 24, 2012
1 parent 109a008 commit 7977f82
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/scsi/qla4xxx/ql4_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {

Expand All @@ -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");

Expand Down

0 comments on commit 7977f82

Please sign in to comment.