scsi: qla2xxx: Turn off target reset during issue_lip
authorQuinn Tran <qutran@marvell.com>
Tue, 26 Oct 2021 11:54:02 +0000 (04:54 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Nov 2021 10:48:38 +0000 (11:48 +0100)
[ Upstream commit 0b7a9fd934a68ebfc1019811b7bdc1742072ad7b ]

When user uses issue_lip to do link bounce, driver sends additional target
reset to remote device before resetting the link. The target reset would
affect other paths with active I/Os. This patch will remove the unnecessary
target reset.

Link: https://lore.kernel.org/r/20211026115412.27691-4-njavali@marvell.com
Fixes: 5854771e314e ("[SCSI] qla2xxx: Add ISPFX00 specific bus reset routine")
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
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: Sasha Levin <sashal@kernel.org>
drivers/scsi/qla2xxx/qla_gbl.h
drivers/scsi/qla2xxx/qla_mr.c
drivers/scsi/qla2xxx/qla_os.c

index 6ca00813c71f0702a49965d97c6240c6b3657307..4a1a16e6a820461b4111d5c665b1a42bfeae622c 100644 (file)
@@ -115,7 +115,6 @@ extern int ql2xasynctmfenable;
 extern int ql2xgffidenable;
 extern int ql2xenabledif;
 extern int ql2xenablehba_err_chk;
-extern int ql2xtargetreset;
 extern int ql2xdontresethba;
 extern uint64_t ql2xmaxlun;
 extern int ql2xmdcapmask;
@@ -655,7 +654,6 @@ extern void qlafx00_abort_iocb(srb_t *, struct abort_iocb_entry_fx00 *);
 extern void qlafx00_fxdisc_iocb(srb_t *, struct fxdisc_entry_fx00 *);
 extern void qlafx00_timer_routine(scsi_qla_host_t *);
 extern int qlafx00_rescan_isp(scsi_qla_host_t *);
-extern int qlafx00_loop_reset(scsi_qla_host_t *vha);
 
 /* qla82xx related functions */
 
index 15dff7099955b857d7a343661319ba9002cdea77..b72cc4b1287d92d6fa14944787cfe4f42a5191fc 100644 (file)
@@ -738,29 +738,6 @@ qlafx00_lun_reset(fc_port_t *fcport, uint64_t l, int tag)
        return qla2x00_async_tm_cmd(fcport, TCF_LUN_RESET, l, tag);
 }
 
-int
-qlafx00_loop_reset(scsi_qla_host_t *vha)
-{
-       int ret;
-       struct fc_port *fcport;
-       struct qla_hw_data *ha = vha->hw;
-
-       if (ql2xtargetreset) {
-               list_for_each_entry(fcport, &vha->vp_fcports, list) {
-                       if (fcport->port_type != FCT_TARGET)
-                               continue;
-
-                       ret = ha->isp_ops->target_reset(fcport, 0, 0);
-                       if (ret != QLA_SUCCESS) {
-                               ql_dbg(ql_dbg_taskm, vha, 0x803d,
-                                   "Bus Reset failed: Reset=%d "
-                                   "d_id=%x.\n", ret, fcport->d_id.b24);
-                       }
-               }
-       }
-       return QLA_SUCCESS;
-}
-
 int
 qlafx00_iospace_config(struct qla_hw_data *ha)
 {
index 65bbca715f57db0f14b0f1d5c0ae7a1a5fc44844..274b61ddee04a2f4a8e94d4ce3e608654e3fd0d8 100644 (file)
@@ -180,12 +180,6 @@ MODULE_PARM_DESC(ql2xdbwr,
                " 0 -- Regular doorbell.\n"
                " 1 -- CAMRAM doorbell (faster).\n");
 
-int ql2xtargetreset = 1;
-module_param(ql2xtargetreset, int, S_IRUGO);
-MODULE_PARM_DESC(ql2xtargetreset,
-                "Enable target reset."
-                "Default is 1 - use hw defaults.");
-
 int ql2xgffidenable;
 module_param(ql2xgffidenable, int, S_IRUGO);
 MODULE_PARM_DESC(ql2xgffidenable,
@@ -1401,27 +1395,10 @@ int
 qla2x00_loop_reset(scsi_qla_host_t *vha)
 {
        int ret;
-       struct fc_port *fcport;
        struct qla_hw_data *ha = vha->hw;
 
-       if (IS_QLAFX00(ha)) {
-               return qlafx00_loop_reset(vha);
-       }
-
-       if (ql2xtargetreset == 1 && ha->flags.enable_target_reset) {
-               list_for_each_entry(fcport, &vha->vp_fcports, list) {
-                       if (fcport->port_type != FCT_TARGET)
-                               continue;
-
-                       ret = ha->isp_ops->target_reset(fcport, 0, 0);
-                       if (ret != QLA_SUCCESS) {
-                               ql_dbg(ql_dbg_taskm, vha, 0x802c,
-                                   "Bus Reset failed: Reset=%d "
-                                   "d_id=%x.\n", ret, fcport->d_id.b24);
-                       }
-               }
-       }
-
+       if (IS_QLAFX00(ha))
+               return QLA_SUCCESS;
 
        if (ha->flags.enable_lip_full_login && !IS_CNA_CAPABLE(ha)) {
                atomic_set(&vha->loop_state, LOOP_DOWN);