]> git.baikalelectronics.ru Git - kernel.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)
committerDavid S. Miller <davem@davemloft.net>
Fri, 28 Jun 2019 16:39:49 +0000 (09:39 -0700)
commita505a69653949547c419a90395b65f01ca57efbb
tree43d6e29725a32cad696c56f22040ce210f8eae02
parentaa5110b9baefb9f318afa82bd8ef429a34c15213
net: hns3: fix __QUEUE_STATE_STACK_XOFF not cleared issue

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: 47dd920badb4 ("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>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c