Message ID | 20180705140133.22071-1-chad.dupuis@cavium.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show
Return-Path: <linux-scsi-owner@kernel.org> 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 B76E2603D7 for <patchwork-linux-scsi@patchwork.kernel.org>; Thu, 5 Jul 2018 14:01:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A611029094 for <patchwork-linux-scsi@patchwork.kernel.org>; Thu, 5 Jul 2018 14:01:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9A452290FC; Thu, 5 Jul 2018 14:01:39 +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 E4D5A29094 for <patchwork-linux-scsi@patchwork.kernel.org>; Thu, 5 Jul 2018 14:01:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753449AbeGEOBi (ORCPT <rfc822;patchwork-linux-scsi@patchwork.kernel.org>); Thu, 5 Jul 2018 10:01:38 -0400 Received: from mail-bl2nam02on0081.outbound.protection.outlook.com ([104.47.38.81]:55616 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753577AbeGEOBh (ORCPT <rfc822;linux-scsi@vger.kernel.org>); Thu, 5 Jul 2018 10:01:37 -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:X-MS-Exchange-SenderADCheck; bh=gfMjcVF17yKC0NaxyqyCmO+ztKWTM6N/da0EP1x925c=; b=MY7G3PAHqI7SpY04FFk2uOov7d8IP4qx99oF/3RfchtP4HKyaIRbA8MVVf93hdzQ/6Uu7bxfYf3UqEVH1Sdrnr+OkoDZGm8gN+xWfFDA+u+jAIwB9moIHTTeRYQdqRzowX/RqNJrWogShrI1vvbfyOFsgm4jamMZKGGLSI9rGXY= Received: from BYAPR07CA0054.namprd07.prod.outlook.com (2603:10b6:a03:60::31) by MW2PR07MB4073.namprd07.prod.outlook.com (2603:10b6:907:6::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.930.19; Thu, 5 Jul 2018 14:01:34 +0000 Received: from CO1NAM05FT023.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e50::204) by BYAPR07CA0054.outlook.office365.com (2603:10b6:a03:60::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.930.20 via Frontend Transport; Thu, 5 Jul 2018 14:01:34 +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 CO1NAM05FT023.mail.protection.outlook.com (10.152.96.131) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.20.930.2 via Frontend Transport; Thu, 5 Jul 2018 14:01:34 +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; Thu, 5 Jul 2018 07:01:33 -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 w65E1XDW022106; Thu, 5 Jul 2018 07:01:33 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id w65E1Xtu022105; Thu, 5 Jul 2018 07:01:33 -0700 From: Chad Dupuis <chad.dupuis@cavium.com> To: <martin.petersen@oracle.com> CC: <linux-scsi@vger.kernel.org>, <james.bottomley@hansenpartnership.com>, <QLogic-Storage-Upstream@cavium.com> Subject: [PATCH] qedf: Send the driver state to MFW. Date: Thu, 5 Jul 2018 07:01:33 -0700 Message-ID: <20180705140133.22071-1-chad.dupuis@cavium.com> X-Mailer: git-send-email 2.12.0 MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:50.232.66.26; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(376002)(346002)(39860400002)(136003)(396003)(2980300002)(438002)(189003)(199004)(42186006)(87636003)(126002)(44832011)(486006)(478600001)(80596001)(356003)(305945005)(476003)(16586007)(316002)(47776003)(69596002)(54906003)(51416003)(1076002)(106002)(2616005)(186003)(26005)(72206003)(336012)(1857600001)(4326008)(5660300001)(107886003)(86362001)(2351001)(2906002)(575784001)(6916009)(50226002)(8676002)(81156014)(50466002)(106466001)(48376002)(81166006)(14444005)(8936002)(36756003); DIR:OUT; SFP:1101; SCL:1; SRVR:MW2PR07MB4073; 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; CO1NAM05FT023; 1:vEcKYtfi3tHmmNc6/tSayP/3Og54eaJUhDscVUY63a77jqBjt/Ks8LLHQNiF/6Ee5neJICZHEnWxhP9aGJpPWrx72eglkt6NzL3Te1fqtIo7RzODvinIND78gYF1PIwM X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2d82ee7f-9fc6-42db-c4c4-08d5e27fd17b X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600053)(711020)(4608076)(2017052603328)(7153060); SRVR:MW2PR07MB4073; X-Microsoft-Exchange-Diagnostics: 1; MW2PR07MB4073; 3:B/92EfCN80YnSUjxGKHagGEwJmqjuEcPAM7DLdlzbf/RnJDs2/SEntfa2sttgCs3YniMSb4MQMW7nh79pbXwbQFwGFGw0G0LGk0NeZNpDHzxNyrmD1Kx3T7OIGaExt3xn8gaSclb/4Yr8sRzQmneT3DB4oOalsR7lrKqODleACRUd91bmpey1fDnMnDVrmsEpaxKEPftmxVKNYD5iWYe+FnkohOtkkWeHW26dNBtWgiwgoSlNb0Y0pQ/f4EMxNU9GQukNab6ov8lO2MYaxDFOjnIKaB91S3VPx8pcV4Tvp5aTT//blFzXRIMI7QA0wjpwWhTPTueClgo+kaQYfjdhx8062ljrHcE19M2VfkCgfU=; 25:WBsbQ+KOdjrojFji/ZNBR0h0LdxfErWrvn+TLRRAVWuTVOtlSponyiMKziq5wQggaDukvDF6QCL7m1SZe2M7X+xVge1usYDdVq85T3K6nr8ZRB4n9+HjmEJmmyIlQn0z7OxU/Sh9IKnhTizRJz+h3m9MG4/4v8d7poCcLx7BzaXujvO+RO491JALL8hWr84p3mrjt4xqEvHERWI+KNGpzKs1qDqp9iBkJFmE/mLhS+qzVHi0HaC7Nj3HUtsa0a0pc49jmhjxM52mXoxrxKZe7YyFVEI2BzTQUcTzOj2uG0WI5MsiRcLbcop82Pk5SIsq6QlA2FBSIRgwaWNrg/YwsA== X-MS-TrafficTypeDiagnostic: MW2PR07MB4073: X-Microsoft-Exchange-Diagnostics: 1; MW2PR07MB4073; 31:V3ZSLhd7lAcE948HNNDOEQx2EAwvUlYQb2qutXOdnCJHANE6URnTFYy1S5XRzcv4Ogxah0zFQ+NQ249rb5/CwGM4dVIQVNOVLON1hKnkyuUPJch1KOn5cZP1tPKwloXQWC4xmZAdiaKIrJRe+M+rb9OXUqFI2/DqntE0+9pRBzPf9lj9ywBaSIlHWTt+mLYuPjkkAIhnkG1drbQgz7blO8SgXq720In6J9gzcuUcsd4=; 20:xMsHEAMZWg3K8Rtk9VmXQl3C7PMt3X72/ujSPvbJJwFlwmmav4vDrQ1kcbSLMfRMapekQmPtQ3LVA/EsvjssDkuGp5vZnGnhut+wu+FiF4vcVaCb1n6LU+/XwetXw7WxtLb5QWuZvXBgdhMIuP/IYxc4tS2zrbsyFkGsiHInW6qg7R5yjOAIM2OuoqpfdpnC9KvZmN7OYYxCvNSrVPDUQXV2pZ+ZNh4PdGtiq232/07L+X5JZT5WnZ8gu68f70bK/BSLJFvXp8osE3YDSQnqLA0iG6DnmlvUvVGJAbck4s7XsJgW06R1gnLoLqov11xapLLjnMDDSSWkl6HlpzlBXO4RiZFGPiZ9j2CiM4/q6DvDkhVto5+d2aBxLFcd6PjpNEWxnopwO+mqOOKVuivLAbMQ3dDSGD/8KI8GRWowTLUl253L6Xfoz8n7aVqRbqhpP5Bl7HFnSbBo2Xl9qzYU9sP+HJqn6VO91Kaq5Ri3u5GV1vR+4aUJktTOqEjDdGuO X-Microsoft-Antispam-PRVS: <MW2PR07MB4073A534B641F220541D100B9E400@MW2PR07MB4073.namprd07.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(93006095)(93004095)(3002001)(3231254)(944501410)(52105095)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:MW2PR07MB4073; BCL:0; PCL:0; RULEID:; SRVR:MW2PR07MB4073; X-Microsoft-Exchange-Diagnostics: 1; MW2PR07MB4073; 4:wx3t0bNAa4sXEpQ0a5UWcfrKo9wADkfIgxNml3YLecV9AfUASCDt04XyBJHTNC0OGq+CEb0208uFKtxZK0a7xy04cdzIclPVQvhAbTKJF5EvtktMtYjFt9V00A4st9hXrusvlh+QJVd+QQFxus4GJmibRgUmkljsXeCvggT6xc/JvFyDqFFPaXhD7wp96EYyceg/2OpET836vCxMkatQeiO+DQ/7OoNSP3dkz5a0jqrInzkKvxcMFv6KQv6/7jgNkZ/UulZ5/HrTz6orBb6VGg== X-Forefront-PRVS: 0724FCD4CD X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MW2PR07MB4073; 23:OUXagNH+gs1PXD/SWTNbeZIra4jS3GwVTpZKkKZeg?= =?us-ascii?Q?pLBoBc+5M1x0OusHANbY9JJA/sOQCFZ3YBVqKqfuYBlmaYR8+4AvlIJgULuh?= =?us-ascii?Q?5dPAlVUb3l3i8ZdpMlP8L2dLmQ8Co61HDF+ZqZC1rAjlm9z/aretXfGCj8Ae?= =?us-ascii?Q?zyCUIQkOV+P7aazTOYNBXS+sDNkUzlAyTukdoIjx5UqWCDS2HRi9K6XkoHql?= =?us-ascii?Q?fZtnwWJBh6t+uWIKM95p52lenjo9SNUyHBMJ5RVAUcbrgttVoo+jVNVFunGD?= =?us-ascii?Q?kcVZIjpRVC48A7BgAfzdrxhCCyoydy+ztx9E1Z2VQnP2a3LHsKtwalGzoH1p?= =?us-ascii?Q?AfbrBjb4o7bNJ1NptaWF3A6KjgbKLhlvRhTZYCXmnLi/JwvJMNRDKlra/cox?= =?us-ascii?Q?OorsYccApO4v/WjkOw83RtroYgAdYXNtBaPVjv7xXzUonmXk1Kbgyq82Oaaf?= =?us-ascii?Q?E2ts3Vbawz5naXia8jzcXe5UNbhxceqvsOsY4WHgI0bCEsBhWbti1kHvlP9p?= =?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QiZ63dDgFLBkumpLxkWPTOgcp++dw+ZjJrknTb14uZYhGm/13TNnL3s4cjQv/Drhch/3+2s7CilNQbeERVaqiUFsb5nxI9d5CJSPQF1RucqjwGkBA6hGt0q+gFXh5HqVyoM0xkyffTa8wtONW72SUEIhwEF0P X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2018 14:01:34.3566 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2d82ee7f-9fc6-42db-c4c4-08d5e27fd17b 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: MW2PR07MB4073 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: <linux-scsi.vger.kernel.org> X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
Chad,
> Need to notify firmware when driver is loaded and unloaded.
Applied to 4.18/scsi-fixes, thanks!
diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c index 90394cef0f41..0a5dd5595dd3 100644 --- a/drivers/scsi/qedf/qedf_main.c +++ b/drivers/scsi/qedf/qedf_main.c @@ -3295,6 +3295,11 @@ static int __qedf_probe(struct pci_dev *pdev, int mode) init_completion(&qedf->flogi_compl); + status = qed_ops->common->update_drv_state(qedf->cdev, true); + if (status) + QEDF_ERR(&(qedf->dbg_ctx), + "Failed to send drv state to MFW.\n"); + memset(&link_params, 0, sizeof(struct qed_link_params)); link_params.link_up = true; status = qed_ops->common->set_link(qedf->cdev, &link_params); @@ -3343,6 +3348,7 @@ static int qedf_probe(struct pci_dev *pdev, const struct pci_device_id *id) static void __qedf_remove(struct pci_dev *pdev, int mode) { struct qedf_ctx *qedf; + int rc; if (!pdev) { QEDF_ERR(NULL, "pdev is NULL.\n"); @@ -3437,6 +3443,12 @@ static void __qedf_remove(struct pci_dev *pdev, int mode) qed_ops->common->set_power_state(qedf->cdev, PCI_D0); pci_set_drvdata(pdev, NULL); } + + rc = qed_ops->common->update_drv_state(qedf->cdev, false); + if (rc) + QEDF_ERR(&(qedf->dbg_ctx), + "Failed to send drv state to MFW.\n"); + qed_ops->common->slowpath_stop(qedf->cdev); qed_ops->common->remove(qedf->cdev);