From patchwork Mon Jul 16 15:36:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Salil Mehta X-Patchwork-Id: 142034 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2568448ljj; Mon, 16 Jul 2018 08:37:33 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcncQn87h/DMSsnZzOBpt97sbjMEgCV6hMNHnGu4qbAeANPUNReB02ZWKVwOcytY1BLXkOS X-Received: by 2002:a62:9541:: with SMTP id p62-v6mr18412403pfd.152.1531755452979; Mon, 16 Jul 2018 08:37:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531755452; cv=none; d=google.com; s=arc-20160816; b=zUs74po7UUpxwRZBLOU0n7ZIGPDrgGJXPitW++v1m4k5EPFBi3hoy/limuHTCNIS9S SThYOMSIEzxQaeyqpwcHS4WB/81qk7Q0Dog2HDnPggXvFFKpS6W9v+Id7kuULxkaPKZS fI6Vw7jmmawU5OXxRNqNRenCdHMt6/NELhYMlWLQPSgz3XF65HCPdWdFxnPrYJFltGsN UkOVuhLplqfltGpLvx9z/nebD8AamdmO9NNfEvjEOSFDmoMnvzjZ9Q/FE/0xW+tHicWw KUJSsnieSPs9KNnIBf+z8s/WRAvIxjWr3gpEh0ew5vOO+YsbfQEApyCIfkULLIShACk8 U+Ug== 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 38-v6si30819730plc.446.2018.07.16.08.37.32; Mon, 16 Jul 2018 08:37:32 -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 S1731282AbeGPQF2 (ORCPT + 31 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 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(-) -- 2.7.4 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;