[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>
This commit is contained in:
parent
53ef2bbd20
commit
0a77066acc
|
@ -4039,12 +4039,6 @@ megasas_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||||
else
|
else
|
||||||
INIT_WORK(&instance->work_init, process_fw_state_change_wq);
|
INIT_WORK(&instance->work_init, process_fw_state_change_wq);
|
||||||
|
|
||||||
/*
|
|
||||||
* Initialize MFI Firmware
|
|
||||||
*/
|
|
||||||
if (megasas_init_fw(instance))
|
|
||||||
goto fail_init_mfi;
|
|
||||||
|
|
||||||
/* Try to enable MSI-X */
|
/* Try to enable MSI-X */
|
||||||
if ((instance->pdev->device != PCI_DEVICE_ID_LSI_SAS1078R) &&
|
if ((instance->pdev->device != PCI_DEVICE_ID_LSI_SAS1078R) &&
|
||||||
(instance->pdev->device != PCI_DEVICE_ID_LSI_SAS1078DE) &&
|
(instance->pdev->device != PCI_DEVICE_ID_LSI_SAS1078DE) &&
|
||||||
|
@ -4053,6 +4047,12 @@ megasas_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||||
&instance->msixentry, 1))
|
&instance->msixentry, 1))
|
||||||
instance->msi_flag = 1;
|
instance->msi_flag = 1;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Initialize MFI Firmware
|
||||||
|
*/
|
||||||
|
if (megasas_init_fw(instance))
|
||||||
|
goto fail_init_mfi;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Register IRQ
|
* Register IRQ
|
||||||
*/
|
*/
|
||||||
|
@ -4106,13 +4106,13 @@ megasas_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||||
free_irq(instance->msi_flag ? instance->msixentry.vector :
|
free_irq(instance->msi_flag ? instance->msixentry.vector :
|
||||||
instance->pdev->irq, instance);
|
instance->pdev->irq, instance);
|
||||||
fail_irq:
|
fail_irq:
|
||||||
if (instance->msi_flag)
|
|
||||||
pci_disable_msix(instance->pdev);
|
|
||||||
if (instance->pdev->device == PCI_DEVICE_ID_LSI_FUSION)
|
if (instance->pdev->device == PCI_DEVICE_ID_LSI_FUSION)
|
||||||
megasas_release_fusion(instance);
|
megasas_release_fusion(instance);
|
||||||
else
|
else
|
||||||
megasas_release_mfi(instance);
|
megasas_release_mfi(instance);
|
||||||
fail_init_mfi:
|
fail_init_mfi:
|
||||||
|
if (instance->msi_flag)
|
||||||
|
pci_disable_msix(instance->pdev);
|
||||||
fail_alloc_dma_buf:
|
fail_alloc_dma_buf:
|
||||||
if (instance->evt_detail)
|
if (instance->evt_detail)
|
||||||
pci_free_consistent(pdev, sizeof(struct megasas_evt_detail),
|
pci_free_consistent(pdev, sizeof(struct megasas_evt_detail),
|
||||||
|
@ -4295,6 +4295,10 @@ megasas_resume(struct pci_dev *pdev)
|
||||||
if (megasas_set_dma_mask(pdev))
|
if (megasas_set_dma_mask(pdev))
|
||||||
goto fail_set_dma_mask;
|
goto fail_set_dma_mask;
|
||||||
|
|
||||||
|
/* Now re-enable MSI-X */
|
||||||
|
if (instance->msi_flag)
|
||||||
|
pci_enable_msix(instance->pdev, &instance->msixentry, 1);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialize MFI Firmware
|
* Initialize MFI Firmware
|
||||||
*/
|
*/
|
||||||
|
@ -4331,10 +4335,6 @@ megasas_resume(struct pci_dev *pdev)
|
||||||
tasklet_init(&instance->isr_tasklet, instance->instancet->tasklet,
|
tasklet_init(&instance->isr_tasklet, instance->instancet->tasklet,
|
||||||
(unsigned long)instance);
|
(unsigned long)instance);
|
||||||
|
|
||||||
/* Now re-enable MSI-X */
|
|
||||||
if (instance->msi_flag)
|
|
||||||
pci_enable_msix(instance->pdev, &instance->msixentry, 1);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Register IRQ
|
* Register IRQ
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue