Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 252412
b: refs/heads/master
c: 3f1abce
h: refs/heads/master
v: v3
  • Loading branch information
adam radford authored and James Bottomley committed May 24, 2011
1 parent e9ed069 commit c4af9fe
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bb650a1bef73a8c1fd076fae4c4f0701cf3b5f25
refs/heads/master: 3f1abce4aba4ced0ba8be54b22f2882bdd01c746
25 changes: 12 additions & 13 deletions trunk/drivers/scsi/megaraid/megaraid_sas_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -3454,7 +3454,7 @@ static int megasas_init_fw(struct megasas_instance *instance)
{
u32 max_sectors_1;
u32 max_sectors_2;
u32 tmp_sectors;
u32 tmp_sectors, msix_enable;
struct megasas_register_set __iomem *reg_set;
struct megasas_ctrl_info *ctrl_info;
unsigned long bar_list;
Expand Down Expand Up @@ -3507,6 +3507,13 @@ static int megasas_init_fw(struct megasas_instance *instance)
if (megasas_transition_to_ready(instance))
goto fail_ready_state;

/* Check if MSI-X is supported while in ready state */
msix_enable = (instance->instancet->read_fw_status_reg(reg_set) &
0x4000000) >> 0x1a;
if (msix_enable && !msix_disable &&
!pci_enable_msix(instance->pdev, &instance->msixentry, 1))
instance->msi_flag = 1;

/* Get operational params, sge flags, send init cmd to controller */
if (instance->instancet->init_adapter(instance))
goto fail_init_adapter;
Expand Down Expand Up @@ -4076,14 +4083,6 @@ megasas_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
else
INIT_WORK(&instance->work_init, process_fw_state_change_wq);

/* Try to enable MSI-X */
if ((instance->pdev->device != PCI_DEVICE_ID_LSI_SAS1078R) &&
(instance->pdev->device != PCI_DEVICE_ID_LSI_SAS1078DE) &&
(instance->pdev->device != PCI_DEVICE_ID_LSI_VERDE_ZCR) &&
!msix_disable && !pci_enable_msix(instance->pdev,
&instance->msixentry, 1))
instance->msi_flag = 1;

/*
* Initialize MFI Firmware
*/
Expand Down Expand Up @@ -4332,10 +4331,6 @@ megasas_resume(struct pci_dev *pdev)
if (megasas_set_dma_mask(pdev))
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
*/
Expand All @@ -4348,6 +4343,10 @@ megasas_resume(struct pci_dev *pdev)
if (megasas_transition_to_ready(instance))
goto fail_ready_state;

/* Now re-enable MSI-X */
if (instance->msi_flag)
pci_enable_msix(instance->pdev, &instance->msixentry, 1);

switch (instance->pdev->device) {
case PCI_DEVICE_ID_LSI_FUSION:
{
Expand Down

0 comments on commit c4af9fe

Please sign in to comment.