Received: by 10.223.185.111 with SMTP id b44csp1005966wrg; Fri, 9 Mar 2018 19:00:55 -0800 (PST) X-Google-Smtp-Source: AG47ELvfsR5DgHMWGAG0o7HUVipdDZqIqRyASgW6ZsWBWvob6rcbIEPeXtlnPml+eLHKo/xXZQ9P X-Received: by 10.101.100.87 with SMTP id s23mr563301pgv.413.1520650855534; Fri, 09 Mar 2018 19:00:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520650855; cv=none; d=google.com; s=arc-20160816; b=wCx+Q1s9UwK/cGsMSDe24ghkFVBaRZKe2LO/pdw4L/nma1yFNC8p7VgBxmj27OkEHo sLDQCUervc1+uUyaKMfkcPgANp8Wm2TPW2ieXLxVIE+XbAZAKjlytjKC8wpazaXDQxU1 D0HjrzypdiT8lXbh1eRmGYZyLD7I/29luLnhp4HPx6pkvtm3hjW+WR/7vivbpVlDKCJy 165OtzQA6jZot6i1nhZYsXodL+MnaV/rv8+vQCWtqhKeR412WSAkYIoOEcs6kkjXL5Vm NzNFTpG5iU/69FT09CVLZj8LdgUf1kvFQEiDN+7Tetwdw4MJyZEVq/Y8PpLN8Uik0twX dW5g== 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=+HGw59TMBGF3reSw7ijfbnRY9HKRRonsYyL6BEAs9uM=; b=AD65u60v5KuQqFc7yhqTc7xkEuorSCHjFoe/XfyKh3HYCsogj5cPbg+45hPg+NoOxI VVL8at83QSVi1ok/JJ2i2tgpaTbuKh7ZFKo0ajFU8L4S9uYWDkejvjS1wSMy5rWzVSRP /7btFHt8gTcSFDzUlqVtq8lGkpIEbSfp1qTW+gIBLbmaG/mMkPWz+KI4UlPMq+1CLVVk mEVgHxrIw6k1LWHrFyLrofNtKa/AELYis9b4abibOhqSTr1w1iLrC4n507dxprB2Slsl mXynFw4i0t9S1usAPvIflLxYjf9h+NLPBOzbJSipchZqS6royRHnSK954q/hcnQ9IG8u 3/Vg== 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 b9-v6si1946030pls.108.2018.03.09.19.00.41; Fri, 09 Mar 2018 19:00:55 -0800 (PST) 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 S933014AbeCJC7X (ORCPT + 99 others); Fri, 9 Mar 2018 21:59:23 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:6225 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932701AbeCJC5h (ORCPT ); Fri, 9 Mar 2018 21:57:37 -0500 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id ADFF615B7B55E; Sat, 10 Mar 2018 10:57:21 +0800 (CST) Received: from linux-ioko.site (10.71.200.31) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.361.1; Sat, 10 Mar 2018 10:57:15 +0800 From: Peng Li To: CC: , , , , Subject: [PATCH net-next 03/12] net: hns3: fix for ipv6 address loss problem after setting channels Date: Sat, 10 Mar 2018 11:29:24 +0800 Message-ID: <1520652573-75644-4-git-send-email-lipeng321@huawei.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1520652573-75644-1-git-send-email-lipeng321@huawei.com> References: <1520652573-75644-1-git-send-email-lipeng321@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.71.200.31] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Fuyun Liang The function of dev_close and dev_open is just likes ifconfig down and ifconfig up. The ipv6 address will be lost after dev_close and dev_open are called. This patch uses hns3_nic_net_stop to replace dev_close and uses hns3_nic_net_open to replace dev_open. Signed-off-by: Fuyun Liang Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c index 8113d22..4dba974 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c @@ -3503,7 +3503,7 @@ int hns3_set_channels(struct net_device *netdev, return 0; if (if_running) - dev_close(netdev); + hns3_nic_net_stop(netdev); hns3_clear_all_ring(h); @@ -3546,7 +3546,7 @@ int hns3_set_channels(struct net_device *netdev, open_netdev: if (if_running) - dev_open(netdev); + hns3_nic_net_open(netdev); return ret; } -- 2.9.3