]> git.baikalelectronics.ru Git - kernel.git/commit
megaraid_sas: fix bug in handling return value of pci_enable_msix_range()
authorJiang Liu <jiang.liu@linux.intel.com>
Mon, 3 Nov 2014 12:44:20 +0000 (20:44 +0800)
committerChristoph Hellwig <hch@lst.de>
Mon, 10 Nov 2014 14:25:41 +0000 (15:25 +0100)
commitc7fed569f63ada68924309dfe451de91b364a780
treece25e64b82f526a40cdf90500a35d6e414d72a0f
parentb66b9b4267af6f3d0523aeeb879fd8cc08554e5f
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: 4ae93043e3a3 "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
drivers/scsi/megaraid/megaraid_sas_base.c