android_kernel_xiaomi_sm8350/drivers/infiniband/hw/cxgb3
Steve Wise b3e123cf65 RDMA/cxgb3: Fix deadlock in iw_cxgb3 (hang when configuring interface)
When the iw_cxgb3 module's cxgb3_client "add" func gets called by the
cxgb3 module, the iwarp driver ends up calling the ethtool ops
get_drvinfo function in cxgb3 to get the fw version and other info.
Currently the iwarp driver grabs the rtnl lock around this down call
to serialize.  As of 2.6.27 or so, things changed such that the rtnl
lock is held around the call to the netdev driver open function.  Also
the cxgb3_client "add" function doesn't get called if the device is
down.

So, if you load cxgb3, then load iw_cxgb3, then ifconfig up the
device, the iw_cxgb3 add func gets called with the rtnl_lock held.  If
you load cxgb3, ifconfig up the device, then load iw_cxgb3, the add
func gets called without the rtnl_lock held.  The former causes the
deadlock, the latter does not.

In addition, there are iw_cxgb3 sysfs handlers that also can call down
into cxgb3 to gather the fw and hw versions.  These can be called
concurrently on different processors and at any time.  Thus we need to
push this serialization down in the cxgb3 driver get_drvinfo func.

The fix is to remove rtnl lock usage, and use a per-device lock in cxgb3.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Acked-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-11-12 10:16:47 -08:00
..
cxio_dbg.c IB: Replace remaining __FUNCTION__ occurrences with __func__ 2008-04-16 21:01:10 -07:00
cxio_hal.c RDMA/cxgb3: Fix up MW access rights 2008-08-04 11:05:43 -07:00
cxio_hal.h RDMA/cxgb3: Propagate HW page size capabilities 2008-07-14 23:48:49 -07:00
cxio_resource.c RDMA/cxgb3: Don't add PBL memory to gen_pool in chunks 2008-05-06 15:03:38 -07:00
cxio_resource.h
cxio_wr.h RDMA/cxgb3: Fixes for zero STag 2008-07-14 23:48:53 -07:00
iwch_cm.c RDMA/cxgb3: Remove cmid reference on tid allocation failures 2008-10-15 10:50:34 -07:00
iwch_cm.h RDMA/cxgb3: Support peer-2-peer connection setup 2008-04-29 13:46:52 -07:00
iwch_cq.c RDMA/cxgb3: MEM_MGT_EXTENSIONS support 2008-07-14 23:48:45 -07:00
iwch_ev.c IB: Replace remaining __FUNCTION__ occurrences with __func__ 2008-04-16 21:01:10 -07:00
iwch_mem.c RDMA/cxgb3: Fix severe limit on userspace memory registration size 2008-05-06 15:56:22 -07:00
iwch_provider.c RDMA/cxgb3: Fix deadlock in iw_cxgb3 (hang when configuring interface) 2008-11-12 10:16:47 -08:00
iwch_provider.h RDMA/cxgb3: Fix up MW access rights 2008-08-04 11:05:43 -07:00
iwch_qp.c RDMA/cxgb3: Fix too-big reserved field zeroing in iwch_post_zb_read() 2008-11-01 12:55:37 -07:00
iwch_user.h
iwch.c RDMA/cxgb3: Propagate HW page size capabilities 2008-07-14 23:48:49 -07:00
iwch.h RDMA/cxgb3: Remove write-only iwch_rnic_attributes fields 2008-07-14 23:48:47 -07:00
Kconfig
Makefile
tcb.h