diff options
author | adam radford <aradford@gmail.com> | 2011-05-11 21:33:47 -0400 |
---|---|---|
committer | James Bottomley <jbottomley@parallels.com> | 2011-05-24 12:34:12 -0400 |
commit | 3f1abce4aba4ced0ba8be54b22f2882bdd01c746 (patch) | |
tree | db339bb55bc3de8a7c544bd7dfe9f85455bf4329 /drivers/scsi/megaraid | |
parent | bb650a1bef73a8c1fd076fae4c4f0701cf3b5f25 (diff) |
[SCSI] megaraid_sas: Remove MSI-X black list, use MFI_REG_STATE instead
This patch for megaraid_sas removes the MSI-X black list and uses
MFI_REG_STATE.ready.msiEnable instead.
Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <jbottomley@parallels.com>
Diffstat (limited to 'drivers/scsi/megaraid')
-rw-r--r-- | drivers/scsi/megaraid/megaraid_sas_base.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index 89c623ebadbc..19a55032218f 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c | |||
@@ -3454,7 +3454,7 @@ static int megasas_init_fw(struct megasas_instance *instance) | |||
3454 | { | 3454 | { |
3455 | u32 max_sectors_1; | 3455 | u32 max_sectors_1; |
3456 | u32 max_sectors_2; | 3456 | u32 max_sectors_2; |
3457 | u32 tmp_sectors; | 3457 | u32 tmp_sectors, msix_enable; |
3458 | struct megasas_register_set __iomem *reg_set; | 3458 | struct megasas_register_set __iomem *reg_set; |
3459 | struct megasas_ctrl_info *ctrl_info; | 3459 | struct megasas_ctrl_info *ctrl_info; |
3460 | unsigned long bar_list; | 3460 | unsigned long bar_list; |
@@ -3507,6 +3507,13 @@ static int megasas_init_fw(struct megasas_instance *instance) | |||
3507 | if (megasas_transition_to_ready(instance)) | 3507 | if (megasas_transition_to_ready(instance)) |
3508 | goto fail_ready_state; | 3508 | goto fail_ready_state; |
3509 | 3509 | ||
3510 | /* Check if MSI-X is supported while in ready state */ | ||
3511 | msix_enable = (instance->instancet->read_fw_status_reg(reg_set) & | ||
3512 | 0x4000000) >> 0x1a; | ||
3513 | if (msix_enable && !msix_disable && | ||
3514 | !pci_enable_msix(instance->pdev, &instance->msixentry, 1)) | ||
3515 | instance->msi_flag = 1; | ||
3516 | |||
3510 | /* Get operational params, sge flags, send init cmd to controller */ | 3517 | /* Get operational params, sge flags, send init cmd to controller */ |
3511 | if (instance->instancet->init_adapter(instance)) | 3518 | if (instance->instancet->init_adapter(instance)) |
3512 | goto fail_init_adapter; | 3519 | goto fail_init_adapter; |
@@ -4076,14 +4083,6 @@ megasas_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
4076 | else | 4083 | else |
4077 | INIT_WORK(&instance->work_init, process_fw_state_change_wq); | 4084 | INIT_WORK(&instance->work_init, process_fw_state_change_wq); |
4078 | 4085 | ||
4079 | /* Try to enable MSI-X */ | ||
4080 | if ((instance->pdev->device != PCI_DEVICE_ID_LSI_SAS1078R) && | ||
4081 | (instance->pdev->device != PCI_DEVICE_ID_LSI_SAS1078DE) && | ||
4082 | (instance->pdev->device != PCI_DEVICE_ID_LSI_VERDE_ZCR) && | ||
4083 | !msix_disable && !pci_enable_msix(instance->pdev, | ||
4084 | &instance->msixentry, 1)) | ||
4085 | instance->msi_flag = 1; | ||
4086 | |||
4087 | /* | 4086 | /* |
4088 | * Initialize MFI Firmware | 4087 | * Initialize MFI Firmware |
4089 | */ | 4088 | */ |
@@ -4332,10 +4331,6 @@ megasas_resume(struct pci_dev *pdev) | |||
4332 | if (megasas_set_dma_mask(pdev)) | 4331 | if (megasas_set_dma_mask(pdev)) |
4333 | goto fail_set_dma_mask; | 4332 | goto fail_set_dma_mask; |
4334 | 4333 | ||
4335 | /* Now re-enable MSI-X */ | ||
4336 | if (instance->msi_flag) | ||
4337 | pci_enable_msix(instance->pdev, &instance->msixentry, 1); | ||
4338 | |||
4339 | /* | 4334 | /* |
4340 | * Initialize MFI Firmware | 4335 | * Initialize MFI Firmware |
4341 | */ | 4336 | */ |
@@ -4348,6 +4343,10 @@ megasas_resume(struct pci_dev *pdev) | |||
4348 | if (megasas_transition_to_ready(instance)) | 4343 | if (megasas_transition_to_ready(instance)) |
4349 | goto fail_ready_state; | 4344 | goto fail_ready_state; |
4350 | 4345 | ||
4346 | /* Now re-enable MSI-X */ | ||
4347 | if (instance->msi_flag) | ||
4348 | pci_enable_msix(instance->pdev, &instance->msixentry, 1); | ||
4349 | |||
4351 | switch (instance->pdev->device) { | 4350 | switch (instance->pdev->device) { |
4352 | case PCI_DEVICE_ID_LSI_FUSION: | 4351 | case PCI_DEVICE_ID_LSI_FUSION: |
4353 | { | 4352 | { |