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>, Huazhong Tan <tanhuazhong@huawei.com>
Subject: [PATCH net-next 5/9] net: hns3: Fix return value error in hns3_reset_notify_down_enet
Date: Mon, 16 Jul 2018 16:36:23 +0100 [thread overview]
Message-ID: <20180716153627.476-6-salil.mehta@huawei.com> (raw)
In-Reply-To: <20180716153627.476-1-salil.mehta@huawei.com>
From: Huazhong Tan <tanhuazhong@huawei.com>
When doing reset, netdev has not been brought up is not an error,
it means that we do not need do the stop operation, so just return
zero.
Fixes: 76ad4f0ee747 ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC")
Signed-off-by: Huazhong Tan <tanhuazhong@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_enet.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
index c211450..8296446 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
@@ -3396,7 +3396,7 @@ static int hns3_reset_notify_down_enet(struct hnae3_handle *handle)
struct net_device *ndev = kinfo->netdev;
if (!netif_running(ndev))
- return -EIO;
+ return 0;
return hns3_nic_net_stop(ndev);
}
--
2.7.4
next prev parent reply other threads:[~2018-07-16 15:37 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-16 15:36 [PATCH net-next 0/9] Bug fixes and some minor changes to HNS3 driver Salil Mehta
2018-07-16 15:36 ` [PATCH net-next 1/9] net: hns3: Modify the order of initializing command queue register Salil Mehta
2018-07-16 15:36 ` [PATCH net-next 2/9] net: hns3: Reset net device with rtnl_lock Salil Mehta
2018-07-16 15:36 ` [PATCH net-next 3/9] net: hns3: Prevent to request reset frequently Salil Mehta
2018-07-16 15:36 ` [PATCH net-next 4/9] net: hns3: Correct reset event status register Salil Mehta
2018-07-16 15:36 ` Salil Mehta [this message]
2018-07-16 15:36 ` [PATCH net-next 6/9] net: hns3: remove unnecessary ring configuration operation while resetting Salil Mehta
2018-07-16 15:36 ` [PATCH net-next 7/9] net: hns3: Fix for reset_level default assignment probelm Salil Mehta
2018-07-17 9:37 ` Sergei Shtylyov
2018-07-18 7:29 ` Salil Mehta
2018-07-16 15:36 ` [PATCH net-next 8/9] net: hns3: Fix for using wrong mask and shift in hclge_get_ring_chain_from_mbx Salil Mehta
2018-07-16 15:36 ` [PATCH net-next 9/9] net: hns3: Fix comments for hclge_get_ring_chain_from_mbx Salil Mehta
2018-07-16 18:18 ` [PATCH net-next 0/9] Bug fixes and some minor changes to 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=20180716153627.476-6-salil.mehta@huawei.com \
--to=salil.mehta@huawei.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=lipeng321@huawei.com \
--cc=mehta.salil@opnsrc.net \
--cc=netdev@vger.kernel.org \
--cc=tanhuazhong@huawei.com \
--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®