* [PATCH 0/3] qla2xxx: Bug fixes and cleanup for the driver.
@ 2017-02-15 23:37 Himanshu Madhani
2017-02-15 23:37 ` [PATCH 1/3] qla2xxx: Cleaned up queue configuration code Himanshu Madhani
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Himanshu Madhani @ 2017-02-15 23:37 UTC (permalink / raw)
To: James.Bottomley, martin.petersen; +Cc: himanshu.madhani, linux-scsi
Hi Martin,
This series contains small cleanup + fix for regression that was introduced by
pci_alloc_irq_vectors_affinity() call in driver.
Please apply this series to 4.10/scsi-fixes at your earliest convenience.
Thanks,
Himanshu
Michael Hernandez (3):
qla2xxx: Cleaned up queue configuration code.
qla2xxx: Fix response queue count for Target mode.
qla2xxx: Fix Regression introduced by pci_alloc_irq_vectors_affinity
call.
drivers/scsi/qla2xxx/qla_isr.c | 7 +++++--
drivers/scsi/qla2xxx/qla_os.c | 16 ++++++----------
2 files changed, 11 insertions(+), 12 deletions(-)
--
1.8.3.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/3] qla2xxx: Cleaned up queue configuration code.
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
2017-02-15 23:37 ` [PATCH 2/3] qla2xxx: Fix response queue count for Target mode Himanshu Madhani
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Himanshu Madhani @ 2017-02-15 23:37 UTC (permalink / raw)
To: James.Bottomley, martin.petersen; +Cc: himanshu.madhani, linux-scsi
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/3] qla2xxx: Fix response queue count for Target mode.
2017-02-15 23:37 [PATCH 0/3] qla2xxx: Bug fixes and cleanup for the driver Himanshu Madhani
2017-02-15 23:37 ` [PATCH 1/3] qla2xxx: Cleaned up queue configuration code Himanshu Madhani
@ 2017-02-15 23:37 ` 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
3 siblings, 0 replies; 6+ messages in thread
From: Himanshu Madhani @ 2017-02-15 23:37 UTC (permalink / raw)
To: James.Bottomley, martin.petersen; +Cc: himanshu.madhani, linux-scsi
From: Michael Hernandez <michael.hernandez@cavium.com>
Target mode initialization was not calculating response
queue values correctly resulting into one less MSI-X vector.
Fixes: 093df73 ("scsi: qla2xxx: Fix Target mode handling with Multiqueue changes.")
Signed-off-by: Michael Hernandez <michael.hernandez@cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
---
drivers/scsi/qla2xxx/qla_os.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 8174cee..71b6b20 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -1916,12 +1916,13 @@ uint32_t qla2x00_isp_reg_stat(struct qla_hw_data *ha)
if (ql2xmqsupport) {
/* MB interrupt uses 1 vector */
ha->max_req_queues = ha->msix_count - 1;
- ha->max_rsp_queues = ha->max_req_queues;
/* ATIOQ needs 1 vector. That's 1 less QPair */
if (QLA_TGT_MODE_ENABLED())
ha->max_req_queues--;
+ ha->max_rsp_queues = ha->max_req_queues;
+
/* Queue pairs is the max value minus
* the base queue pair */
ha->max_qpairs = ha->max_req_queues - 1;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/3] qla2xxx: Fix Regression introduced by pci_alloc_irq_vectors_affinity call.
2017-02-15 23:37 [PATCH 0/3] qla2xxx: Bug fixes and cleanup for the driver Himanshu Madhani
2017-02-15 23:37 ` [PATCH 1/3] qla2xxx: Cleaned up queue configuration code Himanshu Madhani
2017-02-15 23:37 ` [PATCH 2/3] qla2xxx: Fix response queue count for Target mode Himanshu Madhani
@ 2017-02-15 23:37 ` Himanshu Madhani
2017-02-21 3:16 ` [PATCH 0/3] qla2xxx: Bug fixes and cleanup for the driver Martin K. Petersen
3 siblings, 0 replies; 6+ messages in thread
From: Himanshu Madhani @ 2017-02-15 23:37 UTC (permalink / raw)
To: James.Bottomley, martin.petersen; +Cc: himanshu.madhani, linux-scsi
From: Michael Hernandez <michael.hernandez@cavium.com>
For target mode, we need to increase minimum vectors value by one to
account for ATIO queue.
Following stack trace will be seen
Call Trace:
qla24xx_config_rings+0x15a/0x230 [qla2xxx]
qla2x00_init_rings+0x1a1/0x3a0 [qla2xxx]
qla2x00_restart_isp+0x5c/0x120 [qla2xxx]
qla2x00_abort_isp+0x138/0x430 [qla2xxx]
? __schedule+0x260/0x580
qla2x00_do_dpc+0x3bc/0x920 [qla2xxx]
? qla2x00_relogin+0x290/0x290 [qla2xxx]
? schedule+0x3a/0xa0
? qla2x00_relogin+0x290/0x290 [qla2xxx]
kthread+0x103/0x140
? __kthread_init_worker+0x40/0x40
ret_from_fork+0x29/0x40
RIP: qlt_24xx_config_rings+0x6c/0x90
Fixes: 17e5fc5 ("scsi: qla2xxx: fix MSI-X vector affinity")
Signed-off-by: Michael Hernandez <michael.hernandez@cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
---
drivers/scsi/qla2xxx/qla_isr.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index 6e0a0f1..6b324ac 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -3013,14 +3013,17 @@ struct qla_init_msix_entry {
int i, ret;
struct qla_msix_entry *qentry;
scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev);
+ int min_vecs = QLA_BASE_VECTORS;
struct irq_affinity desc = {
.pre_vectors = QLA_BASE_VECTORS,
};
- if (QLA_TGT_MODE_ENABLED() && IS_ATIO_MSIX_CAPABLE(ha))
+ if (QLA_TGT_MODE_ENABLED() && IS_ATIO_MSIX_CAPABLE(ha)) {
desc.pre_vectors++;
+ min_vecs++;
+ }
- ret = pci_alloc_irq_vectors_affinity(ha->pdev, QLA_BASE_VECTORS,
+ ret = pci_alloc_irq_vectors_affinity(ha->pdev, min_vecs,
ha->msix_count, PCI_IRQ_MSIX | PCI_IRQ_AFFINITY,
&desc);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 0/3] qla2xxx: Bug fixes and cleanup for the driver.
2017-02-15 23:37 [PATCH 0/3] qla2xxx: Bug fixes and cleanup for the driver Himanshu Madhani
` (2 preceding siblings ...)
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 ` Martin K. Petersen
2017-02-21 17:23 ` Madhani, Himanshu
3 siblings, 1 reply; 6+ messages in thread
From: Martin K. Petersen @ 2017-02-21 3:16 UTC (permalink / raw)
To: Himanshu Madhani; +Cc: James.Bottomley, martin.petersen, linux-scsi
>>>>> "Himanshu" == Himanshu Madhani <himanshu.madhani@cavium.com> writes:
Hi Himanshu,
Himanshu> This series contains small cleanup + fix for regression that
Himanshu> was introduced by pci_alloc_irq_vectors_affinity() call in
Himanshu> driver.
Himanshu> Please apply this series to 4.10/scsi-fixes at your earliest
Himanshu> convenience.
4.10 is out and this series does not apply to 4.11/scsi-queue. Please
rebase.
Also, please make sure your "Fixes: d745952 ("scsi: qla2xxx:..." have a
12-char hash. And add a stable tag if you want these in 4.10.x.
Thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/3] qla2xxx: Bug fixes and cleanup for the driver.
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
0 siblings, 0 replies; 6+ messages in thread
From: Madhani, Himanshu @ 2017-02-21 17:23 UTC (permalink / raw)
To: Martin K. Petersen; +Cc: James.Bottomley, linux-scsi
Hi Martin,
On 2/20/17, 7:16 PM, "Martin K. Petersen" <martin.petersen@oracle.com> wrote:
>>>>> "Himanshu" == Himanshu Madhani <himanshu.madhani@cavium.com> writes:
Hi Himanshu,
Himanshu> This series contains small cleanup + fix for regression that
Himanshu> was introduced by pci_alloc_irq_vectors_affinity() call in
Himanshu> driver.
Himanshu> Please apply this series to 4.10/scsi-fixes at your earliest
Himanshu> convenience.
4.10 is out and this series does not apply to 4.11/scsi-queue. Please
rebase.
Also, please make sure your "Fixes: d745952 ("scsi: qla2xxx:..." have a
12-char hash. And add a stable tag if you want these in 4.10.x.
Thanks!
--
Martin K. Petersen Oracle Linux Engineering
Sure. Will rebase series on top of 4.11/scsi-queue and send it across.
Thanks,
Himanshu
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-02-21 17:23 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-15 23:37 [PATCH 0/3] qla2xxx: Bug fixes and cleanup for the driver Himanshu Madhani
2017-02-15 23:37 ` [PATCH 1/3] qla2xxx: Cleaned up queue configuration code Himanshu Madhani
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
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.