From patchwork Wed May 10 16:39:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raghava Aditya Renukunta X-Patchwork-Id: 9719269 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 5238860236 for ; Wed, 10 May 2017 06:24:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 43562284D5 for ; Wed, 10 May 2017 06:24:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 374A728552; Wed, 10 May 2017 06:24:32 +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=-5.0 required=2.0 tests=BAYES_00, DATE_IN_FUTURE_06_12, 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 B6F62284D5 for ; Wed, 10 May 2017 06:24:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751915AbdEJGYa (ORCPT ); Wed, 10 May 2017 02:24:30 -0400 Received: from mail-by2nam01on0073.outbound.protection.outlook.com ([104.47.34.73]:5856 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751625AbdEJGY0 (ORCPT ); Wed, 10 May 2017 02:24:26 -0400 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=JWLXR/jCkYBsPJ+lSjI5iS1A6duaZM2yTGLPHOo0SUQ=; b=RX+GtjdEUdqjextpE9Mgig+q6HeCDZzTWwZEyRUWH57l3E6hv/wNGjOw+8oOdzkJUEYCKJhTJFwXzd9OVCVRP6iIko5H7661Ss+FpzcTCj/SqMn2RBPM1+PNJzpx5pmgH8pi+8C9Qfqf+hE+ur8cs7PuLGmA78gkmPnpp9hoHMU= Received: from CY4PR02CA0035.namprd02.prod.outlook.com (10.175.57.149) by BY2PR0201MB0725.namprd02.prod.outlook.com (10.160.124.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1075.11; Wed, 10 May 2017 06:24:24 +0000 Received: from BN1BFFO11FD011.protection.gbl (2a01:111:f400:7c10::1:195) by CY4PR02CA0035.outlook.office365.com (2603:10b6:903:117::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1075.11 via Frontend Transport; Wed, 10 May 2017 06:24:23 +0000 Authentication-Results: spf=neutral (sender IP is 208.19.100.21) smtp.mailfrom=microsemi.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=microsemi.com; Received-SPF: Neutral (protection.outlook.com: 208.19.100.21 is neither permitted nor denied by domain of microsemi.com) Received: from avsrvexchhts1.microsemi.net (208.19.100.21) by BN1BFFO11FD011.mail.protection.outlook.com (10.58.144.74) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.1047.9 via Frontend Transport; Wed, 10 May 2017 06:24:23 +0000 Received: from localhost (10.181.72.13) by avsrvexchhts1.microsemi.net (10.100.34.105) with Microsoft SMTP Server (TLS) id 14.3.339.0; Tue, 9 May 2017 23:24:07 -0700 From: Raghava Aditya Renukunta To: , , CC: , , , Subject: [PATCH V2 16/19] aacraid: Enable ctrl reset for both hba and arc Date: Wed, 10 May 2017 09:39:50 -0700 Message-ID: <1494434393-17261-17-git-send-email-RaghavaAditya.Renukunta@microsemi.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1494434393-17261-1-git-send-email-RaghavaAditya.Renukunta@microsemi.com> References: <1494434393-17261-1-git-send-email-RaghavaAditya.Renukunta@microsemi.com> 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)(6009001)(39450400003)(39860400002)(39840400002)(39850400002)(39400400002)(39410400002)(2980300002)(189002)(199003)(9170700003)(76506005)(8936002)(57986006)(81166006)(8676002)(104016004)(77096006)(54906002)(2906002)(305945005)(106466001)(105586002)(50226002)(356003)(47776003)(2950100002)(5660300001)(6666003)(53936002)(36756003)(5003940100001)(189998001)(478600001)(4326008)(50466002)(50986999)(38730400002)(76176999)(86362001)(107886003)(72206003)(2201001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR0201MB0725; H:avsrvexchhts1.microsemi.net; FPR:; SPF:Neutral; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD011; 1:BJ4eIbeGt+AxRxgy3Eq+ebExQBAEnJh6XCH0AyO82CTuEmtP1FBI5fmqZ+pt5Ga7q9vZRDhRb+Eq6XMn7jAImNxgWwtVSuBRNBf6gT7qtG3oj4Lg9ApI/t3oUTYGoq1AN6usERjVx40n74Kh1kdP7D7qZh5h0o6SG3la9pyZ9qCeCNivZU7v8D8D1wr0GjLOqAHC1UDg4LMvYvbAfaagQNTi5NWh6UegrSDhj1adcdaxS+HE911hFqJyi/KszZ3F3pJ7HqZSpCNouTL/cpCtqqTzcA51WJVb2HwP3ujT0gCzo5hl9oiSFN1gzt2gv9KB7uMekjDFzDYbjFmRfHsLzMVt/dMHhm40UR8ECUPT6gRggAayk27nIiG5qlpftzQWp6xTxhct1lPGJpYjwW8FxDEGGjD+mFFqddwiHkIHrBqmfoUPhpEZBtnKCRKziGdnoRG+5JjBHJBXDffKnQtgFAa+llwqAp3/T0rrZmiYtDaH1cOvErOu2Do05yxxhWgntJKTdqTkgSB6qsSLSjkSm/VuqY5zC1mVfaBblKWCFFfbtDdpyd1JQ8PLBQDWQ9GCIQ3Cw9fLceNGnDrWV55iFinclIOGdqlo/KaE6dYn+q8= X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 59bc6149-14de-4220-bd4f-08d4976d3388 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081); SRVR:BY2PR0201MB0725; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0201MB0725; 3:9U7JQJrCZb+huc3RxOTE4FMDB3t4fdW6OfuhOf2nsV3yHVWVCbsdzcvYkgPAcyfzGBCMZ8np5icPp6DcqiogCQ7I3CrcvynEQ2UeXRWL4RMWlHwCKyb8rIzb4RSDe91KJvGQpS61wHw61eHOFol58Cv8LFzfUHaviGcAn7eaBSMXUCW30eQFzrioeCHR4F0c9cgTGRKI4fjU0aJyrxONJ2aGuow+d/RyHYUfOccsL4tnaxQCDYGctwggh19oWdXjnF6gPgBHWeP3bScKM7Q4zLw/Jghrz68zBn75zshPj4T73jvKLv6PWpZd0PiUB1tY/zfRezyepJREI+lo+q5fB2MM+9dHXHli4D2e1XObsqiYzUNxDwqr1b739GtnZc3JxLQ29yl7rSjosVlMBf9lIprtKwm8K27duM5Txw2cvbHm+I24PwYL0cU+rlXxVtd+8T7LL/OrDGXrkb0ow4ny5Q== X-Microsoft-Exchange-Diagnostics: 1; BY2PR0201MB0725; 25:pCFXcR/SCJyUZDzm6Mtbov98VZzuvqO9PGTJck0ASwJHHcwRrbY4EX3dD/TbAIMRF6AzX6dxWdJUupSAwA82zR3T4BG+rSS20JzKFzhbpgjj5wX3pcS1V3U4cAXXWiVD8xCJsa2n601NWdvV15tl5R4A2kefZLeIrqZT2BbotAb5ghZ1AneZOJIBge52gdFzv+slquHRJNsWy8rk4RAXuZUBtTytyAy9Agx2FKENnXX9P2Hgk08POC1du6+1WXK6YVORwxby65R4djyqz7Ght37pEUq3JCegsGex/ruumzrUxZKeKApPGk+0tVRrruUe9nRAJC2e61Le/WjetmQxNIqquI1sU9KBy5bU5ElFF7PSTRKUCZS0UV1lY4/o1sXlz8rRj7/zS09gg6/uaMgsLhZVIGmR/Z0V6X1Olv8olXvbxQyBHPEPhBErCkUVWs2ntnl188MqT0akne1/F8sntyGySzHy8RjaAhwTvcYKilI=; 31:6AQwTvlJq8t0PMnlxKv/y5Dh0brzap9mjnOzW5KG90EZiShveHfbl3/5D8qzV2mowy8T3bE2snv5h2n/7lsZ1v5+I7wwCFhQxNds1mdXe4wbyv0tYKpo//79zKrSqIur4fZ9as29fC2jQPwIPJrq/vo+UA6E2xHAz0vz6CM4MlW/vs2pcc61lXzXn5jztA4dvypIVH7bd47q+3aLlhhq+iv54r3MuOAWHK4zec+CBiskAPFAV1MWgERHAMXzRTO1OVm4lxPmyqweJ/0V4o8QbKo94DI9wP+52NaJphbsKQ4= X-Microsoft-Exchange-Diagnostics: 1; BY2PR0201MB0725; 20:765L668WYOklX2mb2qxJJgDBBgV5fz9jFPDTsxMAr0kavrNZ2w0r/1EEbETzEYxY+BAdlYQ429V/S3fyvLshBTK6BalVIbfKBQ5VUIHKuUeovSekqA0hi53Xag4izbEAt4Oep+t2Tk4GQDdsddoMPaDlXRQopMHXexsleuLgzxTQY5bTlKaIYTYpO8HzfJtuQrHXq3ik9WNKyWnfEzJClidIskRtYfLDHfw/007uRupdFPtlB5S3URnkuanPA2tYuk7gNbOSTBvm6FWzCNdVhl49GjNUM+v804GFNEhjjBubCrjaxonBDqOHTCreKyablsTBqAUk6FmelbdjfxOBbA7aKCSF7ME3w0sm0inxBfZK7AL0G2WWKEX0pYDIaRvyM24YkKFUh8DPU/e5BZFsI5dZ/SQYtSw+DdPZI+fiJYb4nIzzeBrL4Dw8dWPHQSV6y1kTUEGldypvq1UwyA9pqEyShc+gKP9Ni0156JG4gnm1gkLcQg7FXgAFioXgNZ7E X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(72170198267865); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(5005006)(13015025)(13017025)(8121501046)(13023025)(13018025)(13024025)(10201501046)(93006095)(93001095)(3002001)(6055026)(6041248)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123560025)(20161123558100)(20161123555025)(6072148); SRVR:BY2PR0201MB0725; BCL:0; PCL:0; RULEID:; SRVR:BY2PR0201MB0725; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0201MB0725; 4:x8BRnY4TEAPWZ9vPr5uWUDuSIEAjCMq9Q2JJXaQ+ZmrSiL3zVPTWUqp1TdaooBkSKJjLrjEmB/PKi7PDBJxhI6hxAtTnaD9E9SLB3/UmO0NMKFSnDMrRUQKu1UcnTTm4BfpvK+Mv82lvtkiWWksqqSBs0fp202OccpkhuvR9Cxyhesoz65o0CfXzYyF0zxhPOyQXti/wvVXq+/KYd4CAJcMyEHJyxkU7xslTMu/iwCGfeLRhobfumuJBVG6lzZNcOgdGKyn9fa1iD6HaAyeeiQaoiemcLpfLhOv4IH8o+/7DrLRldv6oOz9QS2LbgcutDncSHwdCKGuWCbplYZJYdTucTCOZ+scHqhlQRApnio7E2K0WPiehAUCpBjk823uDxW/G61sqTaJVTCbhATJTsK1UhUVx2O/aAdways5PnavNctJLQ4u8wQCwZDdpk3V5Ew0qzEsV2mikOlo0w758UqjsIyXwL9hBOfe5oND2uWfITntyYlx16RhnivB+60V/qVB+GsDOi70MT2jTobxrimaTY2yCWR/mm5wmKSO57Ygtvc5Dw9nmDnfOVkU4yqFE6xgQF0IVR5jb29XZClhT7akCH6HxxyGjJXhkI2TPO3hOi1dB7Rl0k1QeB3FVLgly3Xp+Mi3OvDUWmjlQE0pWFd6P5Sf0Tbt0/AFOC/6v0XpzEx53yEziZ1Oynmf3IhK8SdTxfnMLzCY2pFRnrujtADleImCg6XxdL+3D5+Ho8WPd1mYFiA9n71UzolcXslwokNxNaXItnpqmGDl0t0KcD9UuqG+/lM2qIqaSRBcSlo20aV7nTX31zrlVOarU/NEav5pj5u+XBQo7L1Q/onVANNUA5LyQxaJXdD+LWqMH0PfJJr+3coquDvCHGaeliIR5SsTjXZMKF8sMkAX4smiO/z7zkjsyNweam54rZmgH gSpYbBWLqUUYJ5YUEmsdWD3t X-Forefront-PRVS: 03030B9493 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR0201MB0725; 23:gGMjtRqy7w7sRbkBweOl72gkol5YUhBQ2MF+p5T?= =?us-ascii?Q?jw/AbLdyy6Z5lUS1z0ffTh0MMXVwmnVCL7qCVqGNi0a8vE4ZDaHhEtAkuWDA?= =?us-ascii?Q?BCIEQ4QXkO5yts77NaR8svp6di4sUO3Dnlu6fpm4xv9Ut11onkENbsWpxrfp?= =?us-ascii?Q?mMhQwceDhg9hqrTjHUrJuIyRbVy+azadahjmlELh3Z9rTd0R5mIbqU2Cb+aR?= =?us-ascii?Q?1z5eQm1xaEObsR2a1azP/02JB9Y08aYG0uWjR2MWjCaXoK6Jmb75JNnfAX/G?= =?us-ascii?Q?3xv1RdAt9FjIxZlxclmgcRZA9KDDpg3M9qkRv01zynJLIl0poKwLGk0Ceyvl?= =?us-ascii?Q?G3b+bx8R6rge+pqQJuvlU+DClmox5Pzao0qsgd8jbxzbTl03SuUR874VBi3o?= =?us-ascii?Q?y5KZv18M5CJ/9lw62rmsrFJHydPOLjUFZhl0pCn6PyPdRbVbx0MjWhuAy0n+?= =?us-ascii?Q?4kUwa1092vF9H0J57oDQ4ChCcqM8Tf9YflaFQkGQP7DLaOimkggnaQko1lHz?= =?us-ascii?Q?BdsVGXgEXdC+1ch7elKdoKJr99BGQvF7EWFZACQpVWc/SMD+NIG+pFQ8eY6R?= =?us-ascii?Q?esiepzYM9MK9ly0BXJAnC9tyEmY9fbXMhkGrb2PN1VecgYyp7tgbIpMSo2LZ?= =?us-ascii?Q?CY61WdTbRQm9iMg/WeH7PgIZhHoPCXXhgy2u1FlgaxCyi5GKlvQk0DFNAo6Q?= =?us-ascii?Q?QFYP1b7SUqCWSqA2LGohFLWIZSVb27p+tvp1Ut0mW889S/FMd+c1vUerk0I8?= =?us-ascii?Q?gW+vcJ0uiTbzxEWTayPUwXHc0ZkYP/+2j2aI58HdIK6tBOLmP30j3SGYbOkZ?= =?us-ascii?Q?qc63nCzYHwdqRyjR1invHqc2HEwzAnLzceYBDpqyVyQoFEux7ZoEhr6Z9sS5?= =?us-ascii?Q?ue4SpR2mcLSQipUvJoRmcAELBWCp3yWVxWTKS+vMB3k9PzXuvKv9PK0JqTyq?= =?us-ascii?Q?7lAR93hhsWjRirGhEr6vxRiSgbKTg0Uz5mnM15IjwGwSHMDKZ41GWBTkSSc0?= =?us-ascii?Q?J7GS7eDXIsAhgPs4z5Ctth94/T3DG3bn2AIb5U4qN3AE/ZhDpP3tNVzAfCdB?= =?us-ascii?Q?NIHhrGRmxyIzxhA8IIxwrp9VumdB48wzfe1HmzIWY71INFaAluw=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY2PR0201MB0725; 6:luXG1Vwkp7qI+Ljb24DaLkUIITQgYCO4+kUHhtn2WVUkSMAUCfh/3NbKD7yA4AHNh0UTlxPMaz5nwXdTOkbOq920bmCDHzDlM6sQwTz6DdUIEYJxku348J24B5MNOts6e4CinGc/nkWhxUt6JPIbI28H2+1G8DabfmxUn67wC3oMNJ1VV3tqW1cIQb7wB7c2oY9xv9q0OMtvGmGRLKqHfvBPbWgHaLQ9PMwj1MHC/riKU71bDMXAiGv0lVb3G4qdieaQbq2zpHrfzkFuZ6SClrwUXFIXq5/x8wK6zxnx9lDac6A3L4Zn/1XC+aC0o0KcqPwHy2f7feFqanXc4NhQ0hLWcBzHhY/qX+OvvB629z+n/PYjDBOTcnCR88tVuPl+TCu4qQNHAcWtXGLdyRiGWwMFiui+Rf5gIMbkOYHGDjemeJBNBFX/YObMXQpWNS5uE2XAluAyhkHcgygzAaQHnOXRoJIeD3gwSLKVwKw6v2xDe+1+l/mKZLiuhJdkWOBENHKPMO66L2G8oMHJoZeqIGYPhks/liWsHQtWBDu658k=; 5:2BV+jnUDNNfBpRnYYVFytKdQ5oelv68t2rL4t8JZwI6mrXOpijUChQkHV0xIwolSy4adXUIeNnmYHO0AwN3vPduNyZcYeJOJ5T2K8frGkwRnZ2uW5hDyJF5i5bN9f+n3dFafqldXFAG7MQGRxPWmVg==; 24:yimNfeJ0TEQgazLShtxSQxL/ES2nKGCE4rLWxjod2uhEsMp+mC+YE2Tx7V5ioD0kj6sYT0hD1c3n8m4P8LI+t2TgDWQk4sKsadSpVrWVMh0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR0201MB0725; 7:zL3bWiFOC3lj+1aqaF3AuQSE17U20ZyG4d6onvOnC4BGT4+/DXN9NK568pw3NFj0ugK5cUj7QLx37kExS1YtqxR6j5yWhGBPGoT1Fh/SoavyquSTwQL2AHmLHrWPfapivR6vs8ERcA1YbwvjKWgjJyjBoYXK85Io9v9ZjBpcamSTkY/KMU5JHamPOde4BstXlvycbNNngJ4K6DNNbb3zYcN8RGL+ns62J7HWEZmZtkLe0ddpk9LO1kErNXGB/gFpJbTKUrL2AoEsRBkB/8ca+vQ7dBgLynFQGAHGmfQ6aKBZ9TfO679kQ0FqG1GKDQuybrFVsUPvyWGnzEm5XOKKfQ== X-OriginatorOrg: microsemi.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2017 06:24:23.4635 (UTC) 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: BY2PR0201MB0725 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 Make sure that IOP and SOFT reset are enabled for both for both arc and hba1000 controllers. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll --- Changes in V2: None drivers/scsi/aacraid/linit.c | 77 +++++++++++++++++++++++--------------------- 1 file changed, 40 insertions(+), 37 deletions(-) diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index 3dea438..d933d2f 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c @@ -828,6 +828,11 @@ static int aac_eh_reset(struct scsi_cmnd* cmd) u32 bus, cid; int ret = FAILED; int status = 0; + __le32 supported_options2 = 0; + bool is_mu_reset; + bool is_ignore_reset; + bool is_doorbell_reset; + bus = aac_logical_to_phys(scmd_channel(cmd)); cid = scmd_id(cmd); @@ -900,9 +905,9 @@ static int aac_eh_reset(struct scsi_cmnd* cmd) msleep(1000); } - if (ret != SUCCESS) - pr_err("%s: Host adapter reset request timed out\n", - AAC_DRIVERNAME); + if (ret == SUCCESS) + goto out; + } else { /* Mark the assoc. FIB to not complete, eh handler does this */ @@ -918,44 +923,42 @@ static int aac_eh_reset(struct scsi_cmnd* cmd) cmd->SCp.phase = AAC_OWNER_ERROR_HANDLER; } } + } - pr_err("%s: Host adapter reset request. SCSI hang ?\n", - AAC_DRIVERNAME); + pr_err("%s: Host adapter reset request. SCSI hang ?\n", AAC_DRIVERNAME); + + /* + * Check the health of the controller + */ + status = aac_adapter_check_health(aac); + if (status) + dev_err(&aac->pdev->dev, "Adapter health - %d\n", status); + + count = get_num_of_incomplete_fibs(aac); + if (count == 0) + return SUCCESS; - /* - * Check the health of the controller - */ - status = aac_adapter_check_health(aac); - if (status) - dev_err(&aac->pdev->dev, "Adapter health - %d\n", - status); - - count = get_num_of_incomplete_fibs(aac); - if (count == 0) - return SUCCESS; - - /* - * This adapter needs a blind reset, only do so for - * Adapters that support a register, instead of a commanded, - * reset. - */ - if (((aac->supplement_adapter_info.supported_options2 & - AAC_OPTION_MU_RESET) || - (aac->supplement_adapter_info.supported_options2 & - AAC_OPTION_DOORBELL_RESET)) && - aac_check_reset && - ((aac_check_reset != 1) || - !(aac->supplement_adapter_info.supported_options2 & - AAC_OPTION_IGNORE_RESET))) { - /* Bypass wait for command quiesce */ - aac_reset_adapter(aac, 2, IOP_HWSOFT_RESET); - } - ret = SUCCESS; - } /* - * Cause an immediate retry of the command with a ten second delay - * after successful tur + * Check if reset is supported by the firmware */ + supported_options2 = aac->supplement_adapter_info.supported_options2; + is_mu_reset = supported_options2 & AAC_OPTION_MU_RESET; + is_doorbell_reset = supported_options2 & AAC_OPTION_DOORBELL_RESET; + is_ignore_reset = supported_options2 & AAC_OPTION_IGNORE_RESET; + /* + * This adapter needs a blind reset, only do so for + * Adapters that support a register, instead of a commanded, + * reset. + */ + if ((is_mu_reset || is_doorbell_reset) + && aac_check_reset + && (aac_check_reset != -1 || !is_ignore_reset)) { + /* Bypass wait for command quiesce */ + aac_reset_adapter(aac, 2, IOP_HWSOFT_RESET); + } + ret = SUCCESS; + +out: return ret; }