Received: by 10.223.176.5 with SMTP id f5csp804796wra; Sat, 3 Feb 2018 10:40:39 -0800 (PST) X-Google-Smtp-Source: AH8x2269sKygclq4//wpMbNdZDffHEuXz5fjoqp+Xg3iENMkX7TALdc/s6JOlN4eRhsYLX9lrQJc X-Received: by 2002:a17:902:7d8b:: with SMTP id a11-v6mr38057421plm.216.1517683239114; Sat, 03 Feb 2018 10:40:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517683239; cv=none; d=google.com; s=arc-20160816; b=MkF8Nt0EuWaWUs3PWsD/RsrdPDHS7ekh1hwt37do8bjBt8aeBR7F+/wT16S8QZPaFY rx1g4b6reSp5Ud5jAsZG50tc5ik6gTqe10ioeuijYIRtB3ACYeQaBrfP07t5okKC9B/N TycDtTHbyA4Hl1DT5pKfqM4L0yZlVDExMlx/JiEU+iD8BvwrNSGRqjzpWyveMdEca5DW GGuNLADbZBZvbQuSdcWPUz2Q4nPUw6d5/ty4NcwZg6mtTmJIP+DVTf3u4MCgJ6zDlaei UDz4VfzGyv/LcTmNhG7DgVGizYD8Jd2p4x1LFNCrRb8qQNHg0b+QqDL7IcIMtz+bOs0x kEzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=00OYx5So+3yzfb0XcCJ+JkvwyVjZs4Lgf7Rft+4ohyY=; b=UPkZruPl65ZEef0HQaAymPp6Kh9DV4z64vpdm1J/7+4eSdrkw1TmFyTZ+Tc4y6UUlC b/aulzpP8ge6PXC5nGJ1svo4JgzmD8W4eLZIDcZC+CNQIag1GrmL1EaYWrV0bxKNIAkU leGpQ6fidvhwuEzEenuge1mpHbQ1SopqvouWpFIBjQDAXBeCONZeSOOQE3lBzfVt3iMm X51MbU8srMIc0+NlRmXtLYiH/F9/r2/+ZQrksQRlv/rBHAOJK7JAoDx2Y8/a7gwFuZ1y PP27IFENG8xMjRHoBAMcVeJzTN1valyTj6IWAe045E56fZcMpmJ1JSoUPQCMOk9NqAaI 3GAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=Fq3QpUql; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w13si3233851pgq.199.2018.02.03.10.40.24; Sat, 03 Feb 2018 10:40:39 -0800 (PST) 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=@microsoft.com header.s=selector1 header.b=Fq3QpUql; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752584AbeBCSDk (ORCPT + 99 others); Sat, 3 Feb 2018 13:03:40 -0500 Received: from mail-co1nam03on0122.outbound.protection.outlook.com ([104.47.40.122]:24267 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752616AbeBCSAc (ORCPT ); Sat, 3 Feb 2018 13:00:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=00OYx5So+3yzfb0XcCJ+JkvwyVjZs4Lgf7Rft+4ohyY=; b=Fq3QpUql1OXyAWj73G9rw4z/s4XbLYVI7i72olCL//6y8mPRH8PpSyXJkTveh0SdcDuU6oRwTbdReZhJX+bFtZYB6+eUDmzVmcni86/nr3DDP3KOAH/E2f/Vq1POY+AOGw+ACY7aEALiSsL/lCck8Vfs8zE/65Sk8E4yn+iJ3Us= Received: from BL0PR2101MB1027.namprd21.prod.outlook.com (52.132.20.161) by BL0PR2101MB1043.namprd21.prod.outlook.com (52.132.24.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.506.3; Sat, 3 Feb 2018 18:00:30 +0000 Received: from BL0PR2101MB1027.namprd21.prod.outlook.com ([fe80::a8da:b5d9:d710:9bf9]) by BL0PR2101MB1027.namprd21.prod.outlook.com ([fe80::a8da:b5d9:d710:9bf9%3]) with mapi id 15.20.0485.006; Sat, 3 Feb 2018 18:00:29 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Prasad B Munirathnam , "Martin K . Petersen" , Sasha Levin Subject: [PATCH AUTOSEL for 4.14 004/110] scsi: aacraid: Fix I/O drop during reset Thread-Topic: [PATCH AUTOSEL for 4.14 004/110] scsi: aacraid: Fix I/O drop during reset Thread-Index: AQHTnRjfz9sWhzXm5kqXVm0tiOdZEQ== Date: Sat, 3 Feb 2018 18:00:27 +0000 Message-ID: <20180203180015.29073-4-alexander.levin@microsoft.com> References: <20180203180015.29073-1-alexander.levin@microsoft.com> In-Reply-To: <20180203180015.29073-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BL0PR2101MB1043;7:s4t5qC7j08ez8xgurhnaWa1Yqd1UQE5BkRcJMG0RJC4DNBdxlbKD1xNgEenExh+ULJ30xbRrI9/FoTSCBQgf5BLOkpGuScSZ2bpfMEqQDAyIkuYdEYQomrUGJKGHF4bRWyeAyI1bozALE2YWNk5C83WeR+RLi2Uww/9UrTr7xTx9ArDSY1ftHQOdzW8kQxNMYkBS6NP2gCaeFAqs4p9iepBgKga8HI7cZ5ryvlWF/XIlW7lSzqy7QCVc1RaMb5Ha x-ms-exchange-antispam-srfa-diagnostics: SSOS;SSOR; x-forefront-antispam-report: SFV:SKI;SCL:-1;SFV:NSPM;SFS:(10019020)(39380400002)(376002)(39860400002)(366004)(346002)(396003)(189003)(199004)(59450400001)(10290500003)(186003)(6486002)(14454004)(1076002)(8656006)(102836004)(6506007)(76176011)(26005)(6346003)(66066001)(10090500001)(5250100002)(36756003)(6512007)(2501003)(110136005)(99286004)(54906003)(478600001)(53936002)(72206003)(6436002)(316002)(305945005)(7736002)(2950100002)(2906002)(5660300001)(4326008)(106356001)(575784001)(86362001)(97736004)(25786009)(22452003)(2900100001)(3846002)(107886003)(8676002)(8936002)(6116002)(3280700002)(105586002)(81156014)(81166006)(3660700001)(86612001)(68736007)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:BL0PR2101MB1043;H:BL0PR2101MB1027.namprd21.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 95854747-e12e-4bf5-a818-08d56b3002f0 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(3008032)(2017052603307)(7193020);SRVR:BL0PR2101MB1043; x-ms-traffictypediagnostic: BL0PR2101MB1043: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(72170198267865)(146099531331640); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(61425038)(6040501)(2401047)(5005006)(8121501046)(3231101)(2400082)(944501161)(93006095)(93001095)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041288)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123562045)(20161123564045)(6072148)(201708071742011);SRVR:BL0PR2101MB1043;BCL:0;PCL:0;RULEID:;SRVR:BL0PR2101MB1043; x-forefront-prvs: 05724A8921 received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-message-info: 7aP7Tsl8MDyZ2UfOfT8JbSnPfJcCNLUSIsfILs8yQv7hMp6zCrrUFfUA0p8D06UvdJIX9Iv+AonjO1g52lH2Nw== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 95854747-e12e-4bf5-a818-08d56b3002f0 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Feb 2018 18:00:27.6752 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR2101MB1043 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Prasad B Munirathnam [ Upstream commit 5771cfffdffe709ae9b403b6f80438ca40bf850e ] "FIB_CONTEXT_FLAG_TIMEDOUT" flag is set in aac_eh_abort to indicate command timeout. Using the same flag in reset handler causes the command to time out and the I/Os were dropped. Define a new flag "FIB_CONTEXT_FLAG_EH_RESET" to make sure I/O is properly handled in eh_reset handler. [mkp: tweaked commit message] Signed-off-by: Prasad B Munirathnam Reviewed-by: Raghava Aditya Renukunta Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/aacraid/aacraid.h | 1 + drivers/scsi/aacraid/linit.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.= h index 403a639574e5..b0b290f7b8dc 100644 --- a/drivers/scsi/aacraid/aacraid.h +++ b/drivers/scsi/aacraid/aacraid.h @@ -1724,6 +1724,7 @@ struct aac_dev #define FIB_CONTEXT_FLAG_NATIVE_HBA (0x00000010) #define FIB_CONTEXT_FLAG_NATIVE_HBA_TMF (0x00000020) #define FIB_CONTEXT_FLAG_SCSI_CMD (0x00000040) +#define FIB_CONTEXT_FLAG_EH_RESET (0x00000080) =20 /* * Define the command values diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index c9252b138c1f..509fe23fafe1 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c @@ -1037,7 +1037,7 @@ static int aac_eh_bus_reset(struct scsi_cmnd* cmd) info =3D &aac->hba_map[bus][cid]; if (bus >=3D AAC_MAX_BUSES || cid >=3D AAC_MAX_TARGETS || info->devtype !=3D AAC_DEVTYPE_NATIVE_RAW) { - fib->flags |=3D FIB_CONTEXT_FLAG_TIMED_OUT; + fib->flags |=3D FIB_CONTEXT_FLAG_EH_RESET; cmd->SCp.phase =3D AAC_OWNER_ERROR_HANDLER; } } --=20 2.11.0