aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/cnic.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/cnic.c')
-rw-r--r--drivers/net/cnic.c33
1 files changed, 12 insertions, 21 deletions
diff --git a/drivers/net/cnic.c b/drivers/net/cnic.c
index aa5016ad9e19..263a2944566f 100644
--- a/drivers/net/cnic.c
+++ b/drivers/net/cnic.c
@@ -1290,12 +1290,18 @@ static int cnic_submit_kwqe_16(struct cnic_dev *dev, u32 cmd, u32 cid,
1290 struct cnic_local *cp = dev->cnic_priv; 1290 struct cnic_local *cp = dev->cnic_priv;
1291 struct l5cm_spe kwqe; 1291 struct l5cm_spe kwqe;
1292 struct kwqe_16 *kwq[1]; 1292 struct kwqe_16 *kwq[1];
1293 u16 type_16;
1293 int ret; 1294 int ret;
1294 1295
1295 kwqe.hdr.conn_and_cmd_data = 1296 kwqe.hdr.conn_and_cmd_data =
1296 cpu_to_le32(((cmd << SPE_HDR_CMD_ID_SHIFT) | 1297 cpu_to_le32(((cmd << SPE_HDR_CMD_ID_SHIFT) |
1297 BNX2X_HW_CID(cp, cid))); 1298 BNX2X_HW_CID(cp, cid)));
1298 kwqe.hdr.type = cpu_to_le16(type); 1299
1300 type_16 = (type << SPE_HDR_CONN_TYPE_SHIFT) & SPE_HDR_CONN_TYPE;
1301 type_16 |= (cp->pfid << SPE_HDR_FUNCTION_ID_SHIFT) &
1302 SPE_HDR_FUNCTION_ID;
1303
1304 kwqe.hdr.type = cpu_to_le16(type_16);
1299 kwqe.hdr.reserved1 = 0; 1305 kwqe.hdr.reserved1 = 0;
1300 kwqe.data.phy_address.lo = cpu_to_le32(l5_data->phy_address.lo); 1306 kwqe.data.phy_address.lo = cpu_to_le32(l5_data->phy_address.lo);
1301 kwqe.data.phy_address.hi = cpu_to_le32(l5_data->phy_address.hi); 1307 kwqe.data.phy_address.hi = cpu_to_le32(l5_data->phy_address.hi);
@@ -1819,19 +1825,15 @@ static int cnic_bnx2x_destroy_ramrod(struct cnic_dev *dev, u32 l5_cid)
1819 struct cnic_context *ctx = &cp->ctx_tbl[l5_cid]; 1825 struct cnic_context *ctx = &cp->ctx_tbl[l5_cid];
1820 union l5cm_specific_data l5_data; 1826 union l5cm_specific_data l5_data;
1821 int ret; 1827 int ret;
1822 u32 hw_cid, type; 1828 u32 hw_cid;
1823 1829
1824 init_waitqueue_head(&ctx->waitq); 1830 init_waitqueue_head(&ctx->waitq);
1825 ctx->wait_cond = 0; 1831 ctx->wait_cond = 0;
1826 memset(&l5_data, 0, sizeof(l5_data)); 1832 memset(&l5_data, 0, sizeof(l5_data));
1827 hw_cid = BNX2X_HW_CID(cp, ctx->cid); 1833 hw_cid = BNX2X_HW_CID(cp, ctx->cid);
1828 type = (NONE_CONNECTION_TYPE << SPE_HDR_CONN_TYPE_SHIFT)
1829 & SPE_HDR_CONN_TYPE;
1830 type |= ((cp->pfid << SPE_HDR_FUNCTION_ID_SHIFT) &
1831 SPE_HDR_FUNCTION_ID);
1832 1834
1833 ret = cnic_submit_kwqe_16(dev, RAMROD_CMD_ID_COMMON_CFC_DEL, 1835 ret = cnic_submit_kwqe_16(dev, RAMROD_CMD_ID_COMMON_CFC_DEL,
1834 hw_cid, type, &l5_data); 1836 hw_cid, NONE_CONNECTION_TYPE, &l5_data);
1835 1837
1836 if (ret == 0) 1838 if (ret == 0)
1837 wait_event(ctx->waitq, ctx->wait_cond); 1839 wait_event(ctx->waitq, ctx->wait_cond);
@@ -2204,7 +2206,6 @@ static int cnic_bnx2x_fcoe_init1(struct cnic_dev *dev, struct kwqe *wqes[],
2204 cp->kcq2.sw_prod_idx = 0; 2206 cp->kcq2.sw_prod_idx = 0;
2205 2207
2206 cid = BNX2X_HW_CID(cp, cp->fcoe_init_cid); 2208 cid = BNX2X_HW_CID(cp, cp->fcoe_init_cid);
2207 printk(KERN_ERR "bdbg: submitting INIT RAMROD \n");
2208 ret = cnic_submit_kwqe_16(dev, FCOE_RAMROD_CMD_ID_INIT, cid, 2209 ret = cnic_submit_kwqe_16(dev, FCOE_RAMROD_CMD_ID_INIT, cid,
2209 FCOE_CONNECTION_TYPE, &l5_data); 2210 FCOE_CONNECTION_TYPE, &l5_data);
2210 *work = 3; 2211 *work = 3;
@@ -4977,7 +4978,7 @@ static void cnic_init_rings(struct cnic_dev *dev)
4977 } else if (test_bit(CNIC_F_BNX2X_CLASS, &dev->flags)) { 4978 } else if (test_bit(CNIC_F_BNX2X_CLASS, &dev->flags)) {
4978 u32 cli = cp->ethdev->iscsi_l2_client_id; 4979 u32 cli = cp->ethdev->iscsi_l2_client_id;
4979 u32 cid = cp->ethdev->iscsi_l2_cid; 4980 u32 cid = cp->ethdev->iscsi_l2_cid;
4980 u32 cl_qzone_id, type; 4981 u32 cl_qzone_id;
4981 struct client_init_ramrod_data *data; 4982 struct client_init_ramrod_data *data;
4982 union l5cm_specific_data l5_data; 4983 union l5cm_specific_data l5_data;
4983 struct ustorm_eth_rx_producers rx_prods = {0}; 4984 struct ustorm_eth_rx_producers rx_prods = {0};
@@ -5009,15 +5010,10 @@ static void cnic_init_rings(struct cnic_dev *dev)
5009 l5_data.phy_address.lo = udev->l2_buf_map & 0xffffffff; 5010 l5_data.phy_address.lo = udev->l2_buf_map & 0xffffffff;
5010 l5_data.phy_address.hi = (u64) udev->l2_buf_map >> 32; 5011 l5_data.phy_address.hi = (u64) udev->l2_buf_map >> 32;
5011 5012
5012 type = (ETH_CONNECTION_TYPE << SPE_HDR_CONN_TYPE_SHIFT)
5013 & SPE_HDR_CONN_TYPE;
5014 type |= ((cp->pfid << SPE_HDR_FUNCTION_ID_SHIFT) &
5015 SPE_HDR_FUNCTION_ID);
5016
5017 set_bit(CNIC_LCL_FL_RINGS_INITED, &cp->cnic_local_flags); 5013 set_bit(CNIC_LCL_FL_RINGS_INITED, &cp->cnic_local_flags);
5018 5014
5019 cnic_submit_kwqe_16(dev, RAMROD_CMD_ID_ETH_CLIENT_SETUP, 5015 cnic_submit_kwqe_16(dev, RAMROD_CMD_ID_ETH_CLIENT_SETUP,
5020 cid, type, &l5_data); 5016 cid, ETH_CONNECTION_TYPE, &l5_data);
5021 5017
5022 i = 0; 5018 i = 0;
5023 while (test_bit(CNIC_LCL_FL_L2_WAIT, &cp->cnic_local_flags) && 5019 while (test_bit(CNIC_LCL_FL_L2_WAIT, &cp->cnic_local_flags) &&
@@ -5047,7 +5043,6 @@ static void cnic_shutdown_rings(struct cnic_dev *dev)
5047 u32 cid = cp->ethdev->iscsi_l2_cid; 5043 u32 cid = cp->ethdev->iscsi_l2_cid;
5048 union l5cm_specific_data l5_data; 5044 union l5cm_specific_data l5_data;
5049 int i; 5045 int i;
5050 u32 type;
5051 5046
5052 cnic_ring_ctl(dev, cid, cli, 0); 5047 cnic_ring_ctl(dev, cid, cli, 0);
5053 5048
@@ -5068,12 +5063,8 @@ static void cnic_shutdown_rings(struct cnic_dev *dev)
5068 cnic_spq_completion(dev, DRV_CTL_RET_L2_SPQ_CREDIT_CMD, 1); 5063 cnic_spq_completion(dev, DRV_CTL_RET_L2_SPQ_CREDIT_CMD, 1);
5069 5064
5070 memset(&l5_data, 0, sizeof(l5_data)); 5065 memset(&l5_data, 0, sizeof(l5_data));
5071 type = (NONE_CONNECTION_TYPE << SPE_HDR_CONN_TYPE_SHIFT)
5072 & SPE_HDR_CONN_TYPE;
5073 type |= ((cp->pfid << SPE_HDR_FUNCTION_ID_SHIFT) &
5074 SPE_HDR_FUNCTION_ID);
5075 cnic_submit_kwqe_16(dev, RAMROD_CMD_ID_COMMON_CFC_DEL, 5066 cnic_submit_kwqe_16(dev, RAMROD_CMD_ID_COMMON_CFC_DEL,
5076 cid, type, &l5_data); 5067 cid, NONE_CONNECTION_TYPE, &l5_data);
5077 msleep(10); 5068 msleep(10);
5078 } 5069 }
5079 clear_bit(CNIC_LCL_FL_RINGS_INITED, &cp->cnic_local_flags); 5070 clear_bit(CNIC_LCL_FL_RINGS_INITED, &cp->cnic_local_flags);