]> www.infradead.org Git - users/dwmw2/linux.git/commit
net: hns3: Fix for reset_level default assignment probelm
authorYunsheng Lin <linyunsheng@huawei.com>
Mon, 16 Jul 2018 15:36:25 +0000 (16:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Sep 2018 06:39:37 +0000 (08:39 +0200)
commitcef4231adf5557b19d719cde6cda4087f1db8f07
tree55a151f33943bd568c8960f70bc45b43324f107d
parent4d23263a5a8e20b2bf509052ea2b0fadc9d7c840
net: hns3: Fix for reset_level default assignment probelm

[ Upstream commit 82b5321460005ac5d34996e17f5a51a4004a1e14 ]

handle->reset_level is assigned to HNAE3_NONE_RESET when client is
initialized, if a tx timeout happens right after initialization,
then handle->reset_level is not resetted to HNAE3_FUNC_RESET in
hclge_reset_event, which will cause reset event not properly
handled problem.

This patch fixes it by setting handle->reset_level properly when
client is initialized.

Fixes: 6d4c3981a8d8 ("net: hns3: Changes to make enet watchdog timeout func common for PF/VF")
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c