From patchwork Fri Aug 4 05:43:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Finn Thain X-Patchwork-Id: 9880543 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0D68360360 for ; Fri, 4 Aug 2017 05:44:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 07A9128921 for ; Fri, 4 Aug 2017 05:44:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F0C8128924; Fri, 4 Aug 2017 05:44:39 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable 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 46D1928921 for ; Fri, 4 Aug 2017 05:44:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751265AbdHDFoO (ORCPT ); Fri, 4 Aug 2017 01:44:14 -0400 Received: from kvm5.telegraphics.com.au ([98.124.60.144]:53530 "EHLO kvm5.telegraphics.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751285AbdHDFnV (ORCPT ); Fri, 4 Aug 2017 01:43:21 -0400 Received: by kvm5.telegraphics.com.au (Postfix, from userid 502) id 3A39923EFF; Fri, 4 Aug 2017 01:43:20 -0400 (EDT) To: "James E.J. Bottomley" , "Martin K. Petersen" Cc: Thomas Bogendoerfer , David Miller , Hannes Reinecke , Meelis Roos , Michael Schmitz , , Message-Id: <5404651c2e80731082fd1a1cbf94d9f3c765dc34.1501825111.git.fthain@telegraphics.com.au> In-Reply-To: References: From: Finn Thain Subject: [PATCH 5/5] scsi/esp_scsi: Always clear msg_out_len after MESSAGE OUT phase Date: Fri, 4 Aug 2017 01:43:20 -0400 (EDT) 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 After sending a message, always clear esp->msg_out_len. Otherwise, eh_abort_handler may subsequently fail to send an ABORT TASK SET message. Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/scsi/esp_scsi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/scsi/esp_scsi.c b/drivers/scsi/esp_scsi.c index 4d1e08a87274..c3fc34b9964d 100644 --- a/drivers/scsi/esp_scsi.c +++ b/drivers/scsi/esp_scsi.c @@ -1951,6 +1951,8 @@ static int esp_process_event(struct esp *esp) scsi_esp_cmd(esp, ESP_CMD_NULL); } + esp->msg_out_len = 0; + esp_event(esp, ESP_EVENT_CHECK_PHASE); goto again; case ESP_EVENT_MSGIN: