Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2476732imm; Mon, 16 Jul 2018 08:39:00 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfoh8Fd6MH/cwEMLC7QhPdrLe78kCzrVdkhh7h4shK9xfuXdvGguPIIReIjRTmgOzIsHSG8 X-Received: by 2002:a63:686:: with SMTP id 128-v6mr15755310pgg.338.1531755540774; Mon, 16 Jul 2018 08:39:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531755540; cv=none; d=google.com; s=arc-20160816; b=RjH7cC6+TKg6C3tkEdUUX2AWhi4bVyKJ6ozxoyhExJTJI9gMM0mzbGeL36EG275xU+ A+U47c20yyNCGyikmdH0Tchqz7tE3sozBVejyfzYN8XeD7/yd06MpENVAPWTpXMv6O60 D0AXhEyPKpVWdLA55abma7oi5oO04MQeLWOTolJPEkuYmAuQB27eu/LG78/byJDiezVp meKaDkYfVGsi3tn6Ztg/EIHpWqIr9JmlEVa5JaK2r52PxABodIecb8z5wAmdxO/hqYP3 sPQ2ICL18rfNKOp/ja5b6wkhMq9IykwGJP3SoYlaF/Q784198TIO+q2hXHWTZcbzag9E FomA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=XWmNRu2KkHOqCtXc7R0HoegS8s41d+2hJa4qb2Jkcok=; b=de9E1J7/kcGkvo/hQqYZQj0aHct7RnTm+HyeO1VCuI+Dw7e2K8mux0V2u79eSY8YMt A2LNYe1xBAmI4h8AxUe7GgQSjh+Rbm2QpgFvNqLXExe5kzlDDEB4YlgGJK0GQfMWw4cI U5dhnVIyMiKbpOdkQV1h3j4dLnCuwPkFakCzQHGBpTc1Jp6Uj4/8lXP/B+U5bqf2KgEo Pl34sIV0SPUJ6rPclE5x3xLg9Ljei+h6XuV5X/tVHc6v2d7pdFmWDSG+1GF7x39NZFHB 1cChnxDRjnQVjIvSDvp/zeaYKl6qRNj8KWXU4/YcIZdhEv2w39hfZ1iusQgtHRLV8ngw Rumg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l7-v6si28477499pgs.35.2018.07.16.08.38.45; Mon, 16 Jul 2018 08:39:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731269AbeGPQF2 (ORCPT + 99 others); Mon, 16 Jul 2018 12:05:28 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:45318 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727653AbeGPQF0 (ORCPT ); Mon, 16 Jul 2018 12:05:26 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 60F43F3EA9ED0; Mon, 16 Jul 2018 23:37:23 +0800 (CST) Received: from S00293818-DELL1.huawei.com (10.202.226.54) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.382.0; Mon, 16 Jul 2018 23:37:18 +0800 From: Salil Mehta To: CC: , , , , , , , Huazhong Tan Subject: [PATCH net-next 6/9] net: hns3: remove unnecessary ring configuration operation while resetting Date: Mon, 16 Jul 2018 16:36:24 +0100 Message-ID: <20180716153627.476-7-salil.mehta@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180716153627.476-1-salil.mehta@huawei.com> References: <20180716153627.476-1-salil.mehta@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.202.226.54] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Huazhong Tan The configuration of the ring will be used to reinitialize the ring after the hardware reset is completed. So we should not release and reacquire this configuration during reset. Fixes: bb6b94a896d4 ("net: hns3: Add reset interface implementation in client") Signed-off-by: Huazhong Tan Signed-off-by: Peng Li Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c index 8296446..24f82b7 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c @@ -3436,10 +3436,6 @@ static int hns3_reset_notify_init_enet(struct hnae3_handle *handle) /* Carrier off reporting is important to ethtool even BEFORE open */ netif_carrier_off(netdev); - ret = hns3_get_ring_config(priv); - if (ret) - return ret; - ret = hns3_nic_init_vector_data(priv); if (ret) return ret; @@ -3471,10 +3467,6 @@ static int hns3_reset_notify_uninit_enet(struct hnae3_handle *handle) if (ret) netdev_err(netdev, "uninit ring error\n"); - hns3_put_ring_config(priv); - - priv->ring_data = NULL; - hns3_uninit_mac_addr(netdev); return ret; -- 2.7.4