RDMA/cxgb4: Reset wait condition atomically
authorSteve Wise <swise@opengridcomputing.com>
Tue, 10 May 2011 05:06:22 +0000 (22:06 -0700)
committerRoland Dreier <roland@purestorage.com>
Tue, 10 May 2011 05:06:22 +0000 (22:06 -0700)
commitd9594d990a528d4c444777d0f360bb50c6114825
tree93b587a40d1bd17200f3076edc5a2c0f78feb230
parent85d215b0f316bee0a6936bd1a5f21abf03333eaa
RDMA/cxgb4: Reset wait condition atomically

The driver was never really waiting for RDMA_WR/FINI completions
because the condition variable used to determine if the completion
happened was never reset, and this condition variable is reused for
both connection setup and teardown.  This causes various driver
crashes under heavy loads due to releasing resources too early.

The fix is to use atomic bits to correctly reset the condition
immediately after the completion is detected.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/hw/cxgb4/cm.c
drivers/infiniband/hw/cxgb4/iw_cxgb4.h