Commit fab0d5ee authored by Nilesh Javali's avatar Nilesh Javali Committed by Zheng Zengkai
Browse files

scsi: Revert "scsi: qla2xxx: Fix disk failure to rediscover"

stable inclusion
from stable-v5.10.137
commit 101e0c052d4f16919074d8439fdbc3b09389eb37
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I60PLB

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=101e0c052d4f16919074d8439fdbc3b09389eb37

--------------------------------

commit 5bc7b01c upstream.

This fixes the regression of NVMe discovery failure during driver load
time.

This reverts commit 6a45c8e1.

Link: https://lore.kernel.org/r/20220713052045.10683-2-njavali@marvell.com


Cc: stable@vger.kernel.org
Reviewed-by: default avatarHimanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: default avatarNilesh Javali <njavali@marvell.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
Reviewed-by: default avatarWei Li <liwei391@huawei.com>
parent b5255fef
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -5547,8 +5547,6 @@ qla2x00_reg_remote_port(scsi_qla_host_t *vha, fc_port_t *fcport)
	if (atomic_read(&fcport->state) == FCS_ONLINE)
		return;

	qla2x00_set_fcport_state(fcport, FCS_ONLINE);

	rport_ids.node_name = wwn_to_u64(fcport->node_name);
	rport_ids.port_name = wwn_to_u64(fcport->port_name);
	rport_ids.port_id = fcport->d_id.b.domain << 16 |
@@ -5649,7 +5647,6 @@ qla2x00_update_fcport(scsi_qla_host_t *vha, fc_port_t *fcport)
		qla2x00_reg_remote_port(vha, fcport);
		break;
	case MODE_TARGET:
		qla2x00_set_fcport_state(fcport, FCS_ONLINE);
		if (!vha->vha_tgt.qla_tgt->tgt_stop &&
			!vha->vha_tgt.qla_tgt->tgt_stopped)
			qlt_fc_port_added(vha, fcport);
@@ -5664,6 +5661,8 @@ qla2x00_update_fcport(scsi_qla_host_t *vha, fc_port_t *fcport)
		break;
	}

	qla2x00_set_fcport_state(fcport, FCS_ONLINE);

	if (IS_IIDMA_CAPABLE(vha->hw) && vha->hw->flags.gpsc_supported) {
		if (fcport->id_changed) {
			fcport->id_changed = 0;
+0 −5
Original line number Diff line number Diff line
@@ -35,11 +35,6 @@ int qla_nvme_register_remote(struct scsi_qla_host *vha, struct fc_port *fcport)
		(fcport->nvme_flag & NVME_FLAG_REGISTERED))
		return 0;

	if (atomic_read(&fcport->state) == FCS_ONLINE)
		return 0;

	qla2x00_set_fcport_state(fcport, FCS_ONLINE);

	fcport->nvme_flag &= ~NVME_FLAG_RESETTING;

	memset(&req, 0, sizeof(struct nvme_fc_port_info));