Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp252170ybi; Wed, 29 May 2019 20:41:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqz01OsgpF1OUUJRsz04mxlL3sA6oUGQJ+oXCnWmha4jRjfKNFOi16hytU7P75MPJ+O2azh3 X-Received: by 2002:a17:90a:1a84:: with SMTP id p4mr1446356pjp.15.1559187687018; Wed, 29 May 2019 20:41:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559187687; cv=none; d=google.com; s=arc-20160816; b=LV4dRH+7SzHMXFYlX6d3u1n8+Us52NMiyW/jLteJ50a4bsYkTMz10vHrVo8S87hsMU mw/Yye762nVt7QQXGM0TJ3m40YSx8ub78oDvxlCgrlrDcJCwiY1RzvZoIAA+C9aHHqby qQ/5cPIy2CMaw3m+juIokpBt0KBKHg0yeKGwXajmWcqc03B4qyfV6BA7SA/jEEfJc78+ p9ZfZYpLYlPXQ7puWZ9NFzYGI1qRl9RfFsxH7gPQkvwUndu3P+Op4WajxB8Ma2mFzURl YbCbdBbeXkG++KSRjyMoDDjFG8nvbDYi+bkvQc/MEOiFN0NiqOmnDuaLSjfcPEBPmU0Y J5Jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=lDAmqFSD0g+jpF8ZcoyuoWHfPyG5olF+fw3WNiCLB84=; b=D4dUDqWaXLL83QwCBlBu/Zr0ID0cCXIcrm3Sd6RSFrIKEtqZKNJNrx/vhb0r0ejnYz JB+hoNm58PHJAGMA2b5+7E6AxUBv2WScOfbzQv54+55IZOupkF9hnBPudXYPQwoUVM2/ aJvL9chm4NzEl55HuOOEHxdFMDE4ZYXXOLxxlvRwPf6Qx4muVtMLV21emEQzve7tKxsq fgADgX64Xwq7JAllFM8AeWytMfLeV/RDEk//JQfwKQ5ILHGx/boSi3E18wyOsBvEJyyC z1Lnf6fXuo8IaASuVmU/2tPaHnF9psowGSf25s8zYGn+hyMQhFV4ALacEiVvGf1y0Ic3 HjyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DB1ypQDo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g63si1802191plb.362.2019.05.29.20.41.10; Wed, 29 May 2019 20:41:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DB1ypQDo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732187AbfE3DWR (ORCPT + 99 others); Wed, 29 May 2019 23:22:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:43432 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730748AbfE3DQj (ORCPT ); Wed, 29 May 2019 23:16:39 -0400 Received: from localhost (ip67-88-213-2.z213-88-67.customer.algx.net [67.88.213.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 13BBE24619; Thu, 30 May 2019 03:16:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559186199; bh=p/PGZMBxZ3FmHkSc09aP1Q+HL/GM+WS2VcIPGF7ylIU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DB1ypQDoHjb7aq4HDzh5Axds2mP0u+fcheHym+nE6B6v1/BN6QWWfSCuBV1cuwHce 1+MOERdts7Ao+tqbad6+m73NpKSy0bVZKjzatuhhkk5mnPTCMA6TXw4pjzHUAuS7OT Y2YoIOBxYvO2RKQlmLI+3U/TSAauIcawBLVOOguQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Himanshu Madhani , Giridhar Malavali , Bart Van Assche , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 4.19 076/276] scsi: qla2xxx: Fix abort handling in tcm_qla2xxx_write_pending() Date: Wed, 29 May 2019 20:03:54 -0700 Message-Id: <20190530030531.182656568@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190530030523.133519668@linuxfoundation.org> References: <20190530030523.133519668@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit e209783d66bca04b5fce4429e59338517ffc1a0b ] Implementations of the .write_pending() callback functions must guarantee that an appropriate LIO core callback function will be called immediately or at a later time. Make sure that this guarantee is met for aborted SCSI commands. [mkp: typo] Cc: Himanshu Madhani Cc: Giridhar Malavali Fixes: 694833ee00c4 ("scsi: tcm_qla2xxx: Do not allow aborted cmd to advance.") # v4.13. Fixes: a07100e00ac4 ("qla2xxx: Fix TMR ABORT interaction issue between qla2xxx and TCM") # v4.5. Signed-off-by: Bart Van Assche Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/qla2xxx/tcm_qla2xxx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c index 64e2d859f6332..7ef549903124d 100644 --- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c +++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c @@ -390,6 +390,8 @@ static int tcm_qla2xxx_write_pending(struct se_cmd *se_cmd) cmd->se_cmd.transport_state, cmd->se_cmd.t_state, cmd->se_cmd.se_cmd_flags); + transport_generic_request_failure(&cmd->se_cmd, + TCM_CHECK_CONDITION_ABORT_CMD); return 0; } cmd->trc_flags |= TRC_XFR_RDY; -- 2.20.1