From mboxrd@z Thu Jan 1 00:00:00 1970 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 41F99CD13D3 for ; Sun, 17 Sep 2023 20:03:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239560AbjIQUDR (ORCPT ); Sun, 17 Sep 2023 16:03:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240382AbjIQUCx (ORCPT ); Sun, 17 Sep 2023 16:02:53 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3CDC1191 for ; Sun, 17 Sep 2023 13:02:38 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8EB8AC433C8; Sun, 17 Sep 2023 20:02:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1694980958; bh=pDHgO5lrPCh7mPnYE6Vytf7kHtKK+s65hAipoN30L2g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CdBWjpqKsO7t7zuhxc4+Z7tAcYGqDaPedCCrnqcdIKOIZ00df8rC5tK8FiaqZQIzM azywFdhhjgTvdYQt8AJ+yLjn7C7Vr2f9nVB9h+EiZqd2sYLmxjvtxDDvxXoTzcMDm3 L0VJikVBHoVdIOMO7lmmUBrFeaVa0T1AeCDvEClE= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Quinn Tran , Nilesh Javali , Himanshu Madhani , "Martin K. Petersen" Subject: [PATCH 6.1 018/219] scsi: qla2xxx: Fix session hang in gnl Date: Sun, 17 Sep 2023 21:12:25 +0200 Message-ID: <20230917191041.653723421@linuxfoundation.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230917191040.964416434@linuxfoundation.org> References: <20230917191040.964416434@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Quinn Tran commit 39d22740712c7563a2e18c08f033deeacdaf66e7 upstream. Connection does not resume after a host reset / chip reset. The cause of the blockage is due to the FCF_ASYNC_ACTIVE left on. The gnl command was interrupted by the chip reset. On exiting the command, this flag should be turn off to allow relogin to reoccur. Clear this flag to prevent blockage. Cc: stable@vger.kernel.org Fixes: 17e64648aa47 ("scsi: qla2xxx: Correct fcport flags handling") Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Link: https://lore.kernel.org/r/20230714070104.40052-7-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Martin K. Petersen Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/qla2xxx/qla_init.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -1135,7 +1135,7 @@ int qla24xx_async_gnl(struct scsi_qla_ho u16 *mb; if (!vha->flags.online || (fcport->flags & FCF_ASYNC_SENT)) - return rval; + goto done; ql_dbg(ql_dbg_disc, vha, 0x20d9, "Async-gnlist WWPN %8phC \n", fcport->port_name); @@ -1189,8 +1189,9 @@ int qla24xx_async_gnl(struct scsi_qla_ho done_free_sp: /* ref: INIT */ kref_put(&sp->cmd_kref, qla2x00_sp_release); + fcport->flags &= ~(FCF_ASYNC_SENT); done: - fcport->flags &= ~(FCF_ASYNC_ACTIVE | FCF_ASYNC_SENT); + fcport->flags &= ~(FCF_ASYNC_ACTIVE); return rval; }