]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: hns3: fix __QUEUE_STATE_STACK_XOFF not cleared issue
authorHuazhong Tan <tanhuazhong@huawei.com>
Fri, 28 Jun 2019 11:50:07 +0000 (19:50 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Jul 2019 07:12:51 +0000 (09:12 +0200)
commit5be48072f2ddad8968d3adb3856d021d73fd4295
tree66a3e7d83e9f224ef36aa3383583b47250103165
parent067471e8d1475bf2b86b37cc6b95fab55a77ea08
net: hns3: fix __QUEUE_STATE_STACK_XOFF not cleared issue

[ Upstream commit f96315f2f17e7b2580d2fec7c4d6a706a131d904 ]

When change MTU or other operations, which just calling .reset_notify
to do HNAE3_DOWN_CLIENT and HNAE3_UP_CLIENT, then
the netdev_tx_reset_queue() in the hns3_clear_all_ring() will be
ignored. So the dev_watchdog() may misdiagnose a TX timeout.

This patch separates netdev_tx_reset_queue() from
hns3_clear_all_ring(), and unifies hns3_clear_all_ring() and
hns3_force_clear_all_ring into one, since they are doing
similar things.

Fixes: 3a30964a2eef ("net: hns3: delay ring buffer clearing during reset")
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c