Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3486525imu; Sun, 11 Nov 2018 16:11:36 -0800 (PST) X-Google-Smtp-Source: AJdET5eUoo1ph1abrsEDAxDIa6txSLra4wnb1IqR/BvhyZ1d7ezhr2qAu/YO3zKpgGg76zPwb0/u X-Received: by 2002:a62:6799:: with SMTP id t25mr405093pfj.139.1541981496421; Sun, 11 Nov 2018 16:11:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541981496; cv=none; d=google.com; s=arc-20160816; b=QY+6euoeCD2n5BbDhJ5VYCt87ZafvjA/mgL6wSiDqFt1l2IIW/aBrFV9Z0bn5ZJsYb qLP7k1jtkJSN6E1xaX6mMckPAfWQm2s0RpSXh1ERudI0HBAo3FSdXyLqFyqGW4rcJPch gQYZDLZ2i2GEaDgPM1JCgy/Sm0+Kcc2/a4iT3X829IpiH2G56mRa94Hm5sq06g8nswF5 ZRZLjVu6ql461FF58pbbMgVCa2BCmHTzGs2sjUi7/kapAZlypggGEKwz0PW9mjAa32Eb 9qBbeptt9NR60cMcTC0XQXFAI/UC6YAW8DZU8DyC+ltpptU7t7FaUSx8YLxSICvhKb6s YGjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+fbsBddpCmBVmyaxPZisTll63EFRS9BK+SzZPIm0vrk=; b=aiuipLHNfqchymBV1Z3BejFvgHVuMrUiJrLqGhSXC+uU0ftoluIDMhRvAZh8tpsUEb RLlYEPi1UqYgItQRFQp0xIUmg6iAUNLBcRWb6QvgPGks9jEvzakRoyf9is598GcCkoQf SYJ0lw///oHvlOoEj0DHn6nz67G31y/zV18wZKZogxXD88eSI+nYBz3pRym6HjVPTdG2 XKCgKgRH40cqvx7w8O3ShAXpt4UiRY4s7l1VaYRkMlY/jrsr3TRT6W5EQ4POwnszSauu 9t4UU6q9v+2lvg5aAskbI9GJeYAcdyJYmV7KnaNNUUfT5aZy5MmfTd+374Yl46O/qKpX iXPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=gWW02bWE; 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 n78-v6si16545045pfi.171.2018.11.11.16.11.21; Sun, 11 Nov 2018 16:11:36 -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; dkim=pass header.i=@kernel.org header.s=default header.b=gWW02bWE; 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 S1731028AbeKLIR1 (ORCPT + 99 others); Mon, 12 Nov 2018 03:17:27 -0500 Received: from mail.kernel.org ([198.145.29.99]:60278 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730892AbeKLIR0 (ORCPT ); Mon, 12 Nov 2018 03:17:26 -0500 Received: from localhost (unknown [206.108.79.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D934221527; Sun, 11 Nov 2018 22:27:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975250; bh=9qz0LvUe0X/osrTLJbERt8jzYPEST5f8Ib7x69dAKxU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gWW02bWE1CvqgwcPaO6rnCh0u+Z7QjFKT3pInJw2GQ4WoOgoDKzcaZfxd5qDLD/9h CnDasHu2jFTuHK4Bw62pvE6MZlv5xTUd4LcxCp5/yP+/hxZ3/ICREerb1rEbuHeAKn kQOq+xS5mS6dwXTemVukGPm9g6Hq7X4gn3frJ21Y= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yunsheng Lin , Peng Li , Salil Mehta , "David S. Miller" , Sasha Levin Subject: [PATCH 4.19 115/361] net: hns3: Fix ping exited problem when doing lp selftest Date: Sun, 11 Nov 2018 14:17:42 -0800 Message-Id: <20181111221635.988377602@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221619.915519183@linuxfoundation.org> References: <20181111221619.915519183@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Yunsheng Lin [ Upstream commit 3f8601f0f5716c4e63a9f215bbc581df42859d61 ] When ping is runnig and user executes the loopback selftest, the ping cmd will stop and exit. This patch fixes it by using the hns3_nic_net_open/stop to offline the netdev when doing loopback selftest. Fixes: c39c4d98dc65 ("net: hns3: Add mac loopback selftest support in hns3 driver") Signed-off-by: Yunsheng Lin Signed-off-by: Peng Li Signed-off-by: Salil Mehta Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c @@ -309,7 +309,7 @@ static void hns3_self_test(struct net_de h->flags & HNAE3_SUPPORT_SERDES_LOOPBACK; if (if_running) - dev_close(ndev); + ndev->netdev_ops->ndo_stop(ndev); #if IS_ENABLED(CONFIG_VLAN_8021Q) /* Disable the vlan filter for selftest does not support it */ @@ -347,7 +347,7 @@ static void hns3_self_test(struct net_de #endif if (if_running) - dev_open(ndev); + ndev->netdev_ops->ndo_open(ndev); } static int hns3_get_sset_count(struct net_device *netdev, int stringset)