From: Himanshu Madhani <himanshu.madhani@cavium.com>
To: James.Bottomley@HansenPartnership.com, martin.petersen@oracle.com
Cc: himanshu.madhani@cavium.com, linux-scsi@vger.kernel.org
Subject: [PATCH 1/3] qla2xxx: Cleaned up queue configuration code.
Date: Wed, 15 Feb 2017 15:37:19 -0800 [thread overview]
Message-ID: <1487201841-28846-2-git-send-email-himanshu.madhani@cavium.com> (raw)
In-Reply-To: <1487201841-28846-1-git-send-email-himanshu.madhani@cavium.com>
From: Michael Hernandez <michael.hernandez@cavium.com>
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.
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>
---
drivers/scsi/qla2xxx/qla_os.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index d01c90c..8174cee 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -1815,6 +1815,7 @@ uint32_t qla2x00_isp_reg_stat(struct qla_hw_data *ha)
/* Determine queue resources */
ha->max_req_queues = ha->max_rsp_queues = 1;
+ ha->msix_count = QLA_BASE_VECTORS;
if (!ql2xmqsupport || (!IS_QLA25XX(ha) && !IS_QLA81XX(ha)))
goto mqiobase_exit;
@@ -1842,9 +1843,8 @@ uint32_t qla2x00_isp_reg_stat(struct qla_hw_data *ha)
"BAR 3 not enabled.\n");
mqiobase_exit:
- ha->msix_count = ha->max_rsp_queues + 1;
ql_dbg_pci(ql_dbg_init, ha->pdev, 0x001c,
- "MSIX Count:%d.\n", ha->msix_count);
+ "MSIX Count: %d.\n", ha->msix_count);
return (0);
iospace_error_exit:
@@ -1892,6 +1892,7 @@ uint32_t qla2x00_isp_reg_stat(struct qla_hw_data *ha)
/* 83XX 26XX always use MQ type access for queues
* - mbar 2, a.k.a region 4 */
ha->max_req_queues = ha->max_rsp_queues = 1;
+ ha->msix_count = QLA_BASE_VECTORS;
ha->mqiobase = ioremap(pci_resource_start(ha->pdev, 4),
pci_resource_len(ha->pdev, 4));
@@ -1934,14 +1935,8 @@ uint32_t qla2x00_isp_reg_stat(struct qla_hw_data *ha)
"BAR 1 not enabled.\n");
mqiobase_exit:
- ha->msix_count = ha->max_rsp_queues + 1;
- if (QLA_TGT_MODE_ENABLED())
- ha->msix_count++;
-
- qlt_83xx_iospace_config(ha);
-
ql_dbg_pci(ql_dbg_init, ha->pdev, 0x011f,
- "MSIX Count:%d.\n", ha->msix_count);
+ "MSIX Count: %d.\n", ha->msix_count);
return 0;
iospace_error_exit:
--
1.8.3.1
next prev parent reply other threads:[~2017-02-15 23:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-15 23:37 [PATCH 0/3] qla2xxx: Bug fixes and cleanup for the driver Himanshu Madhani
2017-02-15 23:37 ` Himanshu Madhani [this message]
2017-02-15 23:37 ` [PATCH 2/3] qla2xxx: Fix response queue count for Target mode Himanshu Madhani
2017-02-15 23:37 ` [PATCH 3/3] qla2xxx: Fix Regression introduced by pci_alloc_irq_vectors_affinity call Himanshu Madhani
2017-02-21 3:16 ` [PATCH 0/3] qla2xxx: Bug fixes and cleanup for the driver Martin K. Petersen
2017-02-21 17:23 ` Madhani, Himanshu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1487201841-28846-2-git-send-email-himanshu.madhani@cavium.com \
--to=himanshu.madhani@cavium.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.