aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/cnic.c21
-rw-r--r--drivers/net/cnic.h5
2 files changed, 12 insertions, 14 deletions
diff --git a/drivers/net/cnic.c b/drivers/net/cnic.c
index 9f80fb40380a..9bd133d3a5aa 100644
--- a/drivers/net/cnic.c
+++ b/drivers/net/cnic.c
@@ -4119,7 +4119,7 @@ static void cnic_init_bnx2x_tx_ring(struct cnic_dev *dev,
4119 struct host_sp_status_block *sb = cp->bnx2x_def_status_blk; 4119 struct host_sp_status_block *sb = cp->bnx2x_def_status_blk;
4120 int port = CNIC_PORT(cp); 4120 int port = CNIC_PORT(cp);
4121 int i; 4121 int i;
4122 int cli = BNX2X_ISCSI_CL_ID(CNIC_E1HVN(cp)); 4122 u32 cli = cp->ethdev->iscsi_l2_client_id;
4123 u32 val; 4123 u32 val;
4124 4124
4125 memset(txbd, 0, BCM_PAGE_SIZE); 4125 memset(txbd, 0, BCM_PAGE_SIZE);
@@ -4180,7 +4180,7 @@ static void cnic_init_bnx2x_rx_ring(struct cnic_dev *dev,
4180 struct host_sp_status_block *sb = cp->bnx2x_def_status_blk; 4180 struct host_sp_status_block *sb = cp->bnx2x_def_status_blk;
4181 int i; 4181 int i;
4182 int port = CNIC_PORT(cp); 4182 int port = CNIC_PORT(cp);
4183 int cli = BNX2X_ISCSI_CL_ID(CNIC_E1HVN(cp)); 4183 u32 cli = cp->ethdev->iscsi_l2_client_id;
4184 int cl_qzone_id = BNX2X_CL_QZONE_ID(cp, cli); 4184 int cl_qzone_id = BNX2X_CL_QZONE_ID(cp, cli);
4185 u32 val; 4185 u32 val;
4186 dma_addr_t ring_map = udev->l2_ring_map; 4186 dma_addr_t ring_map = udev->l2_ring_map;
@@ -4244,6 +4244,7 @@ static void cnic_init_bnx2x_rx_ring(struct cnic_dev *dev,
4244 4244
4245 cp->rx_cons_ptr = 4245 cp->rx_cons_ptr =
4246 &sb->sp_sb.index_values[HC_SP_INDEX_ETH_ISCSI_RX_CQ_CONS]; 4246 &sb->sp_sb.index_values[HC_SP_INDEX_ETH_ISCSI_RX_CQ_CONS];
4247 cp->rx_cons = *cp->rx_cons_ptr;
4247} 4248}
4248 4249
4249static void cnic_get_bnx2x_iscsi_info(struct cnic_dev *dev) 4250static void cnic_get_bnx2x_iscsi_info(struct cnic_dev *dev)
@@ -4437,7 +4438,8 @@ static void cnic_init_rings(struct cnic_dev *dev)
4437 cnic_init_bnx2_rx_ring(dev); 4438 cnic_init_bnx2_rx_ring(dev);
4438 set_bit(CNIC_LCL_FL_RINGS_INITED, &cp->cnic_local_flags); 4439 set_bit(CNIC_LCL_FL_RINGS_INITED, &cp->cnic_local_flags);
4439 } else if (test_bit(CNIC_F_BNX2X_CLASS, &dev->flags)) { 4440 } else if (test_bit(CNIC_F_BNX2X_CLASS, &dev->flags)) {
4440 u32 cli = BNX2X_ISCSI_CL_ID(CNIC_E1HVN(cp)); 4441 u32 cli = cp->ethdev->iscsi_l2_client_id;
4442 u32 cid = cp->ethdev->iscsi_l2_cid;
4441 u32 cl_qzone_id, type; 4443 u32 cl_qzone_id, type;
4442 struct client_init_ramrod_data *data; 4444 struct client_init_ramrod_data *data;
4443 union l5cm_specific_data l5_data; 4445 union l5cm_specific_data l5_data;
@@ -4478,7 +4480,7 @@ static void cnic_init_rings(struct cnic_dev *dev)
4478 set_bit(CNIC_LCL_FL_RINGS_INITED, &cp->cnic_local_flags); 4480 set_bit(CNIC_LCL_FL_RINGS_INITED, &cp->cnic_local_flags);
4479 4481
4480 cnic_submit_kwqe_16(dev, RAMROD_CMD_ID_ETH_CLIENT_SETUP, 4482 cnic_submit_kwqe_16(dev, RAMROD_CMD_ID_ETH_CLIENT_SETUP,
4481 BNX2X_ISCSI_L2_CID, type, &l5_data); 4483 cid, type, &l5_data);
4482 4484
4483 i = 0; 4485 i = 0;
4484 while (test_bit(CNIC_LCL_FL_L2_WAIT, &cp->cnic_local_flags) && 4486 while (test_bit(CNIC_LCL_FL_L2_WAIT, &cp->cnic_local_flags) &&
@@ -4489,7 +4491,7 @@ static void cnic_init_rings(struct cnic_dev *dev)
4489 netdev_err(dev->netdev, 4491 netdev_err(dev->netdev,
4490 "iSCSI CLIENT_SETUP did not complete\n"); 4492 "iSCSI CLIENT_SETUP did not complete\n");
4491 cnic_spq_completion(dev, DRV_CTL_RET_L2_SPQ_CREDIT_CMD, 1); 4493 cnic_spq_completion(dev, DRV_CTL_RET_L2_SPQ_CREDIT_CMD, 1);
4492 cnic_ring_ctl(dev, BNX2X_ISCSI_L2_CID, cli, 1); 4494 cnic_ring_ctl(dev, cid, cli, 1);
4493 } 4495 }
4494} 4496}
4495 4497
@@ -4504,19 +4506,20 @@ static void cnic_shutdown_rings(struct cnic_dev *dev)
4504 cnic_shutdown_bnx2_rx_ring(dev); 4506 cnic_shutdown_bnx2_rx_ring(dev);
4505 } else if (test_bit(CNIC_F_BNX2X_CLASS, &dev->flags)) { 4507 } else if (test_bit(CNIC_F_BNX2X_CLASS, &dev->flags)) {
4506 struct cnic_local *cp = dev->cnic_priv; 4508 struct cnic_local *cp = dev->cnic_priv;
4507 u32 cli = BNX2X_ISCSI_CL_ID(CNIC_E1HVN(cp)); 4509 u32 cli = cp->ethdev->iscsi_l2_client_id;
4510 u32 cid = cp->ethdev->iscsi_l2_cid;
4508 union l5cm_specific_data l5_data; 4511 union l5cm_specific_data l5_data;
4509 int i; 4512 int i;
4510 u32 type; 4513 u32 type;
4511 4514
4512 cnic_ring_ctl(dev, BNX2X_ISCSI_L2_CID, cli, 0); 4515 cnic_ring_ctl(dev, cid, cli, 0);
4513 4516
4514 set_bit(CNIC_LCL_FL_L2_WAIT, &cp->cnic_local_flags); 4517 set_bit(CNIC_LCL_FL_L2_WAIT, &cp->cnic_local_flags);
4515 4518
4516 l5_data.phy_address.lo = cli; 4519 l5_data.phy_address.lo = cli;
4517 l5_data.phy_address.hi = 0; 4520 l5_data.phy_address.hi = 0;
4518 cnic_submit_kwqe_16(dev, RAMROD_CMD_ID_ETH_HALT, 4521 cnic_submit_kwqe_16(dev, RAMROD_CMD_ID_ETH_HALT,
4519 BNX2X_ISCSI_L2_CID, ETH_CONNECTION_TYPE, &l5_data); 4522 cid, ETH_CONNECTION_TYPE, &l5_data);
4520 i = 0; 4523 i = 0;
4521 while (test_bit(CNIC_LCL_FL_L2_WAIT, &cp->cnic_local_flags) && 4524 while (test_bit(CNIC_LCL_FL_L2_WAIT, &cp->cnic_local_flags) &&
4522 ++i < 10) 4525 ++i < 10)
@@ -4533,7 +4536,7 @@ static void cnic_shutdown_rings(struct cnic_dev *dev)
4533 type |= ((cp->pfid << SPE_HDR_FUNCTION_ID_SHIFT) & 4536 type |= ((cp->pfid << SPE_HDR_FUNCTION_ID_SHIFT) &
4534 SPE_HDR_FUNCTION_ID); 4537 SPE_HDR_FUNCTION_ID);
4535 cnic_submit_kwqe_16(dev, RAMROD_CMD_ID_COMMON_CFC_DEL, 4538 cnic_submit_kwqe_16(dev, RAMROD_CMD_ID_COMMON_CFC_DEL,
4536 BNX2X_ISCSI_L2_CID, type, &l5_data); 4539 cid, type, &l5_data);
4537 msleep(10); 4540 msleep(10);
4538 } 4541 }
4539 clear_bit(CNIC_LCL_FL_RINGS_INITED, &cp->cnic_local_flags); 4542 clear_bit(CNIC_LCL_FL_RINGS_INITED, &cp->cnic_local_flags);
diff --git a/drivers/net/cnic.h b/drivers/net/cnic.h
index bf38e5788d3f..8e947b7e0700 100644
--- a/drivers/net/cnic.h
+++ b/drivers/net/cnic.h
@@ -356,11 +356,6 @@ struct bnx2x_bd_chain_next {
356#define BNX2X_CONTEXT_MEM_SIZE 1024 356#define BNX2X_CONTEXT_MEM_SIZE 1024
357#define BNX2X_FCOE_CID 16 357#define BNX2X_FCOE_CID 16
358 358
359/* iSCSI client IDs are 17, 19, 21, 23 */
360#define BNX2X_ISCSI_BASE_CL_ID 17
361#define BNX2X_ISCSI_CL_ID(vn) (BNX2X_ISCSI_BASE_CL_ID + ((vn) << 1))
362
363#define BNX2X_ISCSI_L2_CID 17
364#define BNX2X_ISCSI_START_CID 18 359#define BNX2X_ISCSI_START_CID 18
365#define BNX2X_ISCSI_NUM_CONNECTIONS 128 360#define BNX2X_ISCSI_NUM_CONNECTIONS 128
366#define BNX2X_ISCSI_TASK_CONTEXT_SIZE 128 361#define BNX2X_ISCSI_TASK_CONTEXT_SIZE 128