RDMA/cxgb4: Use a mutex for QP and EP state transitions
authorSteve Wise <swise@opengridcomputing.com>
Fri, 10 Sep 2010 16:15:36 +0000 (11:15 -0500)
committerRoland Dreier <rolandd@cisco.com>
Tue, 28 Sep 2010 17:53:48 +0000 (10:53 -0700)
commit2f5b48c3ad84fda9efe35122b058ccffc0c2c7cf
tree11d3a830803748d83c132ee402ed3376a58f6aed
parentc6d7b26791a2aefdf97f2af1e93161ed05acd631
RDMA/cxgb4: Use a mutex for QP and EP state transitions

Move the connection setup/teardown paths to the workq thread removing
spin lock/irq disable requirements for these paths.  This allows calls
down to the LLD for EP and QP state transition actions to be atomic
with respect to processing CPL messages coming up from the HW.
Namely, calls to rdma_init() and rdma_fini() can now be called with
the mutex held avoiding many race conditions with the abort path.

The QP spinlock is still used but only to manipulate the qp state.  This
allows the fastpaths, poll, post_send, and pos_recv, to run in the
irq context.

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