aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/megaraid
diff options
context:
space:
mode:
authorJiang Liu <jiang.liu@linux.intel.com>2014-11-03 07:44:20 -0500
committerChristoph Hellwig <hch@lst.de>2014-11-10 09:25:41 -0500
commitc12de882e7765585ae3a2ae22aa569285951613a (patch)
treece25e64b82f526a40cdf90500a35d6e414d72a0f /drivers/scsi/megaraid
parent7b07bf244ae33e4ce8d51c23f1359121942a6f3e (diff)
megaraid_sas: fix bug in handling return value of pci_enable_msix_range()
Function pci_enable_msix_range() may return negative values for error conditions. So it's a bug by checking (pci_enable_msix_range() != 0) for success and causes failure to megaraid driver when MSI is disabled. [ 16.487267] megaraid_sas 0000:02:00.0: Controller type: iMR [ 16.487275] genirq: Flags mismatch irq 0. 00000000 (megasas) vs. 00015a00 (tii mer) [ 16.487347] megasas: Failed to register IRQ for vector 0. Fixes: 8ae80ed1734b "megaraid: Use pci_enable_msix_range() instead of pci_enable_msix()" Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com> Acked-by: Sumit Saxena <sumit.saxena@avagotech.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: <stable@vger.kernel.org> # 3.17
Diffstat (limited to 'drivers/scsi/megaraid')
-rw-r--r--drivers/scsi/megaraid/megaraid_sas_base.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index f6a69a3b1b3f..5640ad1c8214 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -4453,7 +4453,7 @@ static int megasas_init_fw(struct megasas_instance *instance)
4453 instance->msixentry[i].entry = i; 4453 instance->msixentry[i].entry = i;
4454 i = pci_enable_msix_range(instance->pdev, instance->msixentry, 4454 i = pci_enable_msix_range(instance->pdev, instance->msixentry,
4455 1, instance->msix_vectors); 4455 1, instance->msix_vectors);
4456 if (i) 4456 if (i > 0)
4457 instance->msix_vectors = i; 4457 instance->msix_vectors = i;
4458 else 4458 else
4459 instance->msix_vectors = 0; 4459 instance->msix_vectors = 0;