From patchwork Mon Jan 10 05:02:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nilesh Javali X-Patchwork-Id: 531399 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 825E6C4332F for ; Mon, 10 Jan 2022 05:03:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237214AbiAJFDB (ORCPT ); Mon, 10 Jan 2022 00:03:01 -0500 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:41714 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233263AbiAJFC5 (ORCPT ); Mon, 10 Jan 2022 00:02:57 -0500 Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 209KQlqd023499 for ; Sun, 9 Jan 2022 21:02:56 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0220; bh=SkmtIYtQPNFtYl+Afy4LzFUrX8rkQj1HpNAy8MSmsw4=; b=GjzimMQ+bj2xrUTGOy4PNkbot2aoHW5RsLWyQhbGGLc99I5F+Mwzrw1ot+IZCJdxiI+Y 5wu8D2J/FApZQJJLbpbKOGoGSm1WdyD0ZFJnk12o0gY+76PJYiEi0Hlp9okpZ5aHAdo/ UtNUK7oJrxqWuIBE0o1m/1Mj3BGEqAXVLhEkhrh1sXycucAOcRzAVCQAVUyNYJ97/+aF 9k3qlxzFy40Dg+BghPWUAJPK+P16SrDYyvsHAtY2M3nPFOatA5D+dC4G1Y/fQDcoktrU l9HxoJL3Wkm+eUYH6Ee2MGJEf5oDdXvpPMrtTjWc9YnH1+3UDJ6dgKkMlFf/+w36LHe8 +A== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3dfy8nhjf0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Sun, 09 Jan 2022 21:02:56 -0800 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 9 Jan 2022 21:02:54 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Sun, 9 Jan 2022 21:02:54 -0800 Received: from dut1171.mv.qlogic.com (unknown [10.112.88.18]) by maili.marvell.com (Postfix) with ESMTP id 73AE43F70A4; Sun, 9 Jan 2022 21:02:54 -0800 (PST) Received: from dut1171.mv.qlogic.com (localhost [127.0.0.1]) by dut1171.mv.qlogic.com (8.14.7/8.14.7) with ESMTP id 20A52su5004005; Sun, 9 Jan 2022 21:02:54 -0800 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id 20A52sB4004004; Sun, 9 Jan 2022 21:02:54 -0800 From: Nilesh Javali To: CC: , Subject: [PATCH v2 03/17] qla2xxx: fix stuck session in gpdb Date: Sun, 9 Jan 2022 21:02:04 -0800 Message-ID: <20220110050218.3958-4-njavali@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20220110050218.3958-1-njavali@marvell.com> References: <20220110050218.3958-1-njavali@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: H9tCFfpCWtqR9sHT8BjX7LDJI6uQ3jlI X-Proofpoint-ORIG-GUID: H9tCFfpCWtqR9sHT8BjX7LDJI6uQ3jlI X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-01-10_01,2022-01-07_01,2021-12-02_01 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Quinn Tran Fix stuck sessions in get port database. When a thread is in the process of re-establishing a session, a flag is set to prevent multiple threads / triggers from doing the same task. This flag was left on, where any attempt to relogin was locked out. Clear this flag, if the attempt has failed. Cc: stable@vger.kernel.org Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Reviewed-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 38c11b75f644..0b641a803f7c 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -1332,9 +1332,9 @@ int qla24xx_async_gpdb(struct scsi_qla_host *vha, fc_port_t *fcport, u8 opt) if (!vha->flags.online || (fcport->flags & FCF_ASYNC_SENT) || fcport->loop_id == FC_NO_LOOP_ID) { ql_log(ql_log_warn, vha, 0xffff, - "%s: %8phC - not sending command.\n", - __func__, fcport->port_name); - return rval; + "%s: %8phC online %d flags %x - not sending command.\n", + __func__, fcport->port_name, vha->flags.online, fcport->flags); + goto done; } sp = qla2x00_get_sp(vha, fcport, GFP_KERNEL);