mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-23 13:41:27 +00:00
qla2x00t-32gbit: Fix qla2x00_request_irqs() for MSI
Commit 4fa183455988 ("scsi: qla2xxx: Utilize pci_alloc_irq_vectors/
pci_free_irq_vectors calls.") use pci_alloc_irq_vectors() to replace
pci_enable_msi() but it didn't handle the return value correctly. This bug
make qla2x00 always fail to setup MSI if MSI-X fail, so fix it.
BTW, improve the log message of return value in qla2x00_request_irqs() to
avoid confusion.
Fixes: 4fa183455988 ("scsi: qla2xxx: Utilize pci_alloc_irq_vectors/pci_free_irq_vectors calls.")
Cc: Michael Hernandez <michael.hernandez@cavium.com>
Link: https://lore.kernel.org/r/1574314847-14280-1-git-send-email-chenhc@lemote.com
Signed-off-by: Huacai Chen <chenhc@lemote.com>
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
[ commit 45dc8f2d9c94ed74a5e31e63e9136a19a7e16081 upstream ]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8726 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -3763,7 +3763,7 @@ qla2x00_request_irqs(struct qla_hw_data *ha, struct rsp_que *rsp)
|
||||
skip_msix:
|
||||
|
||||
ql_log(ql_log_info, vha, 0x0037,
|
||||
"Falling back-to MSI mode -%d.\n", ret);
|
||||
"Falling back-to MSI mode -- ret=%d.\n", ret);
|
||||
|
||||
if (!IS_QLA24XX(ha) && !IS_QLA2532(ha) && !IS_QLA8432(ha) &&
|
||||
!IS_QLA8001(ha) && !IS_P3P_TYPE(ha) && !IS_QLAFX00(ha) &&
|
||||
@@ -3775,13 +3775,13 @@ skip_msix:
|
||||
#else
|
||||
ret = pci_alloc_irq_vectors(ha->pdev, 1, 1, PCI_IRQ_MSI);
|
||||
#endif
|
||||
if (!ret) {
|
||||
if (ret > 0) {
|
||||
ql_dbg(ql_dbg_init, vha, 0x0038,
|
||||
"MSI: Enabled.\n");
|
||||
ha->flags.msi_enabled = 1;
|
||||
} else
|
||||
ql_log(ql_log_warn, vha, 0x0039,
|
||||
"Falling back-to INTa mode -- %d.\n", ret);
|
||||
"Falling back-to INTa mode -- ret=%d.\n", ret);
|
||||
skip_msi:
|
||||
|
||||
/* Skip INTx on ISP82xx. */
|
||||
|
||||
Reference in New Issue
Block a user