Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1144161pxv; Fri, 9 Jul 2021 19:24:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyypEEowI4VdDA1zD5Bm16JysgU+sA/jMshjnmgvKWkYh9qN7fXllVP5T2NS51LmPuk0266 X-Received: by 2002:a17:907:1c0a:: with SMTP id nc10mr29521492ejc.488.1625883874997; Fri, 09 Jul 2021 19:24:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625883874; cv=none; d=google.com; s=arc-20160816; b=vl+nIfqgyL8SHaqlYwzBkLvkIW4lLrz4OX78bzwax01uTOnVeFeJZLhf0gXCIQhYgO SgJW3B6TYN4edHhEJv2OK5zF3V0za1ioCLbCAkRcesBk+6psYixAVJK+x2RqPEyHAATZ 6xNNtVh1cY1lL3IN0rZPqGAbib6P5DtMqDy+UUwAufmcWlKSH1QcDsZnqJUzNgDZBBck GvZETU8+OrksqEGqTu708p6WnPOLtNNkITtbvrtAhgadNCfwc7PHUQRgJRmgEm8qHihE kyR+IRShIzTxuIEmO6qEwkRoBMr32hZoCGz0V5tPxix+t8D22aJAuzo+VkU4eyy2gQ0p Hg5A== 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=AYMQ0BaEspa80rOljO7jnOqhV6gmw4sRJhYZOHeRFYqi0JyMGKPxKZ2ymmVGRT03nD 8GuiMvnucJjQNzXxhxDpvJkGdvWGw0oQZU41mA9GZznqeL6/lpkUcZaawu6XxjOl0E6x 0bNaGt3xxwNgjRJ/D3aEdOKQ6eotOHEILU50QcA1LU2/CNkotudoLaqus0C3CxGokR/9 jJs48vVBT8DhVAgaUNnbaMM5jiacDUSrSdvliJ9zk1WQl8wzbq+xM9IP6zUgqUpPDG72 Q46TWvsW9XqhN0qCLTw9UrDTHCEQfflDJbqp6bOVtMStnjiY9zfigyR21Am9LtafBLRo E1dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=r9fUyaWt; 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 cw28si5626946edb.299.2021.07.09.19.24.12; Fri, 09 Jul 2021 19:24:34 -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=r9fUyaWt; 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 S232958AbhGJCWd (ORCPT + 99 others); Fri, 9 Jul 2021 22:22:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:38592 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232345AbhGJCVl (ORCPT ); Fri, 9 Jul 2021 22:21:41 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C6513613FD; Sat, 10 Jul 2021 02:18:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625883536; bh=bx2NjaHIi7EIzUuk5t5pEMwJV/11m704jcJmZ6JoNMI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r9fUyaWtkzTTZwJRI54MAdwVoHpekoU4GDPDMs563Rmb7nrm7siDz/6e1rT/Ziuny 8oCECm8bdKlUpnhLVFYsHeS0KxUG9E/CZ2DaixoEpEEjcB7P5p6iayrEkZkBSGzr20 mlNUhV+Jseimsv4fSvxLWj2OIiGzTH/mht5eTaHiQHaTeqx7qNKvl19JCTfGpOEOek cJyJHA7bUdUNAflYCTNB3Q/CQOsGIQm5BeZV3aK6XfcEw1BUMVZo0iqJebCdxFI8+Q 796s6JSYG58r8qxrYtzgQ012fyfBwyrrMXFMZJ+LEO8gME8OwwEZtxhfFivy8Laq/R vIFpsAk0U99hA== 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.13 049/114] scsi: qedi: Fix TMF session block/unblock use Date: Fri, 9 Jul 2021 22:16:43 -0400 Message-Id: <20210710021748.3167666-49-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210710021748.3167666-1-sashal@kernel.org> References: <20210710021748.3167666-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