From patchwork Wed Apr 17 21:44:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 10906235 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1EF0E17E0 for ; Wed, 17 Apr 2019 21:45:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0BDAD28A93 for ; Wed, 17 Apr 2019 21:45:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 004E928BA9; Wed, 17 Apr 2019 21:45:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A3E6028A93 for ; Wed, 17 Apr 2019 21:45:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387932AbfDQVpT (ORCPT ); Wed, 17 Apr 2019 17:45:19 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:38789 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387771AbfDQVpS (ORCPT ); Wed, 17 Apr 2019 17:45:18 -0400 Received: by mail-pg1-f194.google.com with SMTP id j26so153296pgl.5 for ; Wed, 17 Apr 2019 14:45:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3DKIuX7PsnJet2S2kE8Dp1GCUf5mU3cMtRQjfCZYUaU=; b=YS0KqJYeBwF8zVfgI/lo3Si7/lplP9/VZ8TRkwvgQXbFpKXIE38ZYlvs1j7NczwsH7 tQQeh515RBSvYPRCqxfBPPpZyiJLWEIq9SCU9CyQZFT6eTH0qSoB/fQVwyhLgUf4K+CL hlVqQlMy5HCVJhniOi6QadRbXWKHzFzvMUwvOE6yE1isZhUJaPo2CXK0lns4Z1V7Lhg9 P8qon+jb1rqUxcI6tOsQUlgqPlgEx+wjrwJXW7qenwE8sgEzAoQRqRZC7qN6P4GV9KbL PwPgxxoyHA/qMq8jSu5/4Y8I43pOxdvNs8BCurM9lbf+z3DhTRU+0YEtWL+ScJRzNJsw rMPw== X-Gm-Message-State: APjAAAVUAa4m0ompnziDfwXHwLBGNWPQkWuoIdUyVId4aEqHB5SN7g9f 2GVY7w13w3sUW3qAv7lpgGQ= X-Google-Smtp-Source: APXvYqz2zf+1CeYypKEC/27IcY8qSWg4c5Uzw40qXYcLkLcwvcZ+kn+jUUvIrgF6IJ28f//Mq7VYeg== X-Received: by 2002:a62:5f84:: with SMTP id t126mr91758531pfb.185.1555537517479; Wed, 17 Apr 2019 14:45:17 -0700 (PDT) Received: from desktop-bart.svl.corp.google.com ([2620:15c:2cd:203:5cdc:422c:7b28:ebb5]) by smtp.gmail.com with ESMTPSA id d68sm219314pfg.16.2019.04.17.14.45.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Apr 2019 14:45:16 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , "James E . J . Bottomley" Cc: linux-scsi@vger.kernel.org, Christoph Hellwig , Bart Van Assche , Himanshu Madhani , Giridhar Malavali Subject: [PATCH 19/34] qla2xxx: Fix abort handling in tcm_qla2xxx_write_pending() Date: Wed, 17 Apr 2019 14:44:28 -0700 Message-Id: <20190417214443.243152-20-bvanassche@acm.org> X-Mailer: git-send-email 2.20.GIT In-Reply-To: <20190417214443.243152-1-bvanassche@acm.org> References: <20190417214443.243152-1-bvanassche@acm.org> MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Implementations of the .write_pending() callback functions must guarantee that an approprite LIO core callback function will be called immediately or at a later time. Make sure that this guarantee is met for aborted SCSI commands. 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 --- 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 eb19ad845bc9..0ef332cfb112 100644 --- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c +++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c @@ -394,6 +394,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;