summaryrefslogtreecommitdiffstats
path: root/drivers/net/cnic_if.h
diff options
context:
space:
mode:
authorMichael Chan <mchan@broadcom.com>2009-08-14 15:49:47 +0000
committerDavid S. Miller <davem@davemloft.net>2009-08-15 18:50:47 -0700
commit7fc1ece40704b150477e548a7a98d285cc418790 (patch)
treefd7f72c1b92ddde327fb72235a256539ac193b8c /drivers/net/cnic_if.h
parent681dbd710779e8b8d5bae926f6b11f30df70638b (diff)
cnic: Fix locking in init/exit calls.
The slow path ulp_init and ulp_exit calls to the bnx2i driver are sleepable calls and therefore should not be protected using rcu_read_lock. Fix it by using mutex and refcount during these calls. cnic_unregister_driver() will now wait for the refcount to go to zero before completing the call. Signed-off-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Benjamin Li <benli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/cnic_if.h')
-rw-r--r--drivers/net/cnic_if.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/cnic_if.h b/drivers/net/cnic_if.h
index d1bce27ee99..a49235739ee 100644
--- a/drivers/net/cnic_if.h
+++ b/drivers/net/cnic_if.h
@@ -290,6 +290,7 @@ struct cnic_ulp_ops {
void (*iscsi_nl_send_msg)(struct cnic_dev *dev, u32 msg_type,
char *data, u16 data_size);
struct module *owner;
+ atomic_t ref_count;
};
extern int cnic_register_driver(int ulp_type, struct cnic_ulp_ops *ulp_ops);