• Eli Cohen's avatar
    IB/mlx4: Fix possible missed completion event · 3616f9ce
    Eli Cohen authored
    If an erroneous CQE is polled in the first iteration (i.e. npolled ==
    0), we don't update the consumer index and hence the hardware could
    get a wrong notion of how many CQEs software polled.  Fix this by
    unconditionally updating the doorbell record.  We could change the
    check to be something like
    
    	if (npolled || err != -EAGAIN)
    		...
    
    but it does not seem worth the effort since a posted write to memory
    should not cost too much.
    Signed-off-by: default avatarEli Cohen <eli@mellanox.com>
    Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
    3616f9ce
cq.c 20.5 KB