From patchwork Wed Apr 25 13:08:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dupuis, Chad" X-Patchwork-Id: 10363163 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 446EB601D3 for ; Wed, 25 Apr 2018 13:09:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 34A6928DF6 for ; Wed, 25 Apr 2018 13:09:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 297EC28E00; Wed, 25 Apr 2018 13:09: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=-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 54A6728DF6 for ; Wed, 25 Apr 2018 13:09:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753939AbeDYNJ2 (ORCPT ); Wed, 25 Apr 2018 09:09:28 -0400 Received: from mail-cys01nam02on0065.outbound.protection.outlook.com ([104.47.37.65]:58977 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753942AbeDYNJW (ORCPT ); Wed, 25 Apr 2018 09:09:22 -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=lOH4O6BtVZjN5e9B80iId1ZpSWeLm+Ay7gEhqU8xZPY=; b=CrcbvmgyluCQNU+Novpgaeb5XDSOXNhzOoKWd9jF/6iVW1VbNsLfGl2s0gROe7CBYohNEPEnFi8n0zTRa/SztW473m+5e9rtQHzY5pAQ/ai7fzeuLarePmPWedDFQKW/e1UOcRAOXu4/oEdAWv/3zDy//DLuo4ste9cDpa+m9SM= Received: from SN4PR0701CA0011.namprd07.prod.outlook.com (2603:10b6:803:28::21) by SN1PR07MB1520.namprd07.prod.outlook.com (2a01:111:e400:5837::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.696.15; Wed, 25 Apr 2018 13:09:20 +0000 Received: from BN1AFFO11FD006.protection.gbl (2a01:111:f400:7c10::173) by SN4PR0701CA0011.outlook.office365.com (2603:10b6:803:28::21) 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:20 +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:19 +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:21 -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 w3PD97QR006448; Wed, 25 Apr 2018 06:09:07 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id w3PD97XS006447; Wed, 25 Apr 2018 06:09:07 -0700 From: Chad Dupuis To: CC: , , Subject: [PATCH 07/21] qedf: Add dcbx_not_wait module parameter so we won't wait for DCBX convergence to start discovery. Date: Wed, 25 Apr 2018 06:08:51 -0700 Message-ID: <20180425130905.6385-8-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)(39380400002)(39860400002)(346002)(376002)(396003)(2980300002)(438002)(189003)(199004)(26005)(51416003)(69596002)(44832011)(8676002)(11346002)(5660300001)(6916009)(126002)(2616005)(476003)(446003)(59450400001)(48376002)(50466002)(81156014)(81166006)(2906002)(356003)(4326008)(486006)(8936002)(305945005)(336012)(76176011)(50226002)(80596001)(16586007)(1076002)(47776003)(478600001)(87636003)(2351001)(54906003)(36756003)(107886003)(106002)(316002)(106466001)(186003)(72206003)(6666003)(42186006)(86362001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR07MB1520; 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:IZ32g1VichJsrSjCJBFIOmmlH3cWLqf7cuwZXP+mJlYGCZAIASd3CFibEKDLfDgtLZNp6KZxYaxm1wCzNRkxXkO3thoKWx8sidulliHd8OXYuJ1JwUnahDR6oow1BRkx X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4608076)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060); SRVR:SN1PR07MB1520; X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB1520; 3:+K1EJwCsx4G9HRcJ9Djv2Eex86Ef7S7gZ9AH7+3DE0uB4MFkzwHrRZuvvQjauaGRTf+2CiSMvoUkR4Nq81VN8Q7l8QlpxNoBC2Z5tMwLAezeG9gtXyKDct3P772UMRo9qWAya0gmvfMhPi7Uv4iR88FgIMmh97SB8D3gCKORg+lOHTMeZcsCEyX7o1qIDlVpP3Q1zkN0dBmRIjoF6OcHES3y5uCBUiv39COR+PoYHlCmg1qFxQ+72yttGrbiy1tjEs+Ap+vhMXLpJEas24GhZ06DRbuS+3N06C0IS/wsjGHXiI45usV7lcclBXewsjOKuNCHkpxAStlV4Ws7jV9wVNms7w49e84kE00pEIPandc=; 25:XMghOhcmNMP/0/Gg1si4U/6gkRSRr8x49eO1aPddvBRfbtl9P9Edln6FQvjI4lgnrKmBeSZ5lyGkvyy++oicq0Yriz7QEexhvyudYw3KcbOGmLXmwR3kWoq9copYkgLR1L4dFc2ubWmswN3F4Z4uqqWe0G3dNLv0bXHy0SOYqQeVujHzBD0P/P4UPJj7clkkZa8teq9AjIhLHF2GAGdPjgvhuqjBJwP19C7RQ81cxa2flt4+5UVWQ0o3pat22Vftwr0ii7v0EV4qXL/RE2KHlYN49V8xV6mke1dqMPsUxVauQadAm3xUefr2e35fVxGj/Cq9Oh2K6gkWuljNHFOQpg== X-MS-TrafficTypeDiagnostic: SN1PR07MB1520: X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB1520; 31:sbDPQACZsPSOY8/L+tkJ8R0ucizvKsfVlPUICkRdTYvFOrRiZ6ObpbW3tRtCwFkltQf/dwrk96o4A0yNeOW8X7bY4XGG1luxzu2mNNwnUWoJM1D+AvGtvHKApG0Lwolh20xZ9/JaYcdmvP0dAZbalZ5858uftToPHcMUYWjfgvfLzTv2sA/ZBEhZiqcWh8Yc2bXjMCWErgNPfvxNmBXvDymvsdbBmDPKnANGcpS186s=; 20:2i/TQrmEilqAiMXk+dIfAJcy9vcg+xt5JeHEnvQ2q02/J4XWzRW4Tqqb1NhgU23FyytsaLc5YDBCuYi6OnIxSMdK+MdivJq7NxBmnhNQ7z6bNJWP9KIx5nERMC2zZ5Xai7aXQhEQJGW/2OxdVeCyz1IsDB7fnC+HWDe+9C/NpU/npTqDPAtzdGmCyYa1A7FKeOEdykw/EkG6LdxwSHIbSSr1yjCenZnp96babf+k5ss9IdBKKdN+lB8GrUamVxrwSpplKpKpfO+q3MoWSUVgqabZNP9fSHYLKHQXY4PiuShDpKZx4CMbVahK0SSCupGwZNzzn9iiDIQaMO7z+ZeYjXinlSNAqbPbpc4LxqN6+NSiQ/ajbQIkT8i43Junan7C+34+0l8NZvlRlBTdGZcRuJJzF91drHoF4NeRHsfOKAkbHuDRmM8m1kT8qA8cEw/Jw62L9B4hLIOz1e2uUtJNIXV5w31ue9kv/vjCnnuHwTlBp2992XORQNlpZb3FlBDd 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)(93006095)(93004095)(3231232)(944501410)(52105095)(10201501046)(3002001)(6041310)(20161123562045)(20161123558120)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:SN1PR07MB1520; BCL:0; PCL:0; RULEID:; SRVR:SN1PR07MB1520; X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB1520; 4:Zc56isVRcJcDuruo7R8JYeOWBSvCPB8Cm265NKQGQFZ9/gZVvlWbPm+tZqSX+QZM2+mmtweovzZ2Upi7x2s0qcK8FI374/XUI3diItGGFfO/niTUU5PlM+ztRI+Otuy3NcI6q+XzhcI8MWwS5eQKOy3FN0yVT1wOazRdWHh9MKHLVS5XR9FJtRAoTCUEO4MzBrPtJ8qE1aj8gDCrLuCuXz2UIEypsG/hrjwOYWoVuloNAI8kQmh2q8TPVEQK/o85Aj+4ZA1OrTAP5TsWsweGew== X-Forefront-PRVS: 06530126A4 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR07MB1520; 23:rPwrXeKYDBh/RhPP5YedyBiTvnQNqAxYPatVSHEdT?= =?us-ascii?Q?/tGObjxFGxZQDIuP5vZAhFB2UW+RHMKGvjo52LvwyOGwwb9IM1WnMvzNDhnh?= =?us-ascii?Q?hiw3d0utoATWAY22QbMZu6I3dPpW2gmzB8kqmn3ef1XbZ72AR5E6RVDOKmmm?= =?us-ascii?Q?3Av6JxNvUWsfNUMfIrcxH78eYMUj8orL9Kyl5UbBym9thcTJZB+GmVYfLc8H?= =?us-ascii?Q?dpoGXVqwt9t/c9c0zEG8XJErG/czcN6WpgHbx1AKk188foiS0TenZ7UiAGpm?= =?us-ascii?Q?MkCLLk1ZdISJfzrOnMXWomYH7bzsBjfS1C5B+g/tzxXGSNj5O4/DT3rMKPoq?= =?us-ascii?Q?q9zZUViJ8/6+ZCgUv/c2rMe/qLOYCZtss8UJJV1paTdEYYpIU9QDvqf7oKLM?= =?us-ascii?Q?oaL/Kcf/zcXyC/3LgPdiyroe7z2LwYcm9Bk15wy54yLcosxE+ncadsSlg65i?= =?us-ascii?Q?wLfw8ZDziRszBRnTFf5hL52fU3y43h7ZG0QPP+U089g9mDeZhk7Mqups3LXZ?= =?us-ascii?Q?Kk+ivbKkmHd7iJbiDYmomGP5tBgzONknzJ6D5+AUTsD05tMUZ+QgyAaDpzWy?= =?us-ascii?Q?rdFzy4sHWs3DqMjd+IDw+xHWsTsExTGyH+XwLbAtP+0F19jBGJ+VPYr9ikQG?= =?us-ascii?Q?pW9aylSqx630ov1eJsdQfDZ9An3CVtxw+UJylZnsIUl8wu09ghlltScwGbxF?= =?us-ascii?Q?Ql7k0Nl4qWG4oXK4w1JF1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I977K0cqrJwiiL399ukXk2HIT7G5Kef8TYeyuFcNSLiYP9old08oVEhttHO0pxFvQCq9ADEihHCB0Av+0LqvVq1ZBJ78FA4kd8426F4z62C2CenCVBeFLRaLNW/CFmc4iUDOfXJDQUHV9yVI5JNHcmhD06iLFM31/sYhMqaalRM2m7MW+YKpb46W2xsLak6nYJtVekVBc6eBACuFgVaWVdjoo1YO5Sn1aq+d770xGOHHfY5umtQ==; 5:EyXAN3qLyJJBkaceusF/6+t29y2yUNwfv8pv7AfKBk1p3xJ2ncEDGEqfgD9V2d+lJeIwNy/MO/Nb6BJCQSxPUBGCcfRvfzhn7BB/U556vAfdqLZb6Ij3DwRM2bDQeIrHJsHYVJiqtrqcm5p4mH9+rZHEInR/2ChYv9sSFEf0VgI=; 24:wdc2TbQl+BVgEAsb31XodPNBwtNQLOg+hf5VthYIed/+jIzz6fL5/P6qudR8O2PwImT2dkXRcWTkz3vwvJ6eLNakQan4uwRtTlFwmbUGPZ8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB1520; 7:k5nf2xFZs+tD4G62mvPcglFb4ljlGuuIkX94EI4oKQc/5rawVCVRPHrCGzn/vkcRu+6/4Bt+Fi3Gsgh/kU6i21DBWnwa8JxaN84lTkr5PvOAxtoVyw7q+duEpIZNyCE+V2I5Wx8ta4MI4+H+mdJGRn+HxwZouWtMw1lTCUEDFI42QA6BKUFGtgO+rWlJ10j/9tKkwdRd/SrpexuzMP30qQvq56r6KgyHN8jSRyn4YhWidZUUPFhoU/bn9OfR0ruz X-MS-Office365-Filtering-Correlation-Id: 48791b0f-afc0-4e61-d5ed-08d5aaadc1f4 X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Apr 2018 13:09:19.9473 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 48791b0f-afc0-4e61-d5ed-08d5aaadc1f4 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: SN1PR07MB1520 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 This module parameter is to work around cases where we do not receive the DCBX handler notification from qed but discovery is still possible if we send out a FIP VLAN request irregardless of the DCBX state. Signed-off-by: Chad Dupuis --- drivers/scsi/qedf/qedf_main.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c index 1a58f4a9cdf9..8df151ec143d 100644 --- a/drivers/scsi/qedf/qedf_main.c +++ b/drivers/scsi/qedf/qedf_main.c @@ -89,6 +89,11 @@ module_param_named(retry_delay, qedf_retry_delay, bool, S_IRUGO | S_IWUSR); MODULE_PARM_DESC(retry_delay, " Enable/disable handling of FCP_RSP IU retry " "delay handling (default off)."); +bool qedf_dcbx_no_wait; +module_param_named(dcbx_no_wait, qedf_dcbx_no_wait, bool, S_IRUGO | S_IWUSR); +MODULE_PARM_DESC(dcbx_no_wait, " Do not wait for DCBX convergence to start " + "sending FIP VLAN requests on link up (Default: off)."); + static uint qedf_dp_module; module_param_named(dp_module, qedf_dp_module, uint, S_IRUGO); MODULE_PARM_DESC(dp_module, " bit flags control for verbose printk passed " @@ -489,7 +494,8 @@ static void qedf_link_update(void *dev, struct qed_link_output *link) atomic_set(&qedf->link_state, QEDF_LINK_UP); qedf_update_link_speed(qedf, link); - if (atomic_read(&qedf->dcbx) == QEDF_DCBX_DONE) { + if (atomic_read(&qedf->dcbx) == QEDF_DCBX_DONE || + qedf_dcbx_no_wait) { QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_DISC, "DCBx done.\n"); if (atomic_read(&qedf->link_down_tmo_valid) > 0) @@ -541,7 +547,8 @@ static void qedf_dcbx_handler(void *dev, struct qed_dcbx_get *get, u32 mib_type) atomic_set(&qedf->dcbx, QEDF_DCBX_DONE); - if (atomic_read(&qedf->link_state) == QEDF_LINK_UP) { + if (atomic_read(&qedf->link_state) == QEDF_LINK_UP && + !qedf_dcbx_no_wait) { if (atomic_read(&qedf->link_down_tmo_valid) > 0) queue_delayed_work(qedf->link_update_wq, &qedf->link_recovery, 0);