Lines Matching refs:cdev
184 struct cxgb4_lld_info *lldi = cxgbi_cdev_priv(csk->cdev); in send_act_open_req()
218 csk->cdev->ports[csk->port_id], in send_act_open_req()
242 csk->cdev->ports[csk->port_id], in send_act_open_req()
260 cxgb4_l2t_send(csk->cdev->ports[csk->port_id], skb, csk->l2t); in send_act_open_req()
267 struct cxgb4_lld_info *lldi = cxgbi_cdev_priv(csk->cdev); in send_act_open_req6()
312 csk->cdev->ports[csk->port_id], in send_act_open_req6()
335 csk->cdev->ports[csk->port_id], in send_act_open_req6()
347 cxgb4_l2t_send(csk->cdev->ports[csk->port_id], skb, csk->l2t); in send_act_open_req6()
381 cxgb4_ofld_send(csk->cdev->ports[csk->port_id], skb); in abort_arp_failure()
389 if (unlikely(csk->state == CTP_ABORTING) || !skb || !csk->cdev) in send_abort_req()
416 cxgb4_l2t_send(csk->cdev->ports[csk->port_id], skb, csk->l2t); in send_abort_req()
433 cxgb4_ofld_send(csk->cdev->ports[csk->port_id], skb); in send_abort_rpl()
463 cxgb4_ofld_send(csk->cdev->ports[csk->port_id], skb); in send_rx_credits()
535 flowc->mnemval[0].val = htonl(csk->cdev->pfvf); in send_tx_flowc_wr()
563 cxgb4_ofld_send(csk->cdev->ports[csk->port_id], skb); in send_tx_flowc_wr()
686 cxgb4_l2t_send(csk->cdev->ports[csk->port_id], skb, csk->l2t); in push_tx_frames()
693 struct cxgb4_lld_info *lldi = cxgbi_cdev_priv(csk->cdev); in free_atid()
702 static void do_act_establish(struct cxgbi_device *cdev, struct sk_buff *skb) in do_act_establish() argument
709 struct cxgb4_lld_info *lldi = cxgbi_cdev_priv(cdev); in do_act_establish()
715 pr_err("NO conn. for atid %u, cdev 0x%p.\n", atid, cdev); in do_act_establish()
803 struct cxgb4_lld_info *lldi = cxgbi_cdev_priv(csk->cdev); in csk_act_open_retry_timer()
854 static void do_act_open_rpl(struct cxgbi_device *cdev, struct sk_buff *skb) in do_act_open_rpl() argument
862 struct cxgb4_lld_info *lldi = cxgbi_cdev_priv(cdev); in do_act_open_rpl()
902 static void do_peer_close(struct cxgbi_device *cdev, struct sk_buff *skb) in do_peer_close() argument
907 struct cxgb4_lld_info *lldi = cxgbi_cdev_priv(cdev); in do_peer_close()
923 static void do_close_con_rpl(struct cxgbi_device *cdev, struct sk_buff *skb) in do_close_con_rpl() argument
928 struct cxgb4_lld_info *lldi = cxgbi_cdev_priv(cdev); in do_close_con_rpl()
962 static void do_abort_req_rss(struct cxgbi_device *cdev, struct sk_buff *skb) in do_abort_req_rss() argument
967 struct cxgb4_lld_info *lldi = cxgbi_cdev_priv(cdev); in do_abort_req_rss()
1010 static void do_abort_rpl_rss(struct cxgbi_device *cdev, struct sk_buff *skb) in do_abort_rpl_rss() argument
1015 struct cxgb4_lld_info *lldi = cxgbi_cdev_priv(cdev); in do_abort_rpl_rss()
1035 static void do_rx_data(struct cxgbi_device *cdev, struct sk_buff *skb) in do_rx_data() argument
1040 struct cxgb4_lld_info *lldi = cxgbi_cdev_priv(cdev); in do_rx_data()
1056 static void do_rx_iscsi_hdr(struct cxgbi_device *cdev, struct sk_buff *skb) in do_rx_iscsi_hdr() argument
1062 struct cxgb4_lld_info *lldi = cxgbi_cdev_priv(cdev); in do_rx_iscsi_hdr()
1160 static void do_rx_data_ddp(struct cxgbi_device *cdev, in do_rx_data_ddp() argument
1167 struct cxgb4_lld_info *lldi = cxgbi_cdev_priv(cdev); in do_rx_data_ddp()
1247 static void do_fw4_ack(struct cxgbi_device *cdev, struct sk_buff *skb) in do_fw4_ack() argument
1252 struct cxgb4_lld_info *lldi = cxgbi_cdev_priv(cdev); in do_fw4_ack()
1268 static void do_set_tcb_rpl(struct cxgbi_device *cdev, struct sk_buff *skb) in do_set_tcb_rpl() argument
1272 struct cxgb4_lld_info *lldi = cxgbi_cdev_priv(cdev); in do_set_tcb_rpl()
1327 struct net_device *ndev = csk->cdev->ports[csk->port_id]; in release_offload_resources()
1350 lldi = cxgbi_cdev_priv(csk->cdev); in release_offload_resources()
1356 csk->cdev = NULL; in release_offload_resources()
1361 struct cxgbi_device *cdev = csk->cdev; in init_act_open() local
1362 struct cxgb4_lld_info *lldi = cxgbi_cdev_priv(cdev); in init_act_open()
1363 struct net_device *ndev = cdev->ports[csk->port_id]; in init_act_open()
1498 int cxgb4i_ofld_init(struct cxgbi_device *cdev) in cxgb4i_ofld_init() argument
1505 rc = cxgbi_device_portmap_create(cdev, cxgb4i_sport_base, in cxgb4i_ofld_init()
1510 cdev->csk_release_offload_resources = release_offload_resources; in cxgb4i_ofld_init()
1511 cdev->csk_push_tx_frames = push_tx_frames; in cxgb4i_ofld_init()
1512 cdev->csk_send_abort_req = send_abort_req; in cxgb4i_ofld_init()
1513 cdev->csk_send_close_req = send_close_req; in cxgb4i_ofld_init()
1514 cdev->csk_send_rx_credits = send_rx_credits; in cxgb4i_ofld_init()
1515 cdev->csk_alloc_cpls = alloc_cpls; in cxgb4i_ofld_init()
1516 cdev->csk_init_act_open = init_act_open; in cxgb4i_ofld_init()
1518 pr_info("cdev 0x%p, offload up, added.\n", cdev); in cxgb4i_ofld_init()
1548 static int ddp_ppod_write_idata(struct cxgbi_device *cdev, unsigned int port_id, in ddp_ppod_write_idata() argument
1554 struct cxgbi_ddp_info *ddp = cdev->ddp; in ddp_ppod_write_idata()
1555 struct cxgb4_lld_info *lldi = cxgbi_cdev_priv(cdev); in ddp_ppod_write_idata()
1569 cdev, idx, npods); in ddp_ppod_write_idata()
1586 cxgb4_ofld_send(cdev->ports[port_id], skb); in ddp_ppod_write_idata()
1601 err = ddp_ppod_write_idata(csk->cdev, csk->port_id, hdr, in ddp_set_map()
1619 err = ddp_ppod_write_idata(chba->cdev, chba->port_id, NULL, in ddp_clear_map()
1652 cxgb4_ofld_send(csk->cdev->ports[csk->port_id], skb); in ddp_setup_conn_pgidx()
1685 cxgb4_ofld_send(csk->cdev->ports[csk->port_id], skb); in ddp_setup_conn_digest()
1689 static int cxgb4i_ddp_init(struct cxgbi_device *cdev) in cxgb4i_ddp_init() argument
1691 struct cxgb4_lld_info *lldi = cxgbi_cdev_priv(cdev); in cxgb4i_ddp_init()
1692 struct cxgbi_ddp_info *ddp = cdev->ddp; in cxgb4i_ddp_init()
1699 cdev, cdev->ddp); in cxgb4i_ddp_init()
1703 err = cxgbi_ddp_init(cdev, lldi->vr->iscsi.start, in cxgb4i_ddp_init()
1709 ddp = cdev->ddp; in cxgb4i_ddp_init()
1715 cdev->csk_ddp_setup_digest = ddp_setup_conn_digest; in cxgb4i_ddp_init()
1716 cdev->csk_ddp_setup_pgidx = ddp_setup_conn_pgidx; in cxgb4i_ddp_init()
1717 cdev->csk_ddp_set = ddp_set_map; in cxgb4i_ddp_init()
1718 cdev->csk_ddp_clear = ddp_clear_map; in cxgb4i_ddp_init()
1721 cdev, cdev->tag_format.sw_bits, cdev->tag_format.rsvd_bits, in cxgb4i_ddp_init()
1722 cdev->tag_format.rsvd_shift, cdev->tag_format.rsvd_mask); in cxgb4i_ddp_init()
1725 cdev, ddp->nppods, ddp->idx_bits, ddp->idx_mask, in cxgb4i_ddp_init()
1729 cdev, cdev->tx_max_size, ddp->max_txsz, cdev->rx_max_size, in cxgb4i_ddp_init()
1736 struct cxgbi_device *cdev; in t4_uld_add() local
1740 cdev = cxgbi_device_register(sizeof(*lldi), lldi->nports); in t4_uld_add()
1741 if (!cdev) { in t4_uld_add()
1746 cdev, lldi->adapter_type, lldi->nports, in t4_uld_add()
1752 cdev, i, lldi->rxq_ids[i]); in t4_uld_add()
1754 memcpy(cxgbi_cdev_priv(cdev), lldi, sizeof(*lldi)); in t4_uld_add()
1755 cdev->flags = CXGBI_FLAG_DEV_T4; in t4_uld_add()
1756 cdev->pdev = lldi->pdev; in t4_uld_add()
1757 cdev->ports = lldi->ports; in t4_uld_add()
1758 cdev->nports = lldi->nports; in t4_uld_add()
1759 cdev->mtus = lldi->mtus; in t4_uld_add()
1760 cdev->nmtus = NMTUS; in t4_uld_add()
1761 cdev->snd_win = cxgb4i_snd_win; in t4_uld_add()
1762 cdev->rcv_win = cxgb4i_rcv_win; in t4_uld_add()
1763 cdev->rx_credit_thres = cxgb4i_rx_credit_thres; in t4_uld_add()
1764 cdev->skb_tx_rsvd = CXGB4I_TX_HEADER_LEN; in t4_uld_add()
1765 cdev->skb_rx_extra = sizeof(struct cpl_iscsi_hdr); in t4_uld_add()
1766 cdev->itp = &cxgb4i_iscsi_transport; in t4_uld_add()
1768 cdev->pfvf = FW_VIID_PFN_G(cxgb4_port_viid(lldi->ports[0])) in t4_uld_add()
1771 cdev, lldi->ports[0]->name, cdev->pfvf); in t4_uld_add()
1773 rc = cxgb4i_ddp_init(cdev); in t4_uld_add()
1775 pr_info("t4 0x%p ddp init failed.\n", cdev); in t4_uld_add()
1778 rc = cxgb4i_ofld_init(cdev); in t4_uld_add()
1780 pr_info("t4 0x%p ofld init failed.\n", cdev); in t4_uld_add()
1784 rc = cxgbi_hbas_add(cdev, CXGB4I_MAX_LUN, CXGBI_MAX_CONN, in t4_uld_add()
1789 for (i = 0; i < cdev->nports; i++) { in t4_uld_add()
1791 cdev->hbas[i]->port_id = pi->port_id; in t4_uld_add()
1793 return cdev; in t4_uld_add()
1796 cxgbi_device_unregister(cdev); in t4_uld_add()
1807 struct cxgbi_device *cdev = handle; in t4_uld_rx_handler() local
1833 cdev, opc, rpl->ot.opcode_tid, ntohl(rpl->ot.opcode_tid), skb); in t4_uld_rx_handler()
1835 cxgb4i_cplhandlers[opc](cdev, skb); in t4_uld_rx_handler()
1848 struct cxgbi_device *cdev = handle; in t4_uld_state_change() local
1852 pr_info("cdev 0x%p, UP.\n", cdev); in t4_uld_state_change()
1855 pr_info("cdev 0x%p, RECOVERY.\n", cdev); in t4_uld_state_change()
1859 pr_info("cdev 0x%p, DOWN.\n", cdev); in t4_uld_state_change()
1862 pr_info("cdev 0x%p, DETACH.\n", cdev); in t4_uld_state_change()
1863 cxgbi_device_unregister(cdev); in t4_uld_state_change()
1866 pr_info("cdev 0x%p, unknown state %d.\n", cdev, state); in t4_uld_state_change()