Skip to content

Commit f54f2cb

Browse files
Michael Hernandezmartinkpetersen
authored andcommitted
scsi: qla2xxx: Cleaned up queue configuration code.
This patch cleaned up queue configuration code, such that once initialized, we should not touch msix_count value. This will prevent incorrect numbers of MSI-X vectors requested while performing target mode configuration. [mkp: fixed Fixes: hash] Cc: <stable@vger.kernel.org> Fixes: d745952 ("scsi: qla2xxx: Add multiple queue pair functionality.") Signed-off-by: Michael Hernandez <michael.hernandez@cavium.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 75d943f commit f54f2cb

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

drivers/scsi/qla2xxx/qla_os.c

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1815,6 +1815,7 @@ qla2x00_iospace_config(struct qla_hw_data *ha)
18151815

18161816
/* Determine queue resources */
18171817
ha->max_req_queues = ha->max_rsp_queues = 1;
1818+
ha->msix_count = QLA_BASE_VECTORS;
18181819
if (!ql2xmqsupport || (!IS_QLA25XX(ha) && !IS_QLA81XX(ha)))
18191820
goto mqiobase_exit;
18201821

@@ -1842,9 +1843,8 @@ qla2x00_iospace_config(struct qla_hw_data *ha)
18421843
"BAR 3 not enabled.\n");
18431844

18441845
mqiobase_exit:
1845-
ha->msix_count = ha->max_rsp_queues + 1;
18461846
ql_dbg_pci(ql_dbg_init, ha->pdev, 0x001c,
1847-
"MSIX Count:%d.\n", ha->msix_count);
1847+
"MSIX Count: %d.\n", ha->msix_count);
18481848
return (0);
18491849

18501850
iospace_error_exit:
@@ -1892,6 +1892,7 @@ qla83xx_iospace_config(struct qla_hw_data *ha)
18921892
/* 83XX 26XX always use MQ type access for queues
18931893
* - mbar 2, a.k.a region 4 */
18941894
ha->max_req_queues = ha->max_rsp_queues = 1;
1895+
ha->msix_count = QLA_BASE_VECTORS;
18951896
ha->mqiobase = ioremap(pci_resource_start(ha->pdev, 4),
18961897
pci_resource_len(ha->pdev, 4));
18971898

@@ -1934,14 +1935,8 @@ qla83xx_iospace_config(struct qla_hw_data *ha)
19341935
"BAR 1 not enabled.\n");
19351936

19361937
mqiobase_exit:
1937-
ha->msix_count = ha->max_rsp_queues + 1;
1938-
if (QLA_TGT_MODE_ENABLED())
1939-
ha->msix_count++;
1940-
1941-
qlt_83xx_iospace_config(ha);
1942-
19431938
ql_dbg_pci(ql_dbg_init, ha->pdev, 0x011f,
1944-
"MSIX Count:%d.\n", ha->msix_count);
1939+
"MSIX Count: %d.\n", ha->msix_count);
19451940
return 0;
19461941

19471942
iospace_error_exit:

0 commit comments

Comments
 (0)