diff options
author | adam radford <aradford@gmail.com> | 2011-02-24 23:56:12 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2011-02-28 12:45:54 -0500 |
commit | 0a77066acc78b4048b0afc9d70b7e91c06e63356 (patch) | |
tree | 8970aeedb9a2c40308dbf905a3cd51376fc7c85b /drivers/scsi/megaraid/megaraid_sas_base.c | |
parent | 53ef2bbd2068097ac453dff4a3d82858446be5bb (diff) |
[SCSI] megaraid_sas: Enable MSI-X before calling megasas_init_fw
Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/megaraid/megaraid_sas_base.c')
-rw-r--r-- | drivers/scsi/megaraid/megaraid_sas_base.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index c4ac4a5a075a..78c263337b0b 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c | |||
@@ -4039,12 +4039,6 @@ megasas_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
4039 | else | 4039 | else |
4040 | INIT_WORK(&instance->work_init, process_fw_state_change_wq); | 4040 | INIT_WORK(&instance->work_init, process_fw_state_change_wq); |
4041 | 4041 | ||
4042 | /* | ||
4043 | * Initialize MFI Firmware | ||
4044 | */ | ||
4045 | if (megasas_init_fw(instance)) | ||
4046 | goto fail_init_mfi; | ||
4047 | |||
4048 | /* Try to enable MSI-X */ | 4042 | /* Try to enable MSI-X */ |
4049 | if ((instance->pdev->device != PCI_DEVICE_ID_LSI_SAS1078R) && | 4043 | if ((instance->pdev->device != PCI_DEVICE_ID_LSI_SAS1078R) && |
4050 | (instance->pdev->device != PCI_DEVICE_ID_LSI_SAS1078DE) && | 4044 | (instance->pdev->device != PCI_DEVICE_ID_LSI_SAS1078DE) && |
@@ -4054,6 +4048,12 @@ megasas_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
4054 | instance->msi_flag = 1; | 4048 | instance->msi_flag = 1; |
4055 | 4049 | ||
4056 | /* | 4050 | /* |
4051 | * Initialize MFI Firmware | ||
4052 | */ | ||
4053 | if (megasas_init_fw(instance)) | ||
4054 | goto fail_init_mfi; | ||
4055 | |||
4056 | /* | ||
4057 | * Register IRQ | 4057 | * Register IRQ |
4058 | */ | 4058 | */ |
4059 | if (request_irq(instance->msi_flag ? instance->msixentry.vector : | 4059 | if (request_irq(instance->msi_flag ? instance->msixentry.vector : |
@@ -4106,13 +4106,13 @@ megasas_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
4106 | free_irq(instance->msi_flag ? instance->msixentry.vector : | 4106 | free_irq(instance->msi_flag ? instance->msixentry.vector : |
4107 | instance->pdev->irq, instance); | 4107 | instance->pdev->irq, instance); |
4108 | fail_irq: | 4108 | fail_irq: |
4109 | if (instance->msi_flag) | ||
4110 | pci_disable_msix(instance->pdev); | ||
4111 | if (instance->pdev->device == PCI_DEVICE_ID_LSI_FUSION) | 4109 | if (instance->pdev->device == PCI_DEVICE_ID_LSI_FUSION) |
4112 | megasas_release_fusion(instance); | 4110 | megasas_release_fusion(instance); |
4113 | else | 4111 | else |
4114 | megasas_release_mfi(instance); | 4112 | megasas_release_mfi(instance); |
4115 | fail_init_mfi: | 4113 | fail_init_mfi: |
4114 | if (instance->msi_flag) | ||
4115 | pci_disable_msix(instance->pdev); | ||
4116 | fail_alloc_dma_buf: | 4116 | fail_alloc_dma_buf: |
4117 | if (instance->evt_detail) | 4117 | if (instance->evt_detail) |
4118 | pci_free_consistent(pdev, sizeof(struct megasas_evt_detail), | 4118 | pci_free_consistent(pdev, sizeof(struct megasas_evt_detail), |
@@ -4295,6 +4295,10 @@ megasas_resume(struct pci_dev *pdev) | |||
4295 | if (megasas_set_dma_mask(pdev)) | 4295 | if (megasas_set_dma_mask(pdev)) |
4296 | goto fail_set_dma_mask; | 4296 | goto fail_set_dma_mask; |
4297 | 4297 | ||
4298 | /* Now re-enable MSI-X */ | ||
4299 | if (instance->msi_flag) | ||
4300 | pci_enable_msix(instance->pdev, &instance->msixentry, 1); | ||
4301 | |||
4298 | /* | 4302 | /* |
4299 | * Initialize MFI Firmware | 4303 | * Initialize MFI Firmware |
4300 | */ | 4304 | */ |
@@ -4331,10 +4335,6 @@ megasas_resume(struct pci_dev *pdev) | |||
4331 | tasklet_init(&instance->isr_tasklet, instance->instancet->tasklet, | 4335 | tasklet_init(&instance->isr_tasklet, instance->instancet->tasklet, |
4332 | (unsigned long)instance); | 4336 | (unsigned long)instance); |
4333 | 4337 | ||
4334 | /* Now re-enable MSI-X */ | ||
4335 | if (instance->msi_flag) | ||
4336 | pci_enable_msix(instance->pdev, &instance->msixentry, 1); | ||
4337 | |||
4338 | /* | 4338 | /* |
4339 | * Register IRQ | 4339 | * Register IRQ |
4340 | */ | 4340 | */ |