Lines Matching refs:cdev
187 struct cxgb4_lld_info *lldi = cxgbi_cdev_priv(csk->cdev); in send_act_open_req()
221 csk->cdev->ports[csk->port_id], in send_act_open_req()
246 csk->cdev->ports[csk->port_id], in send_act_open_req()
267 cxgb4_l2t_send(csk->cdev->ports[csk->port_id], skb, csk->l2t); in send_act_open_req()
274 struct cxgb4_lld_info *lldi = cxgbi_cdev_priv(csk->cdev); in send_act_open_req6()
319 csk->cdev->ports[csk->port_id], in send_act_open_req6()
342 csk->cdev->ports[csk->port_id], in send_act_open_req6()
354 cxgb4_l2t_send(csk->cdev->ports[csk->port_id], skb, csk->l2t); in send_act_open_req6()
388 cxgb4_ofld_send(csk->cdev->ports[csk->port_id], skb); in abort_arp_failure()
396 if (unlikely(csk->state == CTP_ABORTING) || !skb || !csk->cdev) in send_abort_req()
423 cxgb4_l2t_send(csk->cdev->ports[csk->port_id], skb, csk->l2t); in send_abort_req()
440 cxgb4_ofld_send(csk->cdev->ports[csk->port_id], skb); in send_abort_rpl()
470 cxgb4_ofld_send(csk->cdev->ports[csk->port_id], skb); in send_rx_credits()
542 flowc->mnemval[0].val = htonl(csk->cdev->pfvf); in send_tx_flowc_wr()
570 cxgb4_ofld_send(csk->cdev->ports[csk->port_id], skb); in send_tx_flowc_wr()
693 cxgb4_l2t_send(csk->cdev->ports[csk->port_id], skb, csk->l2t); in push_tx_frames()
700 struct cxgb4_lld_info *lldi = cxgbi_cdev_priv(csk->cdev); in free_atid()
709 static void do_act_establish(struct cxgbi_device *cdev, struct sk_buff *skb) in do_act_establish() argument
716 struct cxgb4_lld_info *lldi = cxgbi_cdev_priv(cdev); in do_act_establish()
722 pr_err("NO conn. for atid %u, cdev 0x%p.\n", atid, cdev); in do_act_establish()
810 struct cxgb4_lld_info *lldi = cxgbi_cdev_priv(csk->cdev); in csk_act_open_retry_timer()
861 static void do_act_open_rpl(struct cxgbi_device *cdev, struct sk_buff *skb) in do_act_open_rpl() argument
869 struct cxgb4_lld_info *lldi = cxgbi_cdev_priv(cdev); in do_act_open_rpl()
909 static void do_peer_close(struct cxgbi_device *cdev, struct sk_buff *skb) in do_peer_close() argument
914 struct cxgb4_lld_info *lldi = cxgbi_cdev_priv(cdev); in do_peer_close()
930 static void do_close_con_rpl(struct cxgbi_device *cdev, struct sk_buff *skb) in do_close_con_rpl() argument
935 struct cxgb4_lld_info *lldi = cxgbi_cdev_priv(cdev); in do_close_con_rpl()
969 static void do_abort_req_rss(struct cxgbi_device *cdev, struct sk_buff *skb) in do_abort_req_rss() argument
974 struct cxgb4_lld_info *lldi = cxgbi_cdev_priv(cdev); in do_abort_req_rss()
1017 static void do_abort_rpl_rss(struct cxgbi_device *cdev, struct sk_buff *skb) in do_abort_rpl_rss() argument
1022 struct cxgb4_lld_info *lldi = cxgbi_cdev_priv(cdev); in do_abort_rpl_rss()
1042 static void do_rx_data(struct cxgbi_device *cdev, struct sk_buff *skb) in do_rx_data() argument
1047 struct cxgb4_lld_info *lldi = cxgbi_cdev_priv(cdev); in do_rx_data()
1063 static void do_rx_iscsi_hdr(struct cxgbi_device *cdev, struct sk_buff *skb) in do_rx_iscsi_hdr() argument
1069 struct cxgb4_lld_info *lldi = cxgbi_cdev_priv(cdev); in do_rx_iscsi_hdr()
1167 static void do_rx_data_ddp(struct cxgbi_device *cdev, in do_rx_data_ddp() argument
1174 struct cxgb4_lld_info *lldi = cxgbi_cdev_priv(cdev); in do_rx_data_ddp()
1254 static void do_fw4_ack(struct cxgbi_device *cdev, struct sk_buff *skb) in do_fw4_ack() argument
1259 struct cxgb4_lld_info *lldi = cxgbi_cdev_priv(cdev); in do_fw4_ack()
1275 static void do_set_tcb_rpl(struct cxgbi_device *cdev, struct sk_buff *skb) in do_set_tcb_rpl() argument
1279 struct cxgb4_lld_info *lldi = cxgbi_cdev_priv(cdev); in do_set_tcb_rpl()
1334 struct net_device *ndev = csk->cdev->ports[csk->port_id]; in release_offload_resources()
1357 lldi = cxgbi_cdev_priv(csk->cdev); in release_offload_resources()
1363 csk->cdev = NULL; in release_offload_resources()
1368 struct cxgbi_device *cdev = csk->cdev; in init_act_open() local
1369 struct cxgb4_lld_info *lldi = cxgbi_cdev_priv(cdev); in init_act_open()
1370 struct net_device *ndev = cdev->ports[csk->port_id]; in init_act_open()
1522 int cxgb4i_ofld_init(struct cxgbi_device *cdev) in cxgb4i_ofld_init() argument
1529 rc = cxgbi_device_portmap_create(cdev, cxgb4i_sport_base, in cxgb4i_ofld_init()
1534 cdev->csk_release_offload_resources = release_offload_resources; in cxgb4i_ofld_init()
1535 cdev->csk_push_tx_frames = push_tx_frames; in cxgb4i_ofld_init()
1536 cdev->csk_send_abort_req = send_abort_req; in cxgb4i_ofld_init()
1537 cdev->csk_send_close_req = send_close_req; in cxgb4i_ofld_init()
1538 cdev->csk_send_rx_credits = send_rx_credits; in cxgb4i_ofld_init()
1539 cdev->csk_alloc_cpls = alloc_cpls; in cxgb4i_ofld_init()
1540 cdev->csk_init_act_open = init_act_open; in cxgb4i_ofld_init()
1542 pr_info("cdev 0x%p, offload up, added.\n", cdev); in cxgb4i_ofld_init()
1572 static int ddp_ppod_write_idata(struct cxgbi_device *cdev, unsigned int port_id, in ddp_ppod_write_idata() argument
1578 struct cxgbi_ddp_info *ddp = cdev->ddp; in ddp_ppod_write_idata()
1579 struct cxgb4_lld_info *lldi = cxgbi_cdev_priv(cdev); in ddp_ppod_write_idata()
1593 cdev, idx, npods); in ddp_ppod_write_idata()
1610 cxgb4_ofld_send(cdev->ports[port_id], skb); in ddp_ppod_write_idata()
1625 err = ddp_ppod_write_idata(csk->cdev, csk->port_id, hdr, in ddp_set_map()
1643 err = ddp_ppod_write_idata(chba->cdev, chba->port_id, NULL, in ddp_clear_map()
1676 cxgb4_ofld_send(csk->cdev->ports[csk->port_id], skb); in ddp_setup_conn_pgidx()
1709 cxgb4_ofld_send(csk->cdev->ports[csk->port_id], skb); in ddp_setup_conn_digest()
1713 static int cxgb4i_ddp_init(struct cxgbi_device *cdev) in cxgb4i_ddp_init() argument
1715 struct cxgb4_lld_info *lldi = cxgbi_cdev_priv(cdev); in cxgb4i_ddp_init()
1716 struct cxgbi_ddp_info *ddp = cdev->ddp; in cxgb4i_ddp_init()
1723 cdev, cdev->ddp); in cxgb4i_ddp_init()
1727 err = cxgbi_ddp_init(cdev, lldi->vr->iscsi.start, in cxgb4i_ddp_init()
1733 ddp = cdev->ddp; in cxgb4i_ddp_init()
1739 cdev->csk_ddp_setup_digest = ddp_setup_conn_digest; in cxgb4i_ddp_init()
1740 cdev->csk_ddp_setup_pgidx = ddp_setup_conn_pgidx; in cxgb4i_ddp_init()
1741 cdev->csk_ddp_set = ddp_set_map; in cxgb4i_ddp_init()
1742 cdev->csk_ddp_clear = ddp_clear_map; in cxgb4i_ddp_init()
1745 cdev, cdev->tag_format.sw_bits, cdev->tag_format.rsvd_bits, in cxgb4i_ddp_init()
1746 cdev->tag_format.rsvd_shift, cdev->tag_format.rsvd_mask); in cxgb4i_ddp_init()
1749 cdev, ddp->nppods, ddp->idx_bits, ddp->idx_mask, in cxgb4i_ddp_init()
1753 cdev, cdev->tx_max_size, ddp->max_txsz, cdev->rx_max_size, in cxgb4i_ddp_init()
1760 struct cxgbi_device *cdev; in t4_uld_add() local
1764 cdev = cxgbi_device_register(sizeof(*lldi), lldi->nports); in t4_uld_add()
1765 if (!cdev) { in t4_uld_add()
1770 cdev, lldi->adapter_type, lldi->nports, in t4_uld_add()
1776 cdev, i, lldi->rxq_ids[i]); in t4_uld_add()
1778 memcpy(cxgbi_cdev_priv(cdev), lldi, sizeof(*lldi)); in t4_uld_add()
1779 cdev->flags = CXGBI_FLAG_DEV_T4; in t4_uld_add()
1780 cdev->pdev = lldi->pdev; in t4_uld_add()
1781 cdev->ports = lldi->ports; in t4_uld_add()
1782 cdev->nports = lldi->nports; in t4_uld_add()
1783 cdev->mtus = lldi->mtus; in t4_uld_add()
1784 cdev->nmtus = NMTUS; in t4_uld_add()
1785 cdev->rx_credit_thres = cxgb4i_rx_credit_thres; in t4_uld_add()
1786 cdev->skb_tx_rsvd = CXGB4I_TX_HEADER_LEN; in t4_uld_add()
1787 cdev->skb_rx_extra = sizeof(struct cpl_iscsi_hdr); in t4_uld_add()
1788 cdev->itp = &cxgb4i_iscsi_transport; in t4_uld_add()
1790 cdev->pfvf = FW_VIID_PFN_G(cxgb4_port_viid(lldi->ports[0])) in t4_uld_add()
1793 cdev, lldi->ports[0]->name, cdev->pfvf); in t4_uld_add()
1795 rc = cxgb4i_ddp_init(cdev); in t4_uld_add()
1797 pr_info("t4 0x%p ddp init failed.\n", cdev); in t4_uld_add()
1800 rc = cxgb4i_ofld_init(cdev); in t4_uld_add()
1802 pr_info("t4 0x%p ofld init failed.\n", cdev); in t4_uld_add()
1806 rc = cxgbi_hbas_add(cdev, CXGB4I_MAX_LUN, CXGBI_MAX_CONN, in t4_uld_add()
1811 for (i = 0; i < cdev->nports; i++) { in t4_uld_add()
1813 cdev->hbas[i]->port_id = pi->port_id; in t4_uld_add()
1815 return cdev; in t4_uld_add()
1818 cxgbi_device_unregister(cdev); in t4_uld_add()
1829 struct cxgbi_device *cdev = handle; in t4_uld_rx_handler() local
1855 cdev, opc, rpl->ot.opcode_tid, ntohl(rpl->ot.opcode_tid), skb); in t4_uld_rx_handler()
1857 cxgb4i_cplhandlers[opc](cdev, skb); in t4_uld_rx_handler()
1870 struct cxgbi_device *cdev = handle; in t4_uld_state_change() local
1874 pr_info("cdev 0x%p, UP.\n", cdev); in t4_uld_state_change()
1877 pr_info("cdev 0x%p, RECOVERY.\n", cdev); in t4_uld_state_change()
1881 pr_info("cdev 0x%p, DOWN.\n", cdev); in t4_uld_state_change()
1884 pr_info("cdev 0x%p, DETACH.\n", cdev); in t4_uld_state_change()
1885 cxgbi_device_unregister(cdev); in t4_uld_state_change()
1888 pr_info("cdev 0x%p, unknown state %d.\n", cdev, state); in t4_uld_state_change()