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>
This commit is contained in:
Michael Chan
2010-06-24 14:58:37 +00:00
committed by David S. Miller
parent 39c9cf0707
commit 520efdf44f
2 changed files with 21 additions and 15 deletions

View File

@@ -248,8 +248,10 @@ struct cnic_local {
struct cnic_iscsi *iscsi_tbl;
struct cnic_context *ctx_tbl;
struct cnic_id_tbl cid_tbl;
int max_iscsi_conn;
atomic_t iscsi_conn;
u32 iscsi_start_cid;
u32 max_cid_space;
/* per connection parameters */
int num_iscsi_tasks;