From: Salil Mehta <salil.mehta@huawei.com>
To: <davem@davemloft.net>
Cc: <salil.mehta@huawei.com>, <yisen.zhuang@huawei.com>,
<lipeng321@huawei.com>, <mehta.salil@opnsrc.net>,
<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linuxarm@huawei.com>, Yunsheng Lin <linyunsheng@huawei.com>
Subject: [PATCH net-next 06/11] net: hns3: Fix ping exited problem when doing lp selftest
Date: Mon, 3 Sep 2018 11:21:51 +0100 [thread overview]
Message-ID: <20180903102156.18676-7-salil.mehta@huawei.com> (raw)
In-Reply-To: <20180903102156.18676-1-salil.mehta@huawei.com>
From: Yunsheng Lin <linyunsheng@huawei.com>
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 <linyunsheng@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
---
drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c
index 14797b9..7143e39 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c
@@ -294,7 +294,7 @@ static void hns3_self_test(struct net_device *ndev,
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 */
@@ -332,7 +332,7 @@ static void hns3_self_test(struct net_device *ndev,
#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)
--
2.7.4
next prev parent reply other threads:[~2018-09-03 10:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-03 10:21 [PATCH net-next 00/11] Misc. bug fixes & small enhancements for HNS3 Driver Salil Mehta
2018-09-03 10:21 ` [PATCH net-next 01/11] net: hns3: Fix for vf vlan delete failed problem Salil Mehta
2018-09-03 10:21 ` [PATCH net-next 02/11] net: hns3: Fix for multicast failure Salil Mehta
2018-09-03 10:21 ` [PATCH net-next 03/11] net: hns3: Fix error of checking used vlan id Salil Mehta
2018-09-03 10:21 ` [PATCH net-next 04/11] net: hns3: Implement shutdown ops in hns3 pci driver Salil Mehta
2018-09-03 10:21 ` [PATCH net-next 05/11] net: hns3: Fix for loopback selftest failed problem Salil Mehta
2018-09-03 10:21 ` Salil Mehta [this message]
2018-09-03 10:21 ` [PATCH net-next 07/11] net: hns3: Preserve vlan 0 in hardware table Salil Mehta
2018-09-03 10:21 ` [PATCH net-next 08/11] net: hns3: Only update mac configuation when necessary Salil Mehta
2018-09-03 10:21 ` [PATCH net-next 09/11] net: hns3: Change the dst mac addr of loopback packet Salil Mehta
2018-09-03 10:21 ` [PATCH net-next 10/11] net: hns3: Remove redundant codes of query advertised flow control abilitiy Salil Mehta
2018-09-03 10:21 ` [PATCH net-next 11/11] net: hns3: Refine hns3_get_link_ksettings() Salil Mehta
2018-09-04 5:06 ` [PATCH net-next 00/11] Misc. bug fixes & small enhancements for HNS3 Driver David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180903102156.18676-7-salil.mehta@huawei.com \
--to=salil.mehta@huawei.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=linyunsheng@huawei.com \
--cc=lipeng321@huawei.com \
--cc=mehta.salil@opnsrc.net \
--cc=netdev@vger.kernel.org \
--cc=yisen.zhuang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®