]> bbs.cooldavid.org Git - net-next-2.6.git/commit
RDMA/cxgb3: Fix deadlock initializing iw_cxgb3 device
authorSteve Wise <swise@opengridcomputing.com>
Mon, 4 Aug 2008 18:08:37 +0000 (11:08 -0700)
committerRoland Dreier <rolandd@cisco.com>
Mon, 4 Aug 2008 18:08:37 +0000 (11:08 -0700)
commitbe43324d8b316fe83a7b4027334f2825f1121c2c
tree30d238ba31519d2c75c642f371754af2fa9ad236
parent1c355a6e80fd08e623416138631e240f431385f2
RDMA/cxgb3: Fix deadlock initializing iw_cxgb3 device

Running 'ifconfig up' on the cxgb3 interface with iw_cxgb3 loaded
causes a deadlock.  The rtnl lock is already held in this path.  The
function fw_supports_fastreg() was introduced in 2.6.27 to
conditionally set the IB_DEVICE_MEM_MGT_EXTENSIONS bit iff the
firmware was at 7.0 or greater, and this function also acquires the
rtnl lock and which thus causes a deadlock.  Further, if iw_cxgb3 is
loaded _after_ the nic interface is brought up, then the deadlock does
not occur and therefore fw_supports_fastreg() does need to grab the
rtnl lock in that path.

It turns out this code is all useless anyway.  The low level driver
will NOT allow the open if the firmware isn't 7.0, so iw_cxgb3 can
always set the MEM_MGT_EXTENSIONS bit.  Simplify...

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/cxgb3/iwch_provider.c