diff options
author | Michael Chan <mchan@broadcom.com> | 2010-10-05 23:14:54 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-06 17:09:22 -0400 |
commit | ceb7e1c7c5ab86ca686d523f99ca473a1f3a984d (patch) | |
tree | f392ee76b6e43e862c20f89d209a50271c89c6bf /drivers/net/cnic.c | |
parent | 85407885d5d8e9eed9be8e4d33c519646b90d09f (diff) |
cnic: Pass cp pointer to BNX2X_HW_CID.
Preparation work for upcoming firmware interface changes.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/cnic.c')
-rw-r--r-- | drivers/net/cnic.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/net/cnic.c b/drivers/net/cnic.c index 2ab6a7c4ffc..0e31d5aa1dd 100644 --- a/drivers/net/cnic.c +++ b/drivers/net/cnic.c | |||
@@ -1209,7 +1209,7 @@ static int cnic_submit_kwqe_16(struct cnic_dev *dev, u32 cmd, u32 cid, | |||
1209 | 1209 | ||
1210 | kwqe.hdr.conn_and_cmd_data = | 1210 | kwqe.hdr.conn_and_cmd_data = |
1211 | cpu_to_le32(((cmd << SPE_HDR_CMD_ID_SHIFT) | | 1211 | cpu_to_le32(((cmd << SPE_HDR_CMD_ID_SHIFT) | |
1212 | BNX2X_HW_CID(cid, cp->func))); | 1212 | BNX2X_HW_CID(cp, cid))); |
1213 | kwqe.hdr.type = cpu_to_le16(type); | 1213 | kwqe.hdr.type = cpu_to_le16(type); |
1214 | kwqe.hdr.reserved = 0; | 1214 | kwqe.hdr.reserved = 0; |
1215 | kwqe.data.phy_address.lo = cpu_to_le32(l5_data->phy_address.lo); | 1215 | kwqe.data.phy_address.lo = cpu_to_le32(l5_data->phy_address.lo); |
@@ -1461,7 +1461,7 @@ static int cnic_setup_bnx2x_ctx(struct cnic_dev *dev, struct kwqe *wqes[], | |||
1461 | struct cnic_context *ctx = &cp->ctx_tbl[req1->iscsi_conn_id]; | 1461 | struct cnic_context *ctx = &cp->ctx_tbl[req1->iscsi_conn_id]; |
1462 | struct cnic_iscsi *iscsi = ctx->proto.iscsi; | 1462 | struct cnic_iscsi *iscsi = ctx->proto.iscsi; |
1463 | u32 cid = ctx->cid; | 1463 | u32 cid = ctx->cid; |
1464 | u32 hw_cid = BNX2X_HW_CID(cid, cp->func); | 1464 | u32 hw_cid = BNX2X_HW_CID(cp, cid); |
1465 | struct iscsi_context *ictx; | 1465 | struct iscsi_context *ictx; |
1466 | struct regpair context_addr; | 1466 | struct regpair context_addr; |
1467 | int i, j, n = 2, n_max; | 1467 | int i, j, n = 2, n_max; |
@@ -1673,8 +1673,7 @@ static int cnic_bnx2x_iscsi_ofld1(struct cnic_dev *dev, struct kwqe *wqes[], | |||
1673 | } | 1673 | } |
1674 | 1674 | ||
1675 | kcqe.completion_status = ISCSI_KCQE_COMPLETION_STATUS_SUCCESS; | 1675 | kcqe.completion_status = ISCSI_KCQE_COMPLETION_STATUS_SUCCESS; |
1676 | kcqe.iscsi_conn_context_id = BNX2X_HW_CID(cp->ctx_tbl[l5_cid].cid, | 1676 | kcqe.iscsi_conn_context_id = BNX2X_HW_CID(cp, cp->ctx_tbl[l5_cid].cid); |
1677 | cp->func); | ||
1678 | 1677 | ||
1679 | done: | 1678 | done: |
1680 | cqes[0] = (struct kcqe *) &kcqe; | 1679 | cqes[0] = (struct kcqe *) &kcqe; |
@@ -3885,7 +3884,6 @@ static void cnic_init_bnx2x_tx_ring(struct cnic_dev *dev) | |||
3885 | struct eth_context *context; | 3884 | struct eth_context *context; |
3886 | struct regpair context_addr; | 3885 | struct regpair context_addr; |
3887 | dma_addr_t buf_map; | 3886 | dma_addr_t buf_map; |
3888 | int func = CNIC_FUNC(cp); | ||
3889 | int port = CNIC_PORT(cp); | 3887 | int port = CNIC_PORT(cp); |
3890 | int i; | 3888 | int i; |
3891 | int cli = BNX2X_ISCSI_CL_ID(CNIC_E1HVN(cp)); | 3889 | int cli = BNX2X_ISCSI_CL_ID(CNIC_E1HVN(cp)); |
@@ -3931,7 +3929,7 @@ static void cnic_init_bnx2x_tx_ring(struct cnic_dev *dev) | |||
3931 | XSTORM_ETH_ST_CONTEXT_STATISTICS_ENABLE; | 3929 | XSTORM_ETH_ST_CONTEXT_STATISTICS_ENABLE; |
3932 | 3930 | ||
3933 | context->xstorm_ag_context.cdu_reserved = | 3931 | context->xstorm_ag_context.cdu_reserved = |
3934 | CDU_RSRVD_VALUE_TYPE_A(BNX2X_HW_CID(BNX2X_ISCSI_L2_CID, func), | 3932 | CDU_RSRVD_VALUE_TYPE_A(BNX2X_HW_CID(cp, BNX2X_ISCSI_L2_CID), |
3935 | CDU_REGION_NUMBER_XCM_AG, | 3933 | CDU_REGION_NUMBER_XCM_AG, |
3936 | ETH_CONNECTION_TYPE); | 3934 | ETH_CONNECTION_TYPE); |
3937 | 3935 | ||
@@ -3959,7 +3957,6 @@ static void cnic_init_bnx2x_rx_ring(struct cnic_dev *dev) | |||
3959 | struct regpair context_addr; | 3957 | struct regpair context_addr; |
3960 | int i; | 3958 | int i; |
3961 | int port = CNIC_PORT(cp); | 3959 | int port = CNIC_PORT(cp); |
3962 | int func = CNIC_FUNC(cp); | ||
3963 | int cli = BNX2X_ISCSI_CL_ID(CNIC_E1HVN(cp)); | 3960 | int cli = BNX2X_ISCSI_CL_ID(CNIC_E1HVN(cp)); |
3964 | u32 val; | 3961 | u32 val; |
3965 | struct tstorm_eth_client_config tstorm_client = {0}; | 3962 | struct tstorm_eth_client_config tstorm_client = {0}; |
@@ -3998,7 +3995,7 @@ static void cnic_init_bnx2x_rx_ring(struct cnic_dev *dev) | |||
3998 | cp->l2_single_buf_size; | 3995 | cp->l2_single_buf_size; |
3999 | 3996 | ||
4000 | context->ustorm_ag_context.cdu_usage = | 3997 | context->ustorm_ag_context.cdu_usage = |
4001 | CDU_RSRVD_VALUE_TYPE_A(BNX2X_HW_CID(BNX2X_ISCSI_L2_CID, func), | 3998 | CDU_RSRVD_VALUE_TYPE_A(BNX2X_HW_CID(cp, BNX2X_ISCSI_L2_CID), |
4002 | CDU_REGION_NUMBER_UCM_AG, | 3999 | CDU_REGION_NUMBER_UCM_AG, |
4003 | ETH_CONNECTION_TYPE); | 4000 | ETH_CONNECTION_TYPE); |
4004 | 4001 | ||