• Steve Wise's avatar
    RDMA/cxgb3: Fix deadlock initializing iw_cxgb3 device · be43324d
    Steve Wise authored
    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: default avatarSteve Wise <swise@opengridcomputing.com>
    Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
    be43324d
iwch_provider.c 37.1 KB