diff options
author | Michael Chan <mchan@broadcom.com> | 2009-08-14 17:49:46 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-08-16 03:50:44 +0200 |
commit | 681dbd710779e8b8d5bae926f6b11f30df70638b (patch) | |
tree | 50605514ea7316f8a6316a93e205c0c9a3fb4399 /drivers/net/cnic.h | |
parent | bnx2: Use mutex on slow path cnic calls. (diff) | |
download | linux-681dbd710779e8b8d5bae926f6b11f30df70638b.tar.xz linux-681dbd710779e8b8d5bae926f6b11f30df70638b.zip |
cnic: Fix locking in start/stop calls.
The slow path ulp_start and ulp_stop calls to the bnx2i driver
are sleepable calls and therefore should not be protected using
rcu_read_lock. Fix it by using mutex and setting a bit during
these calls. cnic_unregister_device() will now wait for the bit
to clear 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.h')
-rw-r--r-- | drivers/net/cnic.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/cnic.h b/drivers/net/cnic.h index 5192d4a9df5a..a94b302bb464 100644 --- a/drivers/net/cnic.h +++ b/drivers/net/cnic.h @@ -176,6 +176,7 @@ struct cnic_local { unsigned long ulp_flags[MAX_CNIC_ULP_TYPE]; #define ULP_F_INIT 0 #define ULP_F_START 1 +#define ULP_F_CALL_PENDING 2 struct cnic_ulp_ops *ulp_ops[MAX_CNIC_ULP_TYPE]; /* protected by ulp_lock */ |