diff options
author | Poornima Vonti <poornima.vonti@qlogic.com> | 2012-09-20 07:35:07 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-09-24 04:39:52 -0400 |
commit | 7977f825a029bad2a37fbcbdd9623de996154b44 (patch) | |
tree | bcd35afca9f4f9235469d43d6646ddae78c61579 /drivers/scsi/qla4xxx | |
parent | 109a008bfe73322c1e2b16a7d23eb9899afe4352 (diff) |
[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 <poornima.vonti@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/qla4xxx')
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_os.c | 6 |
1 files changed, 6 insertions, 0 deletions
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, | |||
5240 | * NOTE: interrupts enabled upon successful completion | 5240 | * NOTE: interrupts enabled upon successful completion |
5241 | */ | 5241 | */ |
5242 | status = qla4xxx_initialize_adapter(ha, INIT_ADAPTER); | 5242 | status = qla4xxx_initialize_adapter(ha, INIT_ADAPTER); |
5243 | |||
5244 | /* Dont retry adapter initialization if IRQ allocation failed */ | ||
5245 | if (!test_bit(AF_IRQ_ATTACHED, &ha->flags)) | ||
5246 | goto skip_retry_init; | ||
5247 | |||
5243 | while ((!test_bit(AF_ONLINE, &ha->flags)) && | 5248 | while ((!test_bit(AF_ONLINE, &ha->flags)) && |
5244 | init_retry_count++ < MAX_INIT_RETRIES) { | 5249 | init_retry_count++ < MAX_INIT_RETRIES) { |
5245 | 5250 | ||
@@ -5264,6 +5269,7 @@ static int __devinit qla4xxx_probe_adapter(struct pci_dev *pdev, | |||
5264 | status = qla4xxx_initialize_adapter(ha, INIT_ADAPTER); | 5269 | status = qla4xxx_initialize_adapter(ha, INIT_ADAPTER); |
5265 | } | 5270 | } |
5266 | 5271 | ||
5272 | skip_retry_init: | ||
5267 | if (!test_bit(AF_ONLINE, &ha->flags)) { | 5273 | if (!test_bit(AF_ONLINE, &ha->flags)) { |
5268 | ql4_printk(KERN_WARNING, ha, "Failed to initialize adapter\n"); | 5274 | ql4_printk(KERN_WARNING, ha, "Failed to initialize adapter\n"); |
5269 | 5275 | ||