From patchwork Tue Dec 12 19:40:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prasad B Munirathnam X-Patchwork-Id: 10108221 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 C3802602C2 for ; Tue, 12 Dec 2017 19:41:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B44352962B for ; Tue, 12 Dec 2017 19:41:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A8F322963C; Tue, 12 Dec 2017 19:41:36 +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,DKIM_SIGNED, DKIM_VALID,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 D186B2962B for ; Tue, 12 Dec 2017 19:41:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752247AbdLLTlf (ORCPT ); Tue, 12 Dec 2017 14:41:35 -0500 Received: from mail-sn1nam01on0079.outbound.protection.outlook.com ([104.47.32.79]:5408 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751643AbdLLTle (ORCPT ); Tue, 12 Dec 2017 14:41:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mscc365.onmicrosoft.com; s=selector1-microsemi-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=kNyGoGQ2hD3TaAyuLMImQHPDFmDSVx9Bzc494JGBivA=; b=PIFdcYn4SzAxHOeqfKXEHn2h9o2h6EgOnNgjy+6ZlpKY7RocBatFeGIk6qH6kRIzFg1VyPOkNgIWzOZ0ecr56c1i/FUi4Nix2xmc4EP0ZCc1i8Hz2/yAP8XmFCbha5zhgoi1a8Fjvipwu0SUTrPnq7rTYNmRcTyxSl2PdRfTmXU= Received: from BY2PR02CA0113.namprd02.prod.outlook.com (10.163.44.167) by BLUPR0201MB1825.namprd02.prod.outlook.com (10.162.239.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.302.9; Tue, 12 Dec 2017 19:41:32 +0000 Received: from BL2FFO11FD033.protection.gbl (2a01:111:f400:7c09::130) by BY2PR02CA0113.outlook.office365.com (2a01:111:e400:5261::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.302.9 via Frontend Transport; Tue, 12 Dec 2017 19:41:31 +0000 Authentication-Results: spf=pass (sender IP is 208.19.100.21) smtp.mailfrom=microsemi.com; oracle.com; dkim=none (message not signed) header.d=none;oracle.com; dmarc=bestguesspass action=none header.from=microsemi.com; Received-SPF: Pass (protection.outlook.com: domain of microsemi.com designates 208.19.100.21 as permitted sender) receiver=protection.outlook.com; client-ip=208.19.100.21; helo=avsrvexchhts1.microsemi.net; Received: from avsrvexchhts1.microsemi.net (208.19.100.21) by BL2FFO11FD033.mail.protection.outlook.com (10.173.161.129) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.20.282.5 via Frontend Transport; Tue, 12 Dec 2017 19:41:24 +0000 Received: from localhost (10.181.104.49) by avsrvexchhts1.microsemi.net (10.100.34.105) with Microsoft SMTP Server (TLS) id 14.3.361.1; Tue, 12 Dec 2017 11:40:55 -0800 From: Prasad B Munirathnam To: , , , , CC: Subject: [PATCH] scsi: aacraid: fix io drop during the reset Date: Tue, 12 Dec 2017 11:40:10 -0800 Message-ID: <1513107610-24451-1-git-send-email-prasad.munirathnam@microsemi.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:208.19.100.21; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(39860400002)(346002)(376002)(2980300002)(438002)(199004)(189003)(76506005)(77096006)(57986006)(97736004)(478600001)(4326008)(104016004)(47776003)(5660300001)(69596002)(8936002)(68736007)(50226002)(53936002)(2906002)(6666003)(16586007)(36756003)(110136005)(305945005)(50466002)(316002)(51416003)(106002)(81166006)(8676002)(81156014)(2201001)(59450400001)(356003)(72206003)(48376002)(575784001)(86362001)(106466001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0201MB1825; H:avsrvexchhts1.microsemi.net; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD033; 1:tXAJD6BDZoMEe6es6TItDxo/Fz/A1xcc63rJlbyMyFXAInSE8uwNVUfwxxcz9XE3t7ZXVAfQVus2nLRyknXVSWdEd/1bfL2YTz6r3vx7w59NQYWKzmt62TbTCWqEYqXs X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f7626276-3954-4382-6e2b-08d54198547b X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(4608076)(2017052603307); SRVR:BLUPR0201MB1825; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0201MB1825; 3:p0LKUT8cXqv/xaQi0LhpbwEvTlLLKxhSrenpWQu1k26LGi0YHMAUfHT1IFDG8KF22vA1l1j7YnqPu10io2u4HJV1amBoSkH1fkssniRdeOkfGPKdYL2e6kbPROoPzeEa88qFv0Jm3FGTNwKnPNQofxkzdlBSRlepAlMpi+Ocf0+Xw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2praYdOPXmpNhAlB1XNinCzEx+KqcepjadJapV4vSkBEy8tLHpUnfZ8ZYbE9Ta9fnHlkEy3bUzRrRKpKc/QNYd4aT5U+MK0Y/UizMHRfKr3r86Y28bYw4tPYSSBA1mZuRDUERQIe/hAwCv+0Z3M6rdLQaCU8iLNt72wdd4YrTrj6DSZgC7i0tSxoqK1UyOjUcAtLglrAOkrrTiFCbs3n/o0pMZg4eMvAfTtg7cupCPvFDO6mEc6Oy0XBVZr2ebvFh0SFF3ipmw47cl4aQWQbVxVBGD0selQwIVLkDvOT058Hf1VsKEeAqfrhh1V7FkwLHBIFGuA8WTQfupiMZe69m3Xven/G0EcOxIrGPM9Y1hchpdh83+wLLEtxgVJC3bkMrQbqq+A= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(72170198267865); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93004095)(3231023)(6055026)(6041248)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123555025)(20161123564025)(20161123560025)(6072148)(201708071742011); SRVR:BLUPR0201MB1825; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:BLUPR0201MB1825; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0201MB1825; 4:5Wrm9fhiodsrOVoKTCNk64K7DfdFStgPyCI7cJZLNtxZjbqGZlghrcBZCo74AvqFfo8+bT0l1yiTI/gEedZqKtenIPu5oogkUHOXFX5A6wLPfY43LiR5/XZNG0hsjjkMq5Q1Gq8kdk/VmvwtO8cp1VP8sPdXsgZtFpCrgF6KbUjW0N0eCD5B8PKSitkEhhkBHPfGcWKA5KMJ/8O5lF5KVd+G+hGb6FCV5iliztzDzulnqgLwh7qjGwYy5DkYCXaPUffn5W6jg94HvF2Yo+i2Zb7w4yz4jSAUtBD44Eix1zt961Dzy3rfxHGq3I3/2Rpo X-Forefront-PRVS: 051900244E X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0201MB1825; 23:UFnqTkUbySkvsgLXUCEXxM+4jw1zUg113M38vI+?= =?us-ascii?Q?R/Nt6JVV0f1hr3NE2Wk7w75DzPlo4OgsRfEgyrCjokzRjnmAVZxSbNilSeCa?= =?us-ascii?Q?cEA/fuzhr9mX1HOP1uvirfOMKQxmgEUSi73aUb3zqpYeIqkOCq3eWSxNWdx6?= =?us-ascii?Q?+D3CEjXUr/9oWB3CERf2KDrpK/Cb634np2DqCvt47l7W1eXhxT4kZfA55PUf?= =?us-ascii?Q?aQ5uKbYsFHLdmQVcXzbPyFf40apD2bWLYW5+61Sf8tbmm43v0ZCdYybkaJ7R?= =?us-ascii?Q?psJDdJmPYv4ybUuVnAb/OGSKMTI1B+Fhzk5Hp0l1Pit2gxNdiUtre+Vm50Am?= =?us-ascii?Q?cDb9DzBMJ7go/0X7fSXPnWS69ZT8RgRR9SFqRatmFz6Tlp6caH0GJQpyTePE?= =?us-ascii?Q?eoxFwLGwM5K5gJKWu6D5cJxVCCg9tyq/rFSsyCfYHDEe+rBzOWxskzZC9V0f?= =?us-ascii?Q?p/LFTG/sBHxX9zpMbEtItByTJ/+nRxy9SKB6gp0W+8/BD/KsfOV5sbQmp14G?= =?us-ascii?Q?ddP3MS7rZKwJyTkB9iq2QBM67mEKqPoT8OFpy4CnngRB5XB+V4jxI+sgd2mW?= =?us-ascii?Q?K6huhle4L2BGpcgS0GQI7VajsWeo3KrsNIAVz+lsD0QeqG+TISIgdlu7CDg6?= =?us-ascii?Q?TWpXbWGS0JZBa47VunjEgow7bhMQABwOcqYGIUk9Ban3NbgupuKs/5pG3j4y?= =?us-ascii?Q?y9z8CKHualbWX5Tgr+4PRKuOzjyUy+uRns8EP450IgqZeM1MioBJs8o8GUcs?= =?us-ascii?Q?c86nklRXL7N7gwQXojPChhP6Y+DcCQKJYfSEAxMkJFaFOgAjecATI70UIRmk?= =?us-ascii?Q?Lki4SAfP3ZDkx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gtxsxFjtxo7EpzFeKClj5z7B2r5xt5D/j8inLTXa7C28ROnUOY1AFZ5QJad4yXrTy8Y9il1zXiqfLbTU7BpsUN+P6I4LK6nPUEc5mzve SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: microsemi.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Dec 2017 19:41:24.7570 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f7626276-3954-4382-6e2b-08d54198547b X-MS-Exchange-CrossTenant-Id: f267a5c8-86d8-4cc9-af71-1fd2c67c8fad X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f267a5c8-86d8-4cc9-af71-1fd2c67c8fad; Ip=[208.19.100.21]; Helo=[avsrvexchhts1.microsemi.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0201MB1825 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 "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 timeout and the IO's were droped. defined a new flag "FIB_CONTEXT_FLAG_EH_RESET" to make sure IO is properly handled in eh_reset handler. Signed-off-by: Prasad B Munirathnam --- 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 403a639..b0b290f 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) /* * Define the command values diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index 3677bef..03af5bd 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c @@ -1034,7 +1034,7 @@ static int aac_eh_bus_reset(struct scsi_cmnd* cmd) info = &aac->hba_map[bus][cid]; if (bus >= AAC_MAX_BUSES || cid >= AAC_MAX_TARGETS || info->devtype != AAC_DEVTYPE_NATIVE_RAW) { - fib->flags |= FIB_CONTEXT_FLAG_TIMED_OUT; + fib->flags |= FIB_CONTEXT_FLAG_EH_RESET; cmd->SCp.phase = AAC_OWNER_ERROR_HANDLER; } }