Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1146846pxv; Fri, 9 Jul 2021 19:30:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBKKSByjE3LKl97kzRE7DxuTZSKJEVwqOqq5ffqW0QjqSZCd3m+ModQ3bqlG5AeYkBbWav X-Received: by 2002:aa7:c448:: with SMTP id n8mr38992119edr.354.1625884218553; Fri, 09 Jul 2021 19:30:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625884218; cv=none; d=google.com; s=arc-20160816; b=Q1C2gNQlg3JYaCzY2n9MnK/fAgiQTCU2gdgI9FeZx4BEBlm0F41gf9hLB7NL0MRcn2 RCwcOdq+JhuvgY2C40ZpIX2SUbcz4+zQlqxCancZXeo+ljxk/KUAbRIUGbITGWwyFbEL rdWaznpcImJMXwuFtsgdKHVPMlCB3NqR9qDCC+CvDTiP2+8UrbAA5WHHft7H1TeTCTUv tr1v9haXh076nUcJZ/OQfZNWQqiLhksE2Mf9R22NXMBnMeSXwE3oYniElfRE9PpqHIE6 hiegdLa0odpKDFJn7DwZ4A4f7euCPm8z2ZLAHA0VT46R3CmIJU/qbdNVJhsqkdyay4Hv 7b3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=JaSjdnvVKWjMXGsokPwU5D2JGbLqEnS/VFziRm8J5+0=; b=PMwGlEcrNdl31mP/7WETe6HfZGYMyKUHuM4+D+IZDkFPdM43kiprnNvohImEv6vs18 MjOSHYRkw08GCkM8az9Ig01YnPJQO9zvRkIcsJStxom78C5dqs/8rZuS8yVRgecIcm5y Pqa9O7EOfHw1LAszE5/hFuc203b/JOlv26FmMCIJW/S5evjEHfBZfHQiqcMuAGfMTOgC XgMTAmXdmlquWgBPuV1+rymty8TIpqM6/KQu8w57XZKoVU40AiJqxAP93t+PlqIjbh0q JKW1B0GovBHTi0fpcWotYRrelP5PRGm7CshrdPYqHO+BNDxDhYKPEPNj8FJ6FFghSs+i rT/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ttk6fO5h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l20si8931293edt.377.2021.07.09.19.29.55; Fri, 09 Jul 2021 19:30:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ttk6fO5h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234272AbhGJCbs (ORCPT + 99 others); Fri, 9 Jul 2021 22:31:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:42926 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234065AbhGJC3E (ORCPT ); Fri, 9 Jul 2021 22:29:04 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D64F56142C; Sat, 10 Jul 2021 02:25:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625883924; bh=bx2NjaHIi7EIzUuk5t5pEMwJV/11m704jcJmZ6JoNMI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ttk6fO5hvI7xc+wP3IB71hayRvQcEjnAJ6nRLgqJi9+X4VGLXcMTWQZlDaBfO90Ru rhPn/jqh6qnUecZ4BhFD/nfFgIGOci8cOejJp4NnMkHlUrFD1XAyFPlXW/eF67mXJZ 83iLp87NwlzcrPUX7ldY/wDf9oUORi0Xo113gncSZCVyJ1mBMPBhHpLyuQCyKbD2k+ tTNvKHk22lqzwwNYPSrLOEsfQXJsaoLs3toBWhGiooVo+eHMmZFL0Csf9L2xUl42aS HXKh8M3cmN70TKcbfuRusNUs80Wywbtm/505e1O7w2wzS25z/QEscw0J+MZHII0aZ7 /wZnPalO6/xYA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Mike Christie , Manish Rangankar , "Martin K . Petersen" , Sasha Levin , linux-scsi@vger.kernel.org Subject: [PATCH AUTOSEL 5.10 42/93] scsi: qedi: Fix TMF session block/unblock use Date: Fri, 9 Jul 2021 22:23:36 -0400 Message-Id: <20210710022428.3169839-42-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210710022428.3169839-1-sashal@kernel.org> References: <20210710022428.3169839-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mike Christie [ Upstream commit 2819b4ae2873d50fd55292877b0231ec936c3b2e ] Drivers shouldn't be calling block/unblock session for tmf handling because the functions can change the session state from under libiscsi. iscsi_queuecommand's call to iscsi_prep_scsi_cmd_pdu-> iscsi_check_tmf_restrictions will prevent new cmds from being sent to qedi after we've started handling a TMF. So we don't need to try and block it in the driver, and we can remove these block calls. Link: https://lore.kernel.org/r/20210525181821.7617-25-michael.christie@oracle.com Reviewed-by: Manish Rangankar Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/qedi/qedi_fw.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/scsi/qedi/qedi_fw.c b/drivers/scsi/qedi/qedi_fw.c index c12bb2dd5ff9..4c87640e6a91 100644 --- a/drivers/scsi/qedi/qedi_fw.c +++ b/drivers/scsi/qedi/qedi_fw.c @@ -159,14 +159,9 @@ static void qedi_tmf_resp_work(struct work_struct *work) set_bit(QEDI_CONN_FW_CLEANUP, &qedi_conn->flags); resp_hdr_ptr = (struct iscsi_tm_rsp *)qedi_cmd->tmf_resp_buf; - iscsi_block_session(session->cls_session); rval = qedi_cleanup_all_io(qedi, qedi_conn, qedi_cmd->task, true); - if (rval) { - iscsi_unblock_session(session->cls_session); + if (rval) goto exit_tmf_resp; - } - - iscsi_unblock_session(session->cls_session); spin_lock(&session->back_lock); __iscsi_complete_pdu(conn, (struct iscsi_hdr *)resp_hdr_ptr, NULL, 0); -- 2.30.2