]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: fix tx timeout issue
authorJian Shen <shenjian15@huawei.com>
Wed, 6 Sep 2023 07:20:12 +0000 (15:20 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Sep 2023 10:28:03 +0000 (12:28 +0200)
commit5c28780f4232626409eaccde4b48f2f99294261b
tree068af7d2cef3a62f2fe81519e58f4949c69440c1
parent7bb8d52b4271be7527b6e3120ae6ce4c6cdf6e34
net: hns3: fix tx timeout issue

[ Upstream commit 61a1deacc3d4fd3d57d7fda4d935f7f7503e8440 ]

Currently, the driver knocks the ring doorbell before updating
the ring->last_to_use in tx flow. if the hardware transmiting
packet and napi poll scheduling are fast enough, it may get
the old ring->last_to_use in drivers' napi poll.
In this case, the driver will think the tx is not completed, and
return directly without clear the flag __QUEUE_STATE_STACK_XOFF,
which may cause tx timeout.

Fixes: 20d06ca2679c ("net: hns3: optimize the tx clean process")
Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Jijie Shao <shaojijie@huawei.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c