diff options
author | Tomas Henzl <thenzl@redhat.com> | 2016-11-01 17:32:02 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-11-16 20:19:29 -0500 |
commit | 18103efcacee0563d57c3b7af8d849faae62a117 (patch) | |
tree | 6e573ed3c79649359035f95c3b578ad193ca5ccf /drivers/scsi/megaraid | |
parent | 7dc62d935459fc48778d9306f2094a8fd16614dd (diff) | |
download | linux-18103efcacee0563d57c3b7af8d849faae62a117.tar.gz |
scsi: megaraid-sas: request irqs later
It is not good when an irq arrives before driver structures are
allocated.
Signed-off-by: Tomas Henzl <thenzl@redhat.com>
Acked-by: Sumit Saxena <sumit.saxena@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/megaraid')
-rw-r--r-- | drivers/scsi/megaraid/megaraid_sas_base.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index d8eaf533b407..546267698486 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c @@ -5149,11 +5149,6 @@ static int megasas_init_fw(struct megasas_instance *instance) tasklet_init(&instance->isr_tasklet, instance->instancet->tasklet, (unsigned long)instance); - if (instance->msix_vectors ? - megasas_setup_irqs_msix(instance, 1) : - megasas_setup_irqs_ioapic(instance)) - goto fail_setup_irqs; - instance->ctrl_info = kzalloc(sizeof(struct megasas_ctrl_info), GFP_KERNEL); if (instance->ctrl_info == NULL) @@ -5169,6 +5164,10 @@ static int megasas_init_fw(struct megasas_instance *instance) if (instance->instancet->init_adapter(instance)) goto fail_init_adapter; + if (instance->msix_vectors ? + megasas_setup_irqs_msix(instance, 1) : + megasas_setup_irqs_ioapic(instance)) + goto fail_init_adapter; instance->instancet->enable_intr(instance); @@ -5308,9 +5307,8 @@ static int megasas_init_fw(struct megasas_instance *instance) fail_get_pd_list: instance->instancet->disable_intr(instance); -fail_init_adapter: megasas_destroy_irqs(instance); -fail_setup_irqs: +fail_init_adapter: if (instance->msix_vectors) pci_disable_msix(instance->pdev); instance->msix_vectors = 0; |