]> git.baikalelectronics.ru Git - kernel.git/commitdiff
scsi: qla2xxx: Turn off multi-queue for 8G adapters
authorQuinn Tran <qutran@marvell.com>
Thu, 16 Jun 2022 05:35:01 +0000 (22:35 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:24:17 +0000 (14:24 +0200)
commit 226e0f9e02e7886f2d24eed22abbedc3ffbaaafc upstream.

For 8G adapters, multi-queue was enabled accidentally. Make sure
multi-queue is not enabled.

Link: https://lore.kernel.org/r/20220616053508.27186-5-njavali@marvell.com
Cc: stable@vger.kernel.org
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/qla2xxx/qla_def.h
drivers/scsi/qla2xxx/qla_isr.c

index 4fc289815ccb85c68ba5fc5a4b6db32f45947def..15eeefc5e0a58a3e08229babfff0805f959c530c 100644 (file)
@@ -4261,8 +4261,8 @@ struct qla_hw_data {
 #define IS_OEM_001(ha)          ((ha)->device_type & DT_OEM_001)
 #define HAS_EXTENDED_IDS(ha)    ((ha)->device_type & DT_EXTENDED_IDS)
 #define IS_CT6_SUPPORTED(ha)   ((ha)->device_type & DT_CT6_SUPPORTED)
-#define IS_MQUE_CAPABLE(ha)    ((ha)->mqenable || IS_QLA83XX(ha) || \
-                               IS_QLA27XX(ha) || IS_QLA28XX(ha))
+#define IS_MQUE_CAPABLE(ha)    (IS_QLA83XX(ha) || IS_QLA27XX(ha) || \
+                                IS_QLA28XX(ha))
 #define IS_BIDI_CAPABLE(ha) \
     (IS_QLA25XX(ha) || IS_QLA2031(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha))
 /* Bit 21 of fw_attributes decides the MCTP capabilities */
index c41a965eb4a72de016bd1610cb0a4daaec08ce11..ad401c8b3d8945efd5ee9ffbe698a92d591302fa 100644 (file)
@@ -4415,16 +4415,12 @@ msix_register_fail:
        }
 
        /* Enable MSI-X vector for response queue update for queue 0 */
-       if (IS_QLA83XX(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha)) {
-               if (ha->msixbase && ha->mqiobase &&
-                   (ha->max_rsp_queues > 1 || ha->max_req_queues > 1 ||
-                    ql2xmqsupport))
-                       ha->mqenable = 1;
-       } else
-               if (ha->mqiobase &&
-                   (ha->max_rsp_queues > 1 || ha->max_req_queues > 1 ||
-                    ql2xmqsupport))
-                       ha->mqenable = 1;
+       if (IS_MQUE_CAPABLE(ha) &&
+           (ha->msixbase && ha->mqiobase && ha->max_qpairs))
+               ha->mqenable = 1;
+       else
+               ha->mqenable = 0;
+
        ql_dbg(ql_dbg_multiq, vha, 0xc005,
            "mqiobase=%p, max_rsp_queues=%d, max_req_queues=%d.\n",
            ha->mqiobase, ha->max_rsp_queues, ha->max_req_queues);