Lines Matching refs:ep

374  * bnx2i_alloc_ep - allocates ep structure from global pool
383 struct iscsi_endpoint *ep;
387 ep = iscsi_create_endpoint(sizeof(*bnx2i_ep));
388 if (!ep) {
389 printk(KERN_ERR "bnx2i: Could not allocate ep\n");
393 bnx2i_ep = ep->dd_data;
394 bnx2i_ep->cls_ep = ep;
407 return ep;
413 * @ep: pointer to iscsi endpoint structure
415 static void bnx2i_free_ep(struct iscsi_endpoint *ep)
417 struct bnx2i_endpoint *bnx2i_ep = ep->dd_data;
428 bnx2i_ep->conn->ep = NULL;
434 iscsi_destroy_endpoint(ep);
600 * @ep: pointer to endpoint (transport identifier) structure
605 struct bnx2i_endpoint *ep)
608 list_add_tail(&ep->link, &hba->ep_destroy_list);
617 * @ep: pointer to endpoint (transport identifier) structure
622 struct bnx2i_endpoint *ep)
625 list_del_init(&ep->link);
632 * bnx2i_ep_ofld_list_add - add an entry to ep offload pending list
634 * @ep: pointer to endpoint (transport identifier) structure
639 struct bnx2i_endpoint *ep)
642 list_add_tail(&ep->link, &hba->ep_ofld_list);
648 * bnx2i_ep_ofld_list_del - add an entry to ep offload pending list
650 * @ep: pointer to endpoint (transport identifier) structure
655 struct bnx2i_endpoint *ep)
658 list_del_init(&ep->link);
676 struct bnx2i_endpoint *ep = NULL;
680 ep = (struct bnx2i_endpoint *)list;
682 if (ep->ep_iscsi_cid == iscsi_cid)
684 ep = NULL;
688 if (!ep)
690 return ep;
704 struct bnx2i_endpoint *ep = NULL;
708 ep = (struct bnx2i_endpoint *)list;
710 if (ep->ep_iscsi_cid == iscsi_cid)
712 ep = NULL;
716 if (!ep)
719 return ep;
723 * bnx2i_ep_active_list_add - add an entry to ep active list
725 * @ep: pointer to endpoint (transport identifier) structure
730 struct bnx2i_endpoint *ep)
733 list_add_tail(&ep->link, &hba->ep_active_list);
739 * bnx2i_ep_active_list_del - deletes an entry to ep active list
741 * @ep: pointer to endpoint (transport identifier) structure
746 struct bnx2i_endpoint *ep)
749 list_del_init(&ep->link);
1230 if (atomic_read(&bnx2i_conn->ep->num_active_cmds) + 1 >
1276 * @ep: pointer to iscsi endpoint
1284 bnx2i_session_create(struct iscsi_endpoint *ep,
1293 if (!ep) {
1294 printk(KERN_ERR "bnx2i: missing ep.\n");
1298 bnx2i_ep = ep->dd_data;
1375 /* 'ep' ptr will be assigned in bind() call */
1376 bnx2i_conn->ep = NULL;
1393 * bnx2i_conn_bind - binds iscsi sess, conn and ep objects together
1413 struct iscsi_endpoint *ep;
1416 ep = iscsi_lookup_endpoint(transport_fd);
1417 if (!ep)
1428 bnx2i_ep = ep->dd_data;
1445 "conn bind, ep=0x%p (%s) does not",
1454 bnx2i_conn->ep = bnx2i_ep;
1467 bnx2i_arm_cq_event_coalescing(bnx2i_conn->ep, CNIC_ARM_CQE);
1469 iscsi_put_endpoint(ep);
1520 * bnx2i_ep_get_param - return iscsi ep parameter to caller
1521 * @ep: pointer to iscsi endpoint
1525 * returns iSCSI ep parameters
1527 static int bnx2i_ep_get_param(struct iscsi_endpoint *ep,
1530 struct bnx2i_endpoint *bnx2i_ep = ep->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);
1707 * @ep: endpoint (transport identifier) structure
1712 struct bnx2i_endpoint *ep)
1714 if (test_bit(BNX2I_CNIC_REGISTERED, &hba->reg_with_cnic) && ep->cm_sk)
1715 hba->cnic->cm_destroy(ep->cm_sk);
1718 ep->state == EP_STATE_DISCONN_TIMEDOUT) {
1719 if (ep->conn && ep->conn->cls_conn &&
1720 ep->conn->cls_conn->dd_data) {
1721 struct iscsi_conn *conn = ep->conn->cls_conn->dd_data;
1723 /* Must suspend all rx queue activity for this ep */
1736 ep->state = EP_STATE_CLEANUP_START;
1737 timer_setup(&ep->ofld_timer, bnx2i_ep_ofld_timer, 0);
1738 ep->ofld_timer.expires = hba->conn_ctx_destroy_tmo + jiffies;
1739 add_timer(&ep->ofld_timer);
1741 bnx2i_ep_destroy_list_add(hba, ep);
1744 if (bnx2i_send_conn_destroy(hba, ep))
1745 ep->state = EP_STATE_CLEANUP_CMPL;
1747 wait_event_interruptible(ep->ofld_wait,
1748 (ep->state != EP_STATE_CLEANUP_START));
1752 del_timer_sync(&ep->ofld_timer);
1754 bnx2i_ep_destroy_list_del(hba, ep);
1756 if (ep->state != EP_STATE_CLEANUP_CMPL)
1787 struct iscsi_endpoint *ep;
1811 ep = bnx2i_alloc_ep(hba);
1812 if (!ep) {
1816 bnx2i_ep = ep->dd_data;
1824 bnx2i_free_ep(ep);
1918 return ep;
1930 bnx2i_free_ep(ep);
1940 * @ep: TCP connection (endpoint) handle
1945 static int bnx2i_ep_poll(struct iscsi_endpoint *ep, int timeout_ms)
1950 bnx2i_ep = ep->dd_data;
2117 * @ep: TCP connection (iscsi endpoint) handle
2121 static void bnx2i_ep_disconnect(struct iscsi_endpoint *ep)
2127 bnx2i_ep = ep->dd_data;
2164 bnx2i_conn->ep = NULL;
2166 bnx2i_free_ep(ep);