From patchwork Wed Apr 25 13:08:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dupuis, Chad" X-Patchwork-Id: 10363181 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 7B7426032C for ; Wed, 25 Apr 2018 13:09:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 66DFE28DF1 for ; Wed, 25 Apr 2018 13:09:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5B79928DF6; Wed, 25 Apr 2018 13:09:53 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, MAILING_LIST_MULTI, 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 9FC9E28DFA for ; Wed, 25 Apr 2018 13:09:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753951AbeDYNJv (ORCPT ); Wed, 25 Apr 2018 09:09:51 -0400 Received: from mail-by2nam01on0074.outbound.protection.outlook.com ([104.47.34.74]:1056 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754043AbeDYNJd (ORCPT ); Wed, 25 Apr 2018 09:09:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=kJhZGjTRjJIoAeO4aaKPxmFycYs7B7w99fZrFn9TOEM=; b=LupJQ2zf/wCH1jzDqK4V+YdYaYFNS9P+n6s9I9Esc8w9i9kY4iyW2EX1oeqTlkfc+sZNWp7wqpp/rBD61JFizwJe8MZjlnV+7uJ0m3vRPfmkr04ezztPG+d+8U2CczNhNED7yRHf0oUMP/y3Hjw5uYeezBzCzxHCqk0wFnMBQxI= Received: from SN4PR0701CA0013.namprd07.prod.outlook.com (2603:10b6:803:28::23) by DM5PR07MB3179.namprd07.prod.outlook.com (2603:10b6:3:df::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.696.13; Wed, 25 Apr 2018 13:09:32 +0000 Received: from BN1AFFO11FD006.protection.gbl (2a01:111:f400:7c10::177) by SN4PR0701CA0013.outlook.office365.com (2603:10b6:803:28::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.696.13 via Frontend Transport; Wed, 25 Apr 2018 13:09:31 +0000 Authentication-Results: spf=pass (sender IP is 50.232.66.26) smtp.mailfrom=cavium.com; oracle.com; dkim=none (message not signed) header.d=none;oracle.com; dmarc=bestguesspass action=none header.from=cavium.com; Received-SPF: Pass (protection.outlook.com: domain of cavium.com designates 50.232.66.26 as permitted sender) receiver=protection.outlook.com; client-ip=50.232.66.26; helo=CAEXCH02.caveonetworks.com; Received: from CAEXCH02.caveonetworks.com (50.232.66.26) by BN1AFFO11FD006.mail.protection.outlook.com (10.58.52.66) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.20.653.14 via Frontend Transport; Wed, 25 Apr 2018 13:09:31 +0000 Received: from dut1171.mv.qlogic.com (172.29.51.171) by CAEXCH02.caveonetworks.com (10.17.4.29) with Microsoft SMTP Server id 14.2.347.0; Wed, 25 Apr 2018 06:09:23 -0700 Received: from dut1171.mv.qlogic.com (localhost [127.0.0.1]) by dut1171.mv.qlogic.com (8.14.7/8.14.7) with ESMTP id w3PD98de006476; Wed, 25 Apr 2018 06:09:08 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id w3PD98B1006475; Wed, 25 Apr 2018 06:09:08 -0700 From: Chad Dupuis To: CC: , , Subject: [PATCH 14/21] qedf: Improve firmware debug dump handling. Date: Wed, 25 Apr 2018 06:08:58 -0700 Message-ID: <20180425130905.6385-15-chad.dupuis@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20180425130905.6385-1-chad.dupuis@cavium.com> References: <20180425130905.6385-1-chad.dupuis@cavium.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:50.232.66.26; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(376002)(39860400002)(346002)(39380400002)(396003)(2980300002)(438002)(189003)(199004)(336012)(6916009)(5660300001)(486006)(8676002)(476003)(446003)(76176011)(51416003)(44832011)(126002)(2616005)(6666003)(11346002)(1076002)(316002)(81166006)(81156014)(8936002)(50226002)(106466001)(26005)(47776003)(50466002)(72206003)(54906003)(48376002)(42186006)(87636003)(106002)(305945005)(478600001)(86362001)(16586007)(80596001)(356003)(4326008)(36756003)(107886003)(59450400001)(2351001)(186003)(69596002)(2906002)(358055004); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR07MB3179; H:CAEXCH02.caveonetworks.com; FPR:; SPF:Pass; LANG:en; PTR:50-232-66-26-static.hfc.comcastbusiness.net; MX:1; A:1; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD006; 1:z+yfLxhGbHo9KSC7KGgJjDJiWp9k+WsiTy24KzU489KonDD9iTKXxalYw4iSpWqW4gxcIumJGpiGphNg2wRs0Gfa+x3kykPw2hlKCrgxyWEYmqOQNa2iqYx0mf31DlYW X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4608076)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060); SRVR:DM5PR07MB3179; X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3179; 3:tz4wBHzhZsPBklFkGlboq6kFtdU4bqPN3KWjJtY6kn2Uxuf9GsCLtxK8KeLkTCZNnb0zJ6nGUYodNCZezZHtXGB0/9ZssWdDvNWXdBauvPFBBnxspV6JzoYwTh7IZLXiDXyegVOVQ61IReHu89i0/quszfQD1gNwMG+S6XMfFP6PSDa/vrrHJk5jjzkb11t2elI3DjX0uBMukD9nlSWaxNAW6hYHMHeBBchqt8ExBaSlWEc7A0bpoEmWwiAqneGeASPRnhGh0c7/gp1YZ5F40OqTUY+yYB0KDKKtKlqGiMiEsVVxeMOAx3h/DKQ8SBJ1NSx//FXiBCCTGce1P21QMho1uO3Zy4OIoPOd52RfDEg=; 25:oMaIqrKVzVbp79wQZqEGWHi/D/V0tN3B9j22RuqKmnUrZqiUYsKZp+aK7rluk+mywbxhrbyBs0c0KkgnAroZHJMQIN9wJ9vbLMkRD6ZT9GI2ez3IJsbF5rOPCwEl8aLmo5lexRo2qGheJMIr0ZuvWrmmcDa5Lfpm5AjEWS171YJAvgwGOD49jvtDnXZSExDb5a9M5mv83MsXhWSIHdVVbnxJKuym8sWdtz9LmGjNWU2+219MHXpWYGO6MuYCK5XORrkc+O0GUBR8swtJHu5E4oqfhmmT5dYv7wZKbsxA8HJWCA1ebv4/nf+RBrjrUvFkVJv2HDG5sWMMnzhG7UhCiQ== X-MS-TrafficTypeDiagnostic: DM5PR07MB3179: X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3179; 31:fm/J6nytmhEuZj0I+exzvAB4QQlltAotbwSOnlwoUz9lDZL9gb/XKaGLKN1rUznlvsD+OvWRNQLwSvz0rL/VlP6Pjin3zNyP08+FxC6ljFVA7E2OucKSHCiraFla4+hlcrkHUEZ7ao9LBgfkz7NMSRhOGeREgc9BTlJZTXkmhU03vUkK4f6KgbLAIUXO1/6QA5Fmwak57gCaCIjFWRGvaA9iun9D42AVg3Ei/Su7XEk=; 20:0v8d5dhb264a1ZoBFS8DlETTD5MaG8XN6P6qHYoh+R84CoWEuXm2k5RmTtSQxsX12NhiAxLn1AqVjQNgIpOQ5P0IQG/hLODxXO7IrMzp3EpM5xLaJl6eN3QMzX4EozZfHPy+8PFwEdXQfqJziwAWWqQWPguduXfe2BzZ70lbJ4deuXDByQtWqKQkXerJBztSTUXVpE1pA3PPzKzSw42PH/RYRS7nOVgWG6IiXqchfZQWkghgdKp0MsJqOkmufbt83hZY2FC2U+R54xt/MYYgjstu13WrCqhAv12Z3/M2LIFS3kb1fJ2jVvTwSjOfRUOzSD37QWx4/FG1X1MwLiCCGD8sbF6eOTus0WrRF8XfbAXOEl7vbYky/z/pg9u9++INBOl+68jDYpR2pzbWmOSdFigEMOYzekp/N05vtJD2gM2DH7zAuXHvkD/o9Z8QByP6K9QADrYHnovYdarSnnokgpks2QqvZfnhxA+4rb0gBwZ3WQHxcRN1oQhUhQ0qfizp X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(3002001)(3231232)(944501410)(52105095)(93006095)(93004095)(6041310)(20161123562045)(20161123560045)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:DM5PR07MB3179; BCL:0; PCL:0; RULEID:; SRVR:DM5PR07MB3179; X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3179; 4:/LBeT3ho1PKh/P8HaUwK6NPEuNvD8w7+Tw1Z1lDb7i6VyXpKKr2V4zBTHbCSKG38QficT+BproN/1439cLabDKIn+wjJ0nbq97XO6/4UYwQGsUt9NV22wqT1kWXWnI8FdGD5BtQeegTBYY8+55uLvPf4zt/rg6GNBFhHNkUGLuIRYyFcQ87B5sS9y63Bryd7iA6hDC+hQUIn6cutrkw0ixrwHEDqLdEYgeqjBIQACX7/L36oAjc8+TPEt9QIZtMtLeC2XtDhH9p/DELbAdnUPg== X-Forefront-PRVS: 06530126A4 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR07MB3179; 23:f5/X3gRUTSMvQOIyWTQDaLjLMatu6m1mtcHiTSwF7?= =?us-ascii?Q?Qbmf+pjvqlYPE61kt6rUctRmx/y6z4K7hTYwogCCg4OuaKaKGQipCITTAc1z?= =?us-ascii?Q?e7MoWNPDQMlEg7N2mOWS7K8sLud8S2kHh3jW3StO1U2Ej1qHNG7WU+Zit2VV?= =?us-ascii?Q?/SpEFsnDO/FLb8+K/cYKvFvvW9H2tRWGEfp9dy7V0CYSPALsgF/D7WOTFWyl?= =?us-ascii?Q?FAO791aFRYXusMIj9ObilHj8BwOVZIXjJYfBo9hp1PmeoX/7BPLFqPd4uh9y?= =?us-ascii?Q?LT7XazvMLzR8qr1VvVxtBMNqk+938E/mvQDuXmUus5ZzagpT0EH+FKtrzXfQ?= =?us-ascii?Q?g7GzZaTcA8QrT/nn5m8mHsijWPycUntiNO5VBf6zMXyHFV2NQNikZJrqx2C1?= =?us-ascii?Q?KNxf4JmKvTJ7tQqk81teoSDnK9UHM1/f0G52+z8UGmHjlY3+pH8nVOYbPqnF?= =?us-ascii?Q?sxG1p2ZahvgGGcSQpy19eHYzQGUyuJs7r8Pbs0Ek33+csS1DPGRfTsWLjPus?= =?us-ascii?Q?6tNrjqiYzayn/lOs8bZpl3n0c728n7GbF3RNR3F6bquT3crkGUZRPexd1d7R?= =?us-ascii?Q?siH5Qfv7zkx0ZquKr1h8nFIYwsE0SaWDLwS2937RztHAto/zVziw4rIErbPi?= =?us-ascii?Q?/guR/a5/Yu+a0TVf78e+tu4ytpu1r/NeWeAiqxOE6FKD2gXLsahxfYp5ZxwF?= =?us-ascii?Q?4F7Zus3BhN4NDIZ1a+ULlRnqVVFjhpzGj3TXdAhP0mHCwpdGT2p3M7OjX3w/?= =?us-ascii?Q?nofuAR3hasp8ytZQi8vRmFxWMZWFFffkNXX1VC8K14SXQY/T6D2q8VR9Sl+1?= =?us-ascii?Q?rrnXBy80nkgU494EBZPcJ9yq+h1a1gN0Y0B626Ffr1Bukk2I231Z2e2l6umL?= =?us-ascii?Q?YnT+rfvAgXNKlkZsfRMk7xrj45nI2C36WXcaYETGhoM50Y0a1Zf8z5moWFvv?= =?us-ascii?Q?XtNh8oZcSM3csQG9msJKKY713L9HIkwZ/esJVvlSlm/MBe+iSBmACIwNgDcN?= =?us-ascii?Q?TJW5LPdJyleSw2aqKCTcR2vklQwSUzJS/ueN4BoGpqFNwlayb2zS6cRtqe2D?= =?us-ascii?Q?XbKDligOGNnX5hMbmrLyvnhLib0WOZsHA0gmfTHYZsTlt/l6pmKC12mtwD2q?= =?us-ascii?Q?43V9ZBHaJ5v/XbYh6i0LY2QKjsD1uElYjiHRia5ot1DHKqR+4MdbcJvNf9ml?= =?us-ascii?Q?K7UhjTaaFnTnMNP/rug2F6M4EF0oFrxCI9N?= X-Microsoft-Antispam-Message-Info: tywjmoFq/a7/z3Gpmc5TA/XhgrWLmbLjPbQ9uY1a7qyM1jV5Y0dK5WzPur01bi527BE7fHIK4xCybdlZz7xPT+RPTAH3eVR9MDtLs2b61d6UgwFOccxJgpPfpAw2Nj4yAuCtPXraY5jhYIp5Zb6ZKeRfH4Vynx7JEIzKJcJr9jE19kaBvjY3Smv+J+/C04KK X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3179; 6:naHGi6YEPr5++RB6LX+xp6t4Kd02rneO42dhkWiMFPtwViAcW9c97we+N/wXBBaShmwvoeCo5eOSVA/C1yG7lqK5/y2gvo/P4oBQs1YzifA6wyNgvT6xX83GWMwvq+BsdC1rg4jG9owHt4p+xABlTVtd1GvimJYXAUZLNLLMZwsvJgcfKTKH/RkiTXKB7ihbXr3jBqkOXrTFiJwJsqCilWogeu1gtL4BMIOP5YnEjJZ41dmXdTFz4QQPhye1NIxTtdoCEoRk0Gu221irLdOaFvID2PSBmrJgupgw/YwQjbgXL7EM8GZdQSplb4GhSu/mSCzU8PyEwN+PtxlGIRYM8SOBGIhT2QFb3H2MQXLj5Y8eiCUkm/cxiFJfL2G9zlkffsrbq1X+mGMKASLm+/YoXOLGDQ+UwUsam2UWuiJ6ntpblvPKLLlhaRFyEWWI3iU2Uuk5J/Xpuw+lY/4GPe7j9w==; 5:n74B7Vbo4GBFR6Ol0xcd3ynPUfSviL+QERE8I4CCY31kmYKf+oD+LplL1ZgNKCVLcXnbavKdQTcnrGSF0nqA+C5I2mqhze/l7ZvBEORsVmTF18+rsQPmazLNr3Jm91SYlIMvhM4CMovzgA3El0+OY30jUY6wGlH3JkKjgP+2aOg=; 24:d+jtKysfbFLSsWe1vtZbuRFFoj1JfQOLpkAYQa40vFpZrJraDfzt9uASHhrCF/0zqE3AvGIhur57PDfQwjK0mur26hilzn3sk1E4jl3Tq/c= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3179; 7:TGVEsOV+RgBfhV1BippVlXfcQBLRDaEz/D7vHyK7DNf3DdDPke8qhW24dk8RaUygsfKkhMCrT2MrMaaC2O6zW8qHHwX/N/K8tcSOR2gLP/Luykaxcz7wT6Zn4qZvW3+uQJzmayt8bc0Gy3GIAk3+Z4m2UmzxBImvWkoubJhZT/22EUcY9sqSxdPq1r9CYeqecdrM2qbFdS2qDx477Rn/acgyZZa6+Uxpsnhc4C7rFOKwEDw1vSLV6XuEZ9X1DOL0 X-MS-Office365-Filtering-Correlation-Id: fe2edabd-8646-4b01-b3b2-08d5aaadc8d8 X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Apr 2018 13:09:31.5070 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fe2edabd-8646-4b01-b3b2-08d5aaadc8d8 X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=711e4ccf-2e9b-4bcf-a551-4094005b6194; Ip=[50.232.66.26]; Helo=[CAEXCH02.caveonetworks.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR07MB3179 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 Get all firmware debug data instead of just a grc dump. Signed-off-by: Chad Dupuis --- drivers/scsi/qedf/qedf.h | 2 ++ drivers/scsi/qedf/qedf_dbg.c | 2 +- drivers/scsi/qedf/qedf_main.c | 13 ++++++++++++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/qedf/qedf.h b/drivers/scsi/qedf/qedf.h index 1dffe21873d0..44770f849632 100644 --- a/drivers/scsi/qedf/qedf.h +++ b/drivers/scsi/qedf/qedf.h @@ -367,6 +367,7 @@ struct qedf_ctx { #define QEDF_IO_WORK_MIN 64 mempool_t *io_mempool; struct workqueue_struct *dpc_wq; + struct delayed_work grcdump_work; u32 slow_sge_ios; u32 fast_sge_ios; @@ -499,6 +500,7 @@ extern void qedf_process_seq_cleanup_compl(struct qedf_ctx *qedf, struct fcoe_cqe *cqe, struct qedf_ioreq *io_req); extern int qedf_send_flogi(struct qedf_ctx *qedf); extern void qedf_fp_io_handler(struct work_struct *work); +extern void qedf_wq_grcdump(struct work_struct *work); #define FCOE_WORD_TO_BYTE 4 #define QEDF_MAX_TASK_NUM 0xFFFF diff --git a/drivers/scsi/qedf/qedf_dbg.c b/drivers/scsi/qedf/qedf_dbg.c index bd1cef25a900..e02c7a497de9 100644 --- a/drivers/scsi/qedf/qedf_dbg.c +++ b/drivers/scsi/qedf/qedf_dbg.c @@ -147,7 +147,7 @@ qedf_get_grc_dump(struct qed_dev *cdev, const struct qed_common_ops *common, if (!*buf) return -EINVAL; - return common->dbg_grc(cdev, *buf, grcsize); + return common->dbg_all_data(cdev, *buf); } void diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c index be29c8d155c2..3e9befcbd5ba 100644 --- a/drivers/scsi/qedf/qedf_main.c +++ b/drivers/scsi/qedf/qedf_main.c @@ -3008,6 +3008,7 @@ static int __qedf_probe(struct pci_dev *pdev, int mode) qedf->link_update_wq = create_workqueue(host_buf); INIT_DELAYED_WORK(&qedf->link_update, qedf_handle_link_update); INIT_DELAYED_WORK(&qedf->link_recovery, qedf_link_recovery); + INIT_DELAYED_WORK(&qedf->grcdump_work, qedf_wq_grcdump); qedf->fipvlan_retries = qedf_fipvlan_retries; /* Set a default prio in case DCBX doesn't converge */ qedf->prio = QEDF_DEFAULT_PRIO; @@ -3240,7 +3241,8 @@ static int __qedf_probe(struct pci_dev *pdev, int mode) * unload process. */ if (mode != QEDF_MODE_RECOVERY) { - qedf->grcdump_size = qed_ops->common->dbg_grc_size(qedf->cdev); + qedf->grcdump_size = + qed_ops->common->dbg_all_data_size(qedf->cdev); if (qedf->grcdump_size) { rc = qedf_alloc_grc_dump_buf(&qedf->grcdump, qedf->grcdump_size); @@ -3424,6 +3426,15 @@ static void qedf_remove(struct pci_dev *pdev) __qedf_remove(pdev, QEDF_MODE_NORMAL); } +void qedf_wq_grcdump(struct work_struct *work) +{ + struct qedf_ctx *qedf = + container_of(work, struct qedf_ctx, grcdump_work.work); + + QEDF_ERR(&(qedf->dbg_ctx), "Collecting GRC dump.\n"); + qedf_capture_grc_dump(qedf); +} + /* * Module Init/Remove */