From patchwork Wed Mar 14 12:56:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kalderon, Michal" X-Patchwork-Id: 10282087 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 56CBF601E9 for ; Wed, 14 Mar 2018 12:57:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 46E8728678 for ; Wed, 14 Mar 2018 12:57:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3B452288D2; Wed, 14 Mar 2018 12:57:21 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 ACA7028678 for ; Wed, 14 Mar 2018 12:57:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751426AbeCNM5S (ORCPT ); Wed, 14 Mar 2018 08:57:18 -0400 Received: from mail-sn1nam02on0056.outbound.protection.outlook.com ([104.47.36.56]:6400 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750908AbeCNM5R (ORCPT ); Wed, 14 Mar 2018 08:57:17 -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=yeIuaIw1Nqw+YSwy3Lg9Y/e3NnwrdGS6OCwNlewbA8Y=; b=d06IsIfZuE0StjyHz+DSCz53K9ZKnGsXKubxmQ0OW1CyZMjANtnRyLR0RibDJPRFPEKCbMcTH5J0NZQah8/+VcWy+hQTPOFI8jnfSna7FhHDUUH3fyelqg+NKFIb1qQgwe29NmvLKCy5MUquhxtm9N5TT5wi8dyuxJv+fL9GUk8= Received: from SN4PR0701CA0002.namprd07.prod.outlook.com (10.161.192.140) by BY2PR0701MB2088.namprd07.prod.outlook.com (10.163.156.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.567.14; Wed, 14 Mar 2018 12:57:15 +0000 Received: from BY2FFO11OLC015.protection.gbl (2a01:111:f400:7c0c::192) by SN4PR0701CA0002.outlook.office365.com (2603:10b6:803:28::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.588.14 via Frontend Transport; Wed, 14 Mar 2018 12:57:14 +0000 Authentication-Results: spf=fail (sender IP is 50.232.66.26) smtp.mailfrom=cavium.com; vger.kernel.org; dkim=none (message not signed) header.d=none; vger.kernel.org; dmarc=none action=none header.from=cavium.com; Received-SPF: Fail (protection.outlook.com: domain of cavium.com does not designate 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 BY2FFO11OLC015.mail.protection.outlook.com (10.1.15.59) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.20.527.18 via Frontend Transport; Wed, 14 Mar 2018 12:57:14 +0000 Received: from lb-tlvb-michal.il.qlogic.com.com (10.185.6.89) by CAEXCH02.caveonetworks.com (10.17.4.29) with Microsoft SMTP Server id 14.2.347.0; Wed, 14 Mar 2018 05:57:13 -0700 From: Michal Kalderon To: , CC: , , Michal Kalderon , Ariel Elior Subject: [PATCH net] qede: Fix qedr link update Date: Wed, 14 Mar 2018 14:56:53 +0200 Message-ID: <1521032213-19425-1-git-send-email-Michal.Kalderon@cavium.com> X-Mailer: git-send-email 1.9.3 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)(39380400002)(346002)(396003)(2980300002)(1109001)(1110001)(339900001)(199004)(189003)(105606002)(36756003)(5660300001)(26005)(54906003)(305945005)(59450400001)(110136005)(77096007)(72206003)(4326008)(48376002)(6666003)(356003)(106466001)(81166006)(81156014)(8676002)(86362001)(16586007)(50466002)(2906002)(478600001)(15650500001)(316002)(186003)(85426001)(104016004)(50226002)(8936002)(336012)(51416003)(47776003)(107886003)(69596002); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR0701MB2088; H:CAEXCH02.caveonetworks.com; FPR:; SPF:Fail; PTR:50-232-66-26-static.hfc.comcastbusiness.net; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11OLC015; 1:kIaBGHUPX07RX1+WPiNMB2SgbuKfKSvoVym9z++EvT+i5E1uNTmwSBYtXavqjPTMMcjKoPY1D+guzkmgFrhKc3YnoRUL56+XLP/jK0PH1UVxBeEoxJKG8z60H5iAaEez X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fb42cd65-1e05-498e-fadd-08d589ab1c41 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060); SRVR:BY2PR0701MB2088; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0701MB2088; 3:GC0gPFetq3jB/VLW71kwAn/zgbyUNeiK6idg9E7yeGZX83cNq3yfS9iuQ/5QQnFj//Al5lrpje7157keuz0eDVgOaAnQ0xtn3i3I/UgWFnKPmPyt3dE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lou436xxXSc5Si4G0U4xy94NiFuTRkIwK4kVYaJI/bkb9a/Wna3E4pD9t/+RYD1F8Hbz25tiquw2WXDWi80pEbXkxaHYZqOLN8Gska8zfPrQrZgNGOg/c13yxgD3mh6MAtuex67Su1OJXGkXJ8bsXpGUqynyaXs+Ggn+CMc03d2yGpScuInJLkAqhMJAgSLQRRaJqEpEJLf+n8Kv7WqZoTH+GDqg7a7sH3PtfGPAM/8qtBSSwn8SikKdghxmE/W6HgWK6Lr5QkO5GriwA+TjKehfED0c5oH9DTb9WgBtniES+STcLPKFZj7uKi/Awdgc75AXVdUEA2bOEvEQtSgBJZPVg0uFJj1snTQuR3 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)(3002001)(3231221)(944501244)(52105095)(93006095)(93001095)(10201501046)(6041310)(20161123562045)(20161123560045)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:BY2PR0701MB2088; BCL:0; PCL:0; RULEID:; SRVR:BY2PR0701MB2088; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0701MB2088; 4:ESJanh2A04DMV4w/c+uSyuayQIRzv5lehI3MpZvxplluS4ePgCZyv0pLt0kqq6R9O+Acou3anLZRnzXdaJUlqM21v46Q9iv8xXiuDFcV7oLc9DpXMK9RDSKyhcof3OwYsAWACWIB3nY+n4cmBYUH3XkZkgNU9IyMw3sFb5iBKWGa2UsLteXCw6kQSdjltWPzX2Bfqk+YAE4Mrnoonv2pKMKhqUicYZNbLpQ4LbnPFx8Px66dpCwGg29G3L722tOSYkRlQaXHDj0XqJy28Fm7ow== X-Forefront-PRVS: 0611A21987 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR0701MB2088; 23:SzEuG9tp+s6HNxAcEqTf6i7m9B+LwRw3OCc2/9b?=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SZpdw1Pehap/0SQ5T9tD22yqSUFPrMsKsx1WVgs=; 7:X08wgqCJMwnxpH8cnMG3Dkzx5rtEv3b5BLbRYNL+qntuWMOPZYE5rjD2+S4fcJlbMKfQjK2T4z/iR4c1TVj9UOGo9OGEApY9h9KPGnEgL98nH7m842/ilycIakoID7pbIhU3p5gpa5QHy4gEcwsYvxcRvXexFKpZ+frD9iGbuEip77+D0/1o3HKB09E3SY9tCKS1qqY8GTsMm+ZArW2A1CA1886spuyqLHQeAOWtkcT1vcoDh65o1H7D4HfjbQgi SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Mar 2018 12:57:14.7264 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fb42cd65-1e05-498e-fadd-08d589ab1c41 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: BY2PR0701MB2088 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Link updates were not reported to qedr correctly. Leading to cases where a link could be down, but qedr would see it as up. In addition, once qede was loaded, link state would be up, regardless of the actual link state. Signed-off-by: Michal Kalderon Signed-off-by: Ariel Elior --- drivers/net/ethernet/qlogic/qede/qede_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qede/qede_main.c b/drivers/net/ethernet/qlogic/qede/qede_main.c index 2db70ea..5c28209 100644 --- a/drivers/net/ethernet/qlogic/qede/qede_main.c +++ b/drivers/net/ethernet/qlogic/qede/qede_main.c @@ -2067,8 +2067,6 @@ static int qede_load(struct qede_dev *edev, enum qede_load_mode mode, link_params.link_up = true; edev->ops->common->set_link(edev->cdev, &link_params); - qede_rdma_dev_event_open(edev); - edev->state = QEDE_STATE_OPEN; DP_INFO(edev, "Ending successfully qede load\n"); @@ -2169,12 +2167,14 @@ static void qede_link_update(void *dev, struct qed_link_output *link) DP_NOTICE(edev, "Link is up\n"); netif_tx_start_all_queues(edev->ndev); netif_carrier_on(edev->ndev); + qede_rdma_dev_event_open(edev); } } else { if (netif_carrier_ok(edev->ndev)) { DP_NOTICE(edev, "Link is down\n"); netif_tx_disable(edev->ndev); netif_carrier_off(edev->ndev); + qede_rdma_dev_event_close(edev); } } }