提交 11623fce 编写于 作者: Q Quan Nguyen 提交者: David S. Miller

drivers: net: xgene: Fix wrong logical operation

This patch fixes the wrong logical OR operation by changing it to
bit-wise OR operation.

Fixes: 3bb502f8 ("drivers: net: xgene: fix statistics counters race condition")
Signed-off-by: NIyappan Subramanian <isubramanian@apm.com>
Signed-off-by: NQuan Nguyen <qnguyen@apm.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 e026e700
......@@ -677,9 +677,9 @@ static int xgene_enet_rx_frame(struct xgene_enet_desc_ring *rx_ring,
buf_pool->rx_skb[skb_index] = NULL;
/* checking for error */
status = (GET_VAL(ELERR, le64_to_cpu(raw_desc->m0)) << LERR_LEN) ||
status = (GET_VAL(ELERR, le64_to_cpu(raw_desc->m0)) << LERR_LEN) |
GET_VAL(LERR, le64_to_cpu(raw_desc->m0));
if (unlikely(status > 2)) {
if (unlikely(status)) {
dev_kfree_skb_any(skb);
xgene_enet_free_pagepool(page_pool, raw_desc, exp_desc);
xgene_enet_parse_error(rx_ring, netdev_priv(rx_ring->ndev),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册