Lines Matching defs:bnx2i_conn

231  * @bnx2i_conn:	pointer to iscsi connection
239 struct bnx2i_conn *bnx2i_conn,
243 iscsi_conn_printk(KERN_ALERT, bnx2i_conn->cls_conn->dd_data,
248 hba->cid_que.conn_cid_tbl[iscsi_cid] = bnx2i_conn;
258 struct bnx2i_conn *bnx2i_get_conn_from_id(struct bnx2i_hba *hba,
336 mem_size = hba->max_active_conns * sizeof(struct bnx2i_conn *);
930 * @bnx2i_conn: iscsi connection pointer
935 struct bnx2i_conn *bnx2i_conn)
937 if (bnx2i_conn->gen_pdu.resp_bd_tbl) {
939 bnx2i_conn->gen_pdu.resp_bd_tbl,
940 bnx2i_conn->gen_pdu.resp_bd_dma);
941 bnx2i_conn->gen_pdu.resp_bd_tbl = NULL;
944 if (bnx2i_conn->gen_pdu.req_bd_tbl) {
946 bnx2i_conn->gen_pdu.req_bd_tbl,
947 bnx2i_conn->gen_pdu.req_bd_dma);
948 bnx2i_conn->gen_pdu.req_bd_tbl = NULL;
951 if (bnx2i_conn->gen_pdu.resp_buf) {
954 bnx2i_conn->gen_pdu.resp_buf,
955 bnx2i_conn->gen_pdu.resp_dma_addr);
956 bnx2i_conn->gen_pdu.resp_buf = NULL;
959 if (bnx2i_conn->gen_pdu.req_buf) {
962 bnx2i_conn->gen_pdu.req_buf,
963 bnx2i_conn->gen_pdu.req_dma_addr);
964 bnx2i_conn->gen_pdu.req_buf = NULL;
971 * @bnx2i_conn: iscsi connection pointer
976 struct bnx2i_conn *bnx2i_conn)
979 bnx2i_conn->gen_pdu.req_buf =
982 &bnx2i_conn->gen_pdu.req_dma_addr,
984 if (bnx2i_conn->gen_pdu.req_buf == NULL)
987 bnx2i_conn->gen_pdu.req_buf_size = 0;
988 bnx2i_conn->gen_pdu.req_wr_ptr = bnx2i_conn->gen_pdu.req_buf;
990 bnx2i_conn->gen_pdu.resp_buf =
993 &bnx2i_conn->gen_pdu.resp_dma_addr,
995 if (bnx2i_conn->gen_pdu.resp_buf == NULL)
998 bnx2i_conn->gen_pdu.resp_buf_size = ISCSI_DEF_MAX_RECV_SEG_LEN;
999 bnx2i_conn->gen_pdu.resp_wr_ptr = bnx2i_conn->gen_pdu.resp_buf;
1001 bnx2i_conn->gen_pdu.req_bd_tbl =
1003 &bnx2i_conn->gen_pdu.req_bd_dma, GFP_KERNEL);
1004 if (bnx2i_conn->gen_pdu.req_bd_tbl == NULL)
1007 bnx2i_conn->gen_pdu.resp_bd_tbl =
1009 &bnx2i_conn->gen_pdu.resp_bd_dma,
1011 if (bnx2i_conn->gen_pdu.resp_bd_tbl == NULL)
1018 bnx2i_conn->gen_pdu.req_bd_tbl,
1019 bnx2i_conn->gen_pdu.req_bd_dma);
1020 bnx2i_conn->gen_pdu.req_bd_tbl = NULL;
1024 bnx2i_conn->gen_pdu.resp_buf,
1025 bnx2i_conn->gen_pdu.resp_dma_addr);
1026 bnx2i_conn->gen_pdu.resp_buf = NULL;
1029 bnx2i_conn->gen_pdu.req_buf,
1030 bnx2i_conn->gen_pdu.req_dma_addr);
1031 bnx2i_conn->gen_pdu.req_buf = NULL;
1033 iscsi_conn_printk(KERN_ERR, bnx2i_conn->cls_conn->dd_data,
1042 * @bnx2i_conn: iscsi connection pointer
1047 static void bnx2i_iscsi_prep_generic_pdu_bd(struct bnx2i_conn *bnx2i_conn)
1051 bd_tbl = (struct iscsi_bd *) bnx2i_conn->gen_pdu.req_bd_tbl;
1054 (u32) ((u64) bnx2i_conn->gen_pdu.req_dma_addr >> 32);
1055 bd_tbl->buffer_addr_lo = (u32) bnx2i_conn->gen_pdu.req_dma_addr;
1056 bd_tbl->buffer_length = bnx2i_conn->gen_pdu.req_wr_ptr -
1057 bnx2i_conn->gen_pdu.req_buf;
1062 bd_tbl = (struct iscsi_bd *) bnx2i_conn->gen_pdu.resp_bd_tbl;
1063 bd_tbl->buffer_addr_hi = (u64) bnx2i_conn->gen_pdu.resp_dma_addr >> 32;
1064 bd_tbl->buffer_addr_lo = (u32) bnx2i_conn->gen_pdu.resp_dma_addr;
1082 struct bnx2i_conn *bnx2i_conn = cmd->conn;
1087 bnx2i_iscsi_prep_generic_pdu_bd(bnx2i_conn);
1090 bnx2i_send_iscsi_login(bnx2i_conn, task);
1093 data_len = bnx2i_conn->gen_pdu.req_buf_size;
1094 buf = bnx2i_conn->gen_pdu.req_buf;
1096 rc = bnx2i_send_iscsi_nopout(bnx2i_conn, task,
1099 rc = bnx2i_send_iscsi_nopout(bnx2i_conn, task,
1103 rc = bnx2i_send_iscsi_logout(bnx2i_conn, task);
1106 rc = bnx2i_send_iscsi_tmf(bnx2i_conn, task);
1109 rc = bnx2i_send_iscsi_text(bnx2i_conn, task);
1112 iscsi_conn_printk(KERN_ALERT, bnx2i_conn->cls_conn->dd_data,
1159 struct bnx2i_conn *bnx2i_conn = conn->dd_data;
1160 struct bnx2i_hba *hba = bnx2i_conn->hba;
1174 wait_for_completion_timeout(&bnx2i_conn->cmd_cleanup_cmpl,
1189 struct bnx2i_conn *bnx2i_conn = conn->dd_data;
1190 struct bnx2i_hba *hba = bnx2i_conn->hba;
1193 memset(bnx2i_conn->gen_pdu.req_buf, 0, ISCSI_DEF_MAX_RECV_SEG_LEN);
1196 bnx2i_conn->gen_pdu.req_buf_size = task->data_count;
1203 memcpy(bnx2i_conn->gen_pdu.req_buf, task->data,
1205 bnx2i_conn->gen_pdu.req_wr_ptr =
1206 bnx2i_conn->gen_pdu.req_buf + task->data_count;
1225 struct bnx2i_conn *bnx2i_conn = conn->dd_data;
1230 if (atomic_read(&bnx2i_conn->ep->num_active_cmds) + 1 >
1242 cmd->conn = bnx2i_conn;
1270 bnx2i_send_iscsi_scsicmd(bnx2i_conn, cmd);
1359 struct bnx2i_conn *bnx2i_conn;
1363 cls_conn = iscsi_conn_setup(cls_session, sizeof(*bnx2i_conn),
1369 bnx2i_conn = conn->dd_data;
1370 bnx2i_conn->cls_conn = cls_conn;
1371 bnx2i_conn->hba = hba;
1373 atomic_set(&bnx2i_conn->work_cnt, 0);
1376 bnx2i_conn->ep = NULL;
1377 init_completion(&bnx2i_conn->cmd_cleanup_cmpl);
1379 if (bnx2i_conn_alloc_login_resources(hba, bnx2i_conn)) {
1409 struct bnx2i_conn *bnx2i_conn = conn->dd_data;
1453 bnx2i_ep->conn = bnx2i_conn;
1454 bnx2i_conn->ep = bnx2i_ep;
1455 bnx2i_conn->iscsi_conn_cid = bnx2i_ep->ep_iscsi_cid;
1456 bnx2i_conn->fw_cid = bnx2i_ep->ep_cid;
1458 ret_code = bnx2i_bind_conn_to_iscsi_cid(hba, bnx2i_conn,
1465 bnx2i_put_rq_buf(bnx2i_conn, 0);
1467 bnx2i_arm_cq_event_coalescing(bnx2i_conn->ep, CNIC_ARM_CQE);
1484 struct bnx2i_conn *bnx2i_conn = conn->dd_data;
1494 bnx2i_conn_free_login_resources(hba, bnx2i_conn);
1496 if (atomic_read(&bnx2i_conn->work_cnt)) {
1503 work->bnx2i_conn == bnx2i_conn) {
1507 &bnx2i_conn->work_cnt))
1611 struct bnx2i_conn *bnx2i_conn = conn->dd_data;
1613 bnx2i_conn->ep->state = EP_STATE_ULP_UPDATE_START;
1620 timer_setup(&bnx2i_conn->ep->ofld_timer, bnx2i_ep_ofld_timer, 0);
1621 bnx2i_conn->ep->ofld_timer.expires = 1 * HZ + jiffies;
1622 add_timer(&bnx2i_conn->ep->ofld_timer);
1624 wait_event_interruptible(bnx2i_conn->ep->ofld_wait,
1625 bnx2i_conn->ep->state != EP_STATE_ULP_UPDATE_START);
1629 del_timer_sync(&bnx2i_conn->ep->ofld_timer);
2124 struct bnx2i_conn *bnx2i_conn = NULL;
2138 bnx2i_conn = bnx2i_ep->conn;
2163 if (bnx2i_conn)
2164 bnx2i_conn->ep = NULL;