aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/huawei
diff options
context:
space:
mode:
authorZhao Chen <zhaochen6@huawei.com>2018-07-18 00:33:18 -0400
committerDavid S. Miller <davem@davemloft.net>2018-07-19 23:27:32 -0700
commitf7482683f1f4925c60941dbbd0813ceaa069d106 (patch)
tree20d03fb6bf300745027e59ca767b57f26a7c37e5 /drivers/net/ethernet/huawei
parentnet/page_pool: Fix inconsistent lock state warning (diff)
downloadlinux-dev-f7482683f1f4925c60941dbbd0813ceaa069d106.tar.xz
linux-dev-f7482683f1f4925c60941dbbd0813ceaa069d106.zip
net-next/hinic: fix a problem in hinic_xmit_frame()
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>
Diffstat (limited to 'drivers/net/ethernet/huawei')
-rw-r--r--drivers/net/ethernet/huawei/hinic/hinic_tx.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/huawei/hinic/hinic_tx.c b/drivers/net/ethernet/huawei/hinic/hinic_tx.c
index 9128858479c4..2353ec829c04 100644
--- a/drivers/net/ethernet/huawei/hinic/hinic_tx.c
+++ b/drivers/net/ethernet/huawei/hinic/hinic_tx.c
@@ -229,6 +229,7 @@ netdev_tx_t hinic_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
txq->txq_stats.tx_busy++;
u64_stats_update_end(&txq->txq_stats.syncp);
err = NETDEV_TX_BUSY;
+ wqe_size = 0;
goto flush_skbs;
}