From patchwork Thu Jan 16 04:10:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weihang Li X-Patchwork-Id: 11336007 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C08541820 for ; Thu, 16 Jan 2020 04:14:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9F8202077B for ; Thu, 16 Jan 2020 04:14:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730782AbgAPEOr (ORCPT ); Wed, 15 Jan 2020 23:14:47 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:8733 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729551AbgAPEOq (ORCPT ); Wed, 15 Jan 2020 23:14:46 -0500 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 9B4787985251908BAAE2; Thu, 16 Jan 2020 12:14:44 +0800 (CST) Received: from localhost.localdomain (10.67.165.24) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.439.0; Thu, 16 Jan 2020 12:14:34 +0800 From: Weihang Li To: , CC: , , , , , , Subject: [PATCH RFC for-next 4/6] RDMA/qedr: remove deliver net device event Date: Thu, 16 Jan 2020 12:10:45 +0800 Message-ID: <1579147847-12158-5-git-send-email-liweihang@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1579147847-12158-1-git-send-email-liweihang@huawei.com> References: <1579147847-12158-1-git-send-email-liweihang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.67.165.24] X-CFilter-Loop: Reflected Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org From: Lang Cheng The code that handles the link event of the net device has been moved into the core, and the related processing should been removed from the provider's driver. Signed-off-by: Lang Cheng Signed-off-by: Weihang Li --- drivers/infiniband/hw/qedr/main.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/drivers/infiniband/hw/qedr/main.c b/drivers/infiniband/hw/qedr/main.c index dcdc85a..d85894b 100644 --- a/drivers/infiniband/hw/qedr/main.c +++ b/drivers/infiniband/hw/qedr/main.c @@ -957,24 +957,11 @@ static void qedr_remove(struct qedr_dev *dev) ib_dealloc_device(&dev->ibdev); } -static void qedr_close(struct qedr_dev *dev) -{ - if (test_and_clear_bit(QEDR_ENET_STATE_BIT, &dev->enet_state)) - qedr_ib_dispatch_event(dev, QEDR_PORT, IB_EVENT_PORT_ERR); -} - static void qedr_shutdown(struct qedr_dev *dev) { - qedr_close(dev); qedr_remove(dev); } -static void qedr_open(struct qedr_dev *dev) -{ - if (!test_and_set_bit(QEDR_ENET_STATE_BIT, &dev->enet_state)) - qedr_ib_dispatch_event(dev, QEDR_PORT, IB_EVENT_PORT_ACTIVE); -} - static void qedr_mac_address_change(struct qedr_dev *dev) { union ib_gid *sgid = &dev->sgid_tbl[0]; @@ -1014,12 +1001,6 @@ static void qedr_mac_address_change(struct qedr_dev *dev) static void qedr_notify(struct qedr_dev *dev, enum qede_rdma_event event) { switch (event) { - case QEDE_UP: - qedr_open(dev); - break; - case QEDE_DOWN: - qedr_close(dev); - break; case QEDE_CLOSE: qedr_shutdown(dev); break;