]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net-next/hinic: fix a problem in hinic_xmit_frame()
authorZhao Chen <zhaochen6@huawei.com>
Wed, 18 Jul 2018 04:33:18 +0000 (00:33 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 28 Jul 2018 05:57:13 +0000 (07:57 +0200)
commit8b0fe96d33d480a4461bbdc7339c4ea4385a177e
tree452161ba50a07ce5f9a581a37076a5398aea0d41
parent254b7df2a24ada8e5c79cd0f2270d151de7af3ca
net-next/hinic: fix a problem in hinic_xmit_frame()

[ Upstream commit f7482683f1f4925c60941dbbd0813ceaa069d106 ]

The calculation of "wqe_size" is not correct when the tx queue is busy in
hinic_xmit_frame().

When there are no free WQEs, the tx flow will unmap the skb buffer, then
ring the doobell for the pending packets. But the "wqe_size" which used
to calculate the doorbell address is not correct. The wqe size should be
cleared to 0, otherwise, it will cause a doorbell error.

This patch fixes the problem.

Reported-by: Zhou Wang <wangzhou1@hisilicon.com>
Signed-off-by: Zhao Chen <zhaochen6@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/huawei/hinic/hinic_tx.c