diff options
author | Michael Chan <mchan@broadcom.com> | 2010-06-24 10:58:37 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-06-25 23:37:18 -0400 |
commit | 520efdf44f0140eef9018518fdae5edfc86f3b6c (patch) | |
tree | 88e5e9bce57401ebfcc3d1ac9dec9c1af10d1d82 /drivers/net/cnic.h | |
parent | 39c9cf07077146b14ab077a0e27c869c6f0e6199 (diff) |
cnic: Fine-tune CID memory space calculation.
The current code makes assumptions about the CID (context ID) memory
space and starting CID that may not be always correct when firmware
changes. In particular, BNX2_ISCSI_START_CID may not always be fixed.
We now calculate cp->max_cid_space and cp->iscsi_start_cid dynamically
instead of using fixed constants. The unused cp->max_iscsi_conn is also
eliminated.
Signed-off-by: Michael Chan <mchan@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 | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/cnic.h b/drivers/net/cnic.h index 08b1235d987d..b7e2f7fcfb1c 100644 --- a/drivers/net/cnic.h +++ b/drivers/net/cnic.h | |||
@@ -248,8 +248,10 @@ struct cnic_local { | |||
248 | struct cnic_iscsi *iscsi_tbl; | 248 | struct cnic_iscsi *iscsi_tbl; |
249 | struct cnic_context *ctx_tbl; | 249 | struct cnic_context *ctx_tbl; |
250 | struct cnic_id_tbl cid_tbl; | 250 | struct cnic_id_tbl cid_tbl; |
251 | int max_iscsi_conn; | ||
252 | atomic_t iscsi_conn; | 251 | atomic_t iscsi_conn; |
252 | u32 iscsi_start_cid; | ||
253 | |||
254 | u32 max_cid_space; | ||
253 | 255 | ||
254 | /* per connection parameters */ | 256 | /* per connection parameters */ |
255 | int num_iscsi_tasks; | 257 | int num_iscsi_tasks; |