From patchwork Wed May 10 16:39:42 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: 9719259 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 2F25C60236 for ; Wed, 10 May 2017 06:24:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 202C2284D5 for ; Wed, 10 May 2017 06:24:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 14DE028552; Wed, 10 May 2017 06:24:24 +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 9DEF5284D5 for ; Wed, 10 May 2017 06:24:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751760AbdEJGYT (ORCPT ); Wed, 10 May 2017 02:24:19 -0400 Received: from mail-bn3nam01on0044.outbound.protection.outlook.com ([104.47.33.44]:8719 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751585AbdEJGYP (ORCPT ); Wed, 10 May 2017 02:24:15 -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=AvBG57k+jtK/yb+2KrTDbf2mypKx4ohG4qkptEXrYvY=; b=XV18Ht0JguA/ZydS+gI68I2kIB2pKc3Zs71CtvOQLLvUaCYwc0v1Yg5O+7G8hrAoVL0nOvHw8wVUGOWL47CAqZ9PnDBvWOAa0sWGIPKbTifwoxaVZW+Ks5+/m4n7D97jncuR7XmK1jLuFuwturKB7MasyJyj0mUR2gzLGFKEz8E= Received: from CY4PR02CA0034.namprd02.prod.outlook.com (10.175.57.148) by BY2PR02MB090.namprd02.prod.outlook.com (10.242.43.153) 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:12 +0000 Received: from BN1BFFO11FD011.protection.gbl (2a01:111:f400:7c10::1:131) by CY4PR02CA0034.outlook.office365.com (2603:10b6:903:117::20) 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:12 +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:11 +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:04 -0700 From: Raghava Aditya Renukunta To: , , CC: , , , Subject: [PATCH V2 08/19] aacraid: Print ctrl status before eh reset Date: Wed, 10 May 2017 09:39:42 -0700 Message-ID: <1494434393-17261-9-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)(39840400002)(39860400002)(39850400002)(39410400002)(39400400002)(2980300002)(199003)(189002)(9170700003)(8676002)(81166006)(8936002)(50226002)(356003)(189998001)(54906002)(77096006)(2950100002)(5660300001)(4326008)(6666003)(72206003)(86362001)(38730400002)(76176999)(107886003)(50986999)(47776003)(76506005)(57986006)(305945005)(104016004)(478600001)(105586002)(106466001)(50466002)(36756003)(5003940100001)(2906002)(53936002)(2201001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR02MB090; H:avsrvexchhts1.microsemi.net; FPR:; SPF:Neutral; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD011; 1:wYZTCacHrv31yYwxeYTZ/gtiQyf/FT65ImNdmjOXsRpDaTQgPprNUpkCIECBIa2mZYDkIFh7zEMY1z7EKqai7q+0EXE5owoa2ZNyXZ/EIt69eYHiqWPU0OzS8DzCJ/yDUWMIYbgUhdrIAY22Pkj0v5daXgwW2xY+/gjFV0fh6/gGqPwBUwa+wyTWGxQwZZS7APnL4B8RhNmqv0Yrd0Lj2lvjwbSlXj4kZxcaZa1gIiSuut/YNPiekOPj40ykAhHS3QxjRa/jspCXaTroK8DIIQbnH9Q8kzKAyBLoTp4wgEJyREoy1+uADQupFwEH5SiSZu5EuectKTFqAUcX4f5JOiBCEICqlwhQfcGJhsfCU0wgtMbYFN0B9o/DZFDtYSlNEN3XsiBK4/64WU8yQJ70VDRHv6IxgmprtesP8K+2GWb7+kBdtJ8rF6oON1/PowiBa2LHeUCAsdCxFwsPp+c6akmImlq0AlJOWnlBin3/tayI610eCO7YUyJ3S/JJpYE0VWd9BHw63gJuat2YoSpsh2tkVAQe7APPEpP8jo+ynzt5Nj5BhWE1fyAzK3i0kDxZmvqH5ag0HALH2PbbP68mvw== X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 289a5d9a-2200-4ef6-2dcf-08d4976d2c81 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081)(201702281549075); SRVR:BY2PR02MB090; X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB090; 3:SY5k6fmP37XroG5/unGLdXkGbMTE1OQYUO5pYyRvASlfLWrJHDnxI3rtIpeaS6Df8ue6h8MuWbAoKZaGYWPYzZuo6ldUstJ3myIGRKEHwp+Uipm+fyN7GyRCk4ILPOTk5x5KuMzrgrWRYL3yFtJCzxGEFxKZEYHRKGA3ulBjCEqkwd86XAnfLDk99t9OR98uX4enZpxd8p0e9WLs2q/zBM71SI/TCOaUQiKTSUCJ6wwHv+VRQq8861fVc3Gz9OxbGMxuOacldHypTXbo1ZV14YKNC9eBAMpkVPpYDWBvWvLpL18MY2o9Fddo7sCn8gFQQFCXeBuIt7tIA2Dzkv0ASp78TJlWupIjZDVPEDC36vUVLagQhSr1iMEeQ0Lb04oCXidZ1swiN5mUoNQzJZYLbAedSFmDCBS/ltTepVJw2I3Ri/W/odKclRZbzTzDpVePZqFx2AM0f5+I+How/0oCQSEwJrYLy4ucQfn9lwU34AqdgYAuiQI5NCkL14asw37f X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB090; 25:Cc0WtJgNNI8pmO/ZQJKoXD7vBQA/rZOu9c5GVV5fQjGFPk9cGjROTsQWIxT/uvIA26XWYMWLhnDZuA+RsE4Y6OwxZsh3tu2B5eAyYcuS7clMPxakXJHaCgdLiCR18ATuuMsMHK8R6dRP3j5ua24JBm2R9ebD3G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83OXAwZWjI+duwlka3KxzfXitu8ov9KQWeRby7J0jIkSeydKbgay6m9e1D6XQwqPNJ2Ks/oOWYSlVKKVJ5KrC5WwyYjSr 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)(8121501046)(13015025)(5005006)(13023025)(13024025)(13018025)(13017025)(93006095)(93001095)(3002001)(10201501046)(6055026)(6041248)(20161123564025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123558100)(20161123555025)(6072148); SRVR:BY2PR02MB090; BCL:0; PCL:0; RULEID:; SRVR:BY2PR02MB090; X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB090; 4:34YWoNo/yr1bwLh9srMO5eJ5LqO2m4hbOFN4oOC31i4+EQsgWHQZKqjTouUW8erjknMprjwWjsP0h4eskijvgVwl47JkW0wc9rp1DwARYMOLaLfDSXVb7NV0nQATEzcMPhkHyB5g0psH4WoDDXupKOAasBj9gm/VZOBo/w7eCf/Bf+g7HmY8UGGSvkMXm6iBPzkNmpuCLs6cDSUkw95/wVNBZCIWk2tJP/z6pd4zjmyo47R4s2Ttd8zx6AdnYlW9zOEccASIFqKdQtsS2lJ5uLf8bU+h2LyJFSUIvNI0FgiNUHVwM0LD83wvgfUwgTuYRYft8cZuBkI8v4Te09H0KuRoeXo8AfibDXAAaKKaVBOOPDizv59h8MqFFN1fEh49UQDnZNmnBwPjfFC0G94zeWj1SeXqaMZ12078RjFKjJEz5Q6IrGx/fK9uTV95PWgg1cldPyo9o9Cdb+zOO5xLGAoM55tvC18ro6/IU3bnWpU70PQrc+sIWpz5UgDmZCCt4xAPEUi9RghATBKlHooSFkcDis6MvHQygnDmjOMRjvbulZMOM/cbzEWvitwNdU23FpCR1SwKO7vUh9Owb8amhl6wKXe8bNwsbfcsvPcUO9v69wGnakW2tRzyFw0dIWiXEKpogR3Zx82Ue1nwaLCqrddLfsdCc1bEzCWMrODx6H+Fmg0NrrXD3oaA0sBz2WvmZmvHUr3j586xS8nWEERYla427Ce+qAfd26LnSx5vNz8ZLHbKhXGPSthvJ14ln96p1lVmEOF21BbyYT26YppU+jXYA6cV2aMr6WIDTYSZq47ZY7RANoRlfVsXqa1SnvEOKus5zBbuKN/h5YY6BR0aHw8Ir/f1J6NxyqC+ahOx1zgzaMgjs4fQqv8PP8xxAYl3hv0Xcv8QjW/bVxyfqeA/sAxVn23PViRECuJmRNcLgge p2FiH7umot/rrcgsEZnSN X-Forefront-PRVS: 03030B9493 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR02MB090; 23:K7DUb5oud0kdaMRrwguXdRidqR2NJAweGyyEaUsZjG?= =?us-ascii?Q?MG2jyKrpeAf0mVsWgqXXaU5vCKk6TaZF+gAePKuB0OrAiISYT0QS9V06PXjH?= =?us-ascii?Q?2WeIjRG8lcfhVvujyBtS61HWWHta4VLvr73vfleH/fY2f9CmWW8tyEYaVxhx?= =?us-ascii?Q?nRypLI8lXo7MK8/gPFy/6McsSJpvBiRi+rCuksU7auomXupkSglrD8OKQsJ8?= =?us-ascii?Q?oWDQdv8lBYnu1w3aFWT/3gr4oQ5AY680BI5jotsk6Ryeg3Th6y1g7UrlUDvR?= =?us-ascii?Q?JaCba6vl9G+0043tDZE8sQPxLEQeq2PkgaIZYhsrIYpcu6Ws4AZqm3xGhACF?= =?us-ascii?Q?/PbkeanSe2T/PCgrVk3gTqGZanhxNeCrhUEvzi8RYzE6not5fa3wihfCwfxv?= =?us-ascii?Q?1QATdU/tuWF0AZXynbvRV898UtOl9heprAmwv55o0VtmD9F4hlzQe/AEL9g+?= =?us-ascii?Q?w3kgch1jovMXJ5g4DoWSZZ15qZ/lMV9IWaE4fP+c7tAOjkL6e4aUWsw9h+zo?= =?us-ascii?Q?7Zp9zpkLfuXjb68n5DZJZOL2hVepiKZkYZhxTFDrgl3xEGm3LNWGox6LfDxP?= =?us-ascii?Q?wGFiH2i7OXZfLKRdV1ss65uLXdZGElv45L2T7hJMVu6n2qWblZmXGSjnqA4L?= =?us-ascii?Q?+g1GSzN2DLZVAkLqIrTWgOWtNAn6T0s+4k8kmWDrgi8SWJBwaFeBaGQBoRza?= =?us-ascii?Q?fmhTbls4Y685ZTGDJxIvUsZGRudEQQ/4XdaOiOU94U2BimSiPnegLWgYhggn?= =?us-ascii?Q?fNOHL5G7XcJ5MyV6mcnwtAMw9RRKowsicBx298C3YrkIgFF4lt7OlbBZDLBn?= =?us-ascii?Q?EOg/1m547t6OKzEvh18EKeeVhXQqV694c15XLMKZTRRm1DbB4V0X6YbPMWGA?= =?us-ascii?Q?v657ADJZQBy04/AzCLegbV5kC1v0/cyqi0nDg6u+OZAPunSw5baZ+X0c2kEt?= =?us-ascii?Q?UhqxjPibTe2bG39o+PW3vpXFacd9V+wFC5VRo57SnbsCmV08oKqgJt/KPm6z?= =?us-ascii?Q?j0ggvULy/ypY9z8pKXFv9n+zMVGIA4B/4LM5lfRJ0P5jW0NNScFl4VNBE0zd?= =?us-ascii?Q?z6P0AFB7KMWUIhu7mOcE4N0nJ9O4DbnRctTqpAS9FODWAcmA=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB090; 6:AjorXx8F2mSE72FrQKVzQ5y6MgZpRPfJcTAftN4B7o2v+ABNUWvfb4NekTG7OmUMVnFslSfulEK9B/t+Jt8jGpu5aWjwD6qRTkPDf1RNOsXqleca23Cz3N/O9MKSFmW+y5uhrK4/TqmQb32Oua/edDMne6WfeWGkE83IIto4VCRwcoxFXgwea0hMMo8q1AflZEzNc/nQAN5ocOZR58QGyLHvXifstBy8EwSa174XyG4nk332vir6/LhcaPh/FwMaj46SN2TuJbE1EZyffAVYIH1uvjYucyCKcgyfGWbwuiDyBCymxVTK+Ffk72altQAqt75xs2QaAJQQi2NSJuyxCdNUyy2rOzuh4yWJD6vHc1HABFJh0+8J4aIdO7isN977pMuFTy5D2DKoXCA+pXv27WX3r8PHLlyLuAUg/uCOIH3C9ZxRJcLtO85Mj8AT3zRFQnNAPrwsV6eEfDB4stWyQ7Htj67dQVUPk9cP2muFxJOzlQdGflIoq46qD0p41Ugrjef0cOxWSkPixkzEZJ0e/yC6oLl+GCoESkKYW3vdTH0=; 5:4BcDm4jhkG/o9YYQGKqxWkWdW8Na/YsOqRSKIJZvORJgIZ9Dqjzh0XkgoCPuUdFPPZZU5I8bMgIQF6HoyOZolfqZT70cF2Wcx/hZl+gAVB/ChRI2PHPuLFxGC0KQYii5JAvpfGlgVgkKJ/ca2szwJg==; 24:fLpxhV+24GeyF3am7sK8KOfwFDO2k5/dPuZwy0Xtdav88twQwVqtF0IFvucgXi/sBArR2/+R92vIRhmHuWtQn9QgOBCMtPAZ6qJkEVs3mS0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR02MB090; 7:r9d3CBc26gNxfB0mvsRfcTmX9s2vSEyhLejlE/rTL72WEkFKuolgF1JQZJpxAwsflOF6P2nXR5VqbsQEJA9SqVG9NQTtSUkFeHsgVHs0rAAB61EVIaK9LuVm84r/Dplz+HPWvNxacPsJ+DfxfVkOvApmi/WEaDQlHWP+b7g33c2ZAXwz5xj0DN4wHNrnVtQO8LuL2YNr4n2U3peHdIbjfucPN2ySHnFk7+QsgUcCbNAH6R4k/9Tgmh7Ib4voPwIhQQ49TRuXR1dhvhyd8kRs7Sa4ULdJe7PKvDwJFbXDPQRhEckT2UtYv3k9WERbuas+bKtqT+VpQyUoaCFvU1Zttg== X-OriginatorOrg: microsemi.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2017 06:24:11.6699 (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: BY2PR02MB090 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 Log the status of the controller before issuing a reset. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll --- Changes in V2: None drivers/scsi/aacraid/linit.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index 0a8d303..3dea438 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c @@ -827,6 +827,7 @@ static int aac_eh_reset(struct scsi_cmnd* cmd) int count; u32 bus, cid; int ret = FAILED; + int status = 0; bus = aac_logical_to_phys(scmd_channel(cmd)); cid = scmd_id(cmd); @@ -921,6 +922,14 @@ static int aac_eh_reset(struct scsi_cmnd* cmd) 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;