summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx4/en_rx.c
diff options
context:
space:
mode:
authorIdo Shamay2015-07-22 15:53:49 +0200
committerDavid S. Miller2015-07-27 01:29:26 +0200
commit62e4c9b4fd3f8fd7d51951f0f10e3f27c58d4037 (patch)
treef207e6c0cacee520294a871112b886e0bb9410d4 /drivers/net/ethernet/mellanox/mlx4/en_rx.c
parentnet/mlx4_core: Relieve cpu load average on the port sending flow (diff)
downloadkernel-qcow2-linux-62e4c9b4fd3f8fd7d51951f0f10e3f27c58d4037.tar.gz
kernel-qcow2-linux-62e4c9b4fd3f8fd7d51951f0f10e3f27c58d4037.tar.xz
kernel-qcow2-linux-62e4c9b4fd3f8fd7d51951f0f10e3f27c58d4037.zip
net/mlx4_en: Remove BUG_ON assert when checking if ring is full
In mlx4_en_is_ring_empty we check if ring surpassed its size. Since the prod and cons indicators are u32, there might be a state where prod wrapped around and cons, making this assert false, although no actual bug exists (other code segment can cope with this state). Signed-off-by: Ido Shamay <idos@mellanox.com> Signed-off-by: Eugenia Emantayev <eugenia@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/en_rx.c')
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/en_rx.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
index 7a4f20bb7fcb..9c145dddd717 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
@@ -246,7 +246,6 @@ static int mlx4_en_prepare_rx_desc(struct mlx4_en_priv *priv,
static inline bool mlx4_en_is_ring_empty(struct mlx4_en_rx_ring *ring)
{
- BUG_ON((u32)(ring->prod - ring->cons) > ring->actual_size);
return ring->prod == ring->cons;
}