Lines Matching refs:p_conn

261 				     struct qed_iscsi_conn *p_conn,  in qed_sp_iscsi_conn_offload()  argument
283 init_data.cid = p_conn->icid; in qed_sp_iscsi_conn_offload()
298 p_conn->physical_q0 = physical_q; in qed_sp_iscsi_conn_offload()
303 p_conn->physical_q1 = physical_q; in qed_sp_iscsi_conn_offload()
306 p_ramrod->conn_id = cpu_to_le16(p_conn->conn_id); in qed_sp_iscsi_conn_offload()
308 DMA_REGPAIR_LE(p_ramrod->iscsi.sq_pbl_addr, p_conn->sq_pbl_addr); in qed_sp_iscsi_conn_offload()
310 r2tq_pbl_addr = qed_chain_get_pbl_phys(&p_conn->r2tq); in qed_sp_iscsi_conn_offload()
313 xhq_pbl_addr = qed_chain_get_pbl_phys(&p_conn->xhq); in qed_sp_iscsi_conn_offload()
316 uhq_pbl_addr = qed_chain_get_pbl_phys(&p_conn->uhq); in qed_sp_iscsi_conn_offload()
319 p_ramrod->iscsi.initial_ack = cpu_to_le32(p_conn->initial_ack); in qed_sp_iscsi_conn_offload()
320 p_ramrod->iscsi.flags = p_conn->offl_flags; in qed_sp_iscsi_conn_offload()
321 p_ramrod->iscsi.default_cq = p_conn->default_cq; in qed_sp_iscsi_conn_offload()
322 p_ramrod->iscsi.stat_sn = cpu_to_le32(p_conn->stat_sn); in qed_sp_iscsi_conn_offload()
328 p = (u16 *)p_conn->local_mac; in qed_sp_iscsi_conn_offload()
336 p = (u16 *)p_conn->remote_mac; in qed_sp_iscsi_conn_offload()
344 p_tcp->vlan_id = cpu_to_le16(p_conn->vlan_id); in qed_sp_iscsi_conn_offload()
346 p_tcp->flags = cpu_to_le16(p_conn->tcp_flags); in qed_sp_iscsi_conn_offload()
347 p_tcp->ip_version = p_conn->ip_version; in qed_sp_iscsi_conn_offload()
349 dval = p_conn->remote_ip[i]; in qed_sp_iscsi_conn_offload()
351 dval = p_conn->local_ip[i]; in qed_sp_iscsi_conn_offload()
354 p_tcp->ka_max_probe_cnt = p_conn->ka_max_probe_cnt; in qed_sp_iscsi_conn_offload()
355 p_tcp->dup_ack_theshold = p_conn->dup_ack_theshold; in qed_sp_iscsi_conn_offload()
357 p_tcp->rcv_next = cpu_to_le32(p_conn->rcv_next); in qed_sp_iscsi_conn_offload()
358 p_tcp->snd_una = cpu_to_le32(p_conn->snd_una); in qed_sp_iscsi_conn_offload()
359 p_tcp->snd_next = cpu_to_le32(p_conn->snd_next); in qed_sp_iscsi_conn_offload()
360 p_tcp->snd_max = cpu_to_le32(p_conn->snd_max); in qed_sp_iscsi_conn_offload()
361 p_tcp->snd_wnd = cpu_to_le32(p_conn->snd_wnd); in qed_sp_iscsi_conn_offload()
362 p_tcp->rcv_wnd = cpu_to_le32(p_conn->rcv_wnd); in qed_sp_iscsi_conn_offload()
363 p_tcp->snd_wl1 = cpu_to_le32(p_conn->snd_wl1); in qed_sp_iscsi_conn_offload()
364 p_tcp->cwnd = cpu_to_le32(p_conn->cwnd); in qed_sp_iscsi_conn_offload()
365 p_tcp->ss_thresh = cpu_to_le32(p_conn->ss_thresh); in qed_sp_iscsi_conn_offload()
366 p_tcp->srtt = cpu_to_le16(p_conn->srtt); in qed_sp_iscsi_conn_offload()
367 p_tcp->rtt_var = cpu_to_le16(p_conn->rtt_var); in qed_sp_iscsi_conn_offload()
368 p_tcp->ts_recent = cpu_to_le32(p_conn->ts_recent); in qed_sp_iscsi_conn_offload()
369 p_tcp->ts_recent_age = cpu_to_le32(p_conn->ts_recent_age); in qed_sp_iscsi_conn_offload()
370 p_tcp->total_rt = cpu_to_le32(p_conn->total_rt); in qed_sp_iscsi_conn_offload()
371 dval = p_conn->ka_timeout_delta; in qed_sp_iscsi_conn_offload()
373 dval = p_conn->rt_timeout_delta; in qed_sp_iscsi_conn_offload()
375 p_tcp->dup_ack_cnt = p_conn->dup_ack_cnt; in qed_sp_iscsi_conn_offload()
376 p_tcp->snd_wnd_probe_cnt = p_conn->snd_wnd_probe_cnt; in qed_sp_iscsi_conn_offload()
377 p_tcp->ka_probe_cnt = p_conn->ka_probe_cnt; in qed_sp_iscsi_conn_offload()
378 p_tcp->rt_cnt = p_conn->rt_cnt; in qed_sp_iscsi_conn_offload()
379 p_tcp->flow_label = cpu_to_le32(p_conn->flow_label); in qed_sp_iscsi_conn_offload()
380 p_tcp->ka_timeout = cpu_to_le32(p_conn->ka_timeout); in qed_sp_iscsi_conn_offload()
381 p_tcp->ka_interval = cpu_to_le32(p_conn->ka_interval); in qed_sp_iscsi_conn_offload()
382 p_tcp->max_rt_time = cpu_to_le32(p_conn->max_rt_time); in qed_sp_iscsi_conn_offload()
383 dval = p_conn->initial_rcv_wnd; in qed_sp_iscsi_conn_offload()
385 p_tcp->ttl = p_conn->ttl; in qed_sp_iscsi_conn_offload()
386 p_tcp->tos_or_tc = p_conn->tos_or_tc; in qed_sp_iscsi_conn_offload()
387 p_tcp->remote_port = cpu_to_le16(p_conn->remote_port); in qed_sp_iscsi_conn_offload()
388 p_tcp->local_port = cpu_to_le16(p_conn->local_port); in qed_sp_iscsi_conn_offload()
389 p_tcp->mss = cpu_to_le16(p_conn->mss); in qed_sp_iscsi_conn_offload()
390 p_tcp->snd_wnd_scale = p_conn->snd_wnd_scale; in qed_sp_iscsi_conn_offload()
391 p_tcp->rcv_wnd_scale = p_conn->rcv_wnd_scale; in qed_sp_iscsi_conn_offload()
392 wval = p_conn->da_timeout_value; in qed_sp_iscsi_conn_offload()
394 p_tcp->ack_frequency = p_conn->ack_frequency; in qed_sp_iscsi_conn_offload()
395 p_tcp->connect_mode = p_conn->connect_mode; in qed_sp_iscsi_conn_offload()
400 p = (u16 *)p_conn->local_mac; in qed_sp_iscsi_conn_offload()
408 p = (u16 *)p_conn->remote_mac; in qed_sp_iscsi_conn_offload()
416 p_tcp2->vlan_id = cpu_to_le16(p_conn->vlan_id); in qed_sp_iscsi_conn_offload()
417 p_tcp2->flags = cpu_to_le16(p_conn->tcp_flags); in qed_sp_iscsi_conn_offload()
419 p_tcp2->ip_version = p_conn->ip_version; in qed_sp_iscsi_conn_offload()
421 dval = p_conn->remote_ip[i]; in qed_sp_iscsi_conn_offload()
423 dval = p_conn->local_ip[i]; in qed_sp_iscsi_conn_offload()
427 p_tcp2->flow_label = cpu_to_le32(p_conn->flow_label); in qed_sp_iscsi_conn_offload()
428 p_tcp2->ttl = p_conn->ttl; in qed_sp_iscsi_conn_offload()
429 p_tcp2->tos_or_tc = p_conn->tos_or_tc; in qed_sp_iscsi_conn_offload()
430 p_tcp2->remote_port = cpu_to_le16(p_conn->remote_port); in qed_sp_iscsi_conn_offload()
431 p_tcp2->local_port = cpu_to_le16(p_conn->local_port); in qed_sp_iscsi_conn_offload()
432 p_tcp2->mss = cpu_to_le16(p_conn->mss); in qed_sp_iscsi_conn_offload()
433 p_tcp2->rcv_wnd_scale = p_conn->rcv_wnd_scale; in qed_sp_iscsi_conn_offload()
434 p_tcp2->connect_mode = p_conn->connect_mode; in qed_sp_iscsi_conn_offload()
435 wval = p_conn->syn_ip_payload_length; in qed_sp_iscsi_conn_offload()
437 p_tcp2->syn_phy_addr_lo = DMA_LO_LE(p_conn->syn_phy_addr); in qed_sp_iscsi_conn_offload()
438 p_tcp2->syn_phy_addr_hi = DMA_HI_LE(p_conn->syn_phy_addr); in qed_sp_iscsi_conn_offload()
439 p_tcp2->cwnd = cpu_to_le32(p_conn->cwnd); in qed_sp_iscsi_conn_offload()
440 p_tcp2->ka_max_probe_cnt = p_conn->ka_probe_cnt; in qed_sp_iscsi_conn_offload()
441 p_tcp2->ka_timeout = cpu_to_le32(p_conn->ka_timeout); in qed_sp_iscsi_conn_offload()
442 p_tcp2->max_rt_time = cpu_to_le32(p_conn->max_rt_time); in qed_sp_iscsi_conn_offload()
443 p_tcp2->ka_interval = cpu_to_le32(p_conn->ka_interval); in qed_sp_iscsi_conn_offload()
450 struct qed_iscsi_conn *p_conn, in qed_sp_iscsi_conn_update() argument
462 init_data.cid = p_conn->icid; in qed_sp_iscsi_conn_update()
475 p_ramrod->conn_id = cpu_to_le16(p_conn->conn_id); in qed_sp_iscsi_conn_update()
476 p_ramrod->flags = p_conn->update_flag; in qed_sp_iscsi_conn_update()
477 p_ramrod->max_seq_size = cpu_to_le32(p_conn->max_seq_size); in qed_sp_iscsi_conn_update()
478 dval = p_conn->max_recv_pdu_length; in qed_sp_iscsi_conn_update()
480 dval = p_conn->max_send_pdu_length; in qed_sp_iscsi_conn_update()
482 dval = p_conn->first_seq_length; in qed_sp_iscsi_conn_update()
484 p_ramrod->exp_stat_sn = cpu_to_le32(p_conn->exp_stat_sn); in qed_sp_iscsi_conn_update()
491 struct qed_iscsi_conn *p_conn, in qed_sp_iscsi_mac_update() argument
503 init_data.cid = p_conn->icid; in qed_sp_iscsi_mac_update()
516 p_ramrod->conn_id = cpu_to_le16(p_conn->conn_id); in qed_sp_iscsi_mac_update()
517 ucval = p_conn->remote_mac[1]; in qed_sp_iscsi_mac_update()
519 ucval = p_conn->remote_mac[0]; in qed_sp_iscsi_mac_update()
521 ucval = p_conn->remote_mac[3]; in qed_sp_iscsi_mac_update()
523 ucval = p_conn->remote_mac[2]; in qed_sp_iscsi_mac_update()
525 ucval = p_conn->remote_mac[5]; in qed_sp_iscsi_mac_update()
527 ucval = p_conn->remote_mac[4]; in qed_sp_iscsi_mac_update()
534 struct qed_iscsi_conn *p_conn, in qed_sp_iscsi_conn_terminate() argument
545 init_data.cid = p_conn->icid; in qed_sp_iscsi_conn_terminate()
558 p_ramrod->conn_id = cpu_to_le16(p_conn->conn_id); in qed_sp_iscsi_conn_terminate()
559 p_ramrod->abortive = p_conn->abortive_dsconnect; in qed_sp_iscsi_conn_terminate()
562 p_conn->tcp_upload_params_phys_addr); in qed_sp_iscsi_conn_terminate()
563 DMA_REGPAIR_LE(p_ramrod->queue_cnts_addr, p_conn->queue_cnts_phys_addr); in qed_sp_iscsi_conn_terminate()
569 struct qed_iscsi_conn *p_conn, in qed_sp_iscsi_conn_clear_sq() argument
579 init_data.cid = p_conn->icid; in qed_sp_iscsi_conn_clear_sq()
654 static int qed_iscsi_setup_connection(struct qed_iscsi_conn *p_conn) in qed_iscsi_setup_connection() argument
656 if (!p_conn->queue_cnts_virt_addr) in qed_iscsi_setup_connection()
658 memset(p_conn->queue_cnts_virt_addr, 0, in qed_iscsi_setup_connection()
659 sizeof(*p_conn->queue_cnts_virt_addr)); in qed_iscsi_setup_connection()
661 if (!p_conn->tcp_upload_params_virt_addr) in qed_iscsi_setup_connection()
663 memset(p_conn->tcp_upload_params_virt_addr, 0, in qed_iscsi_setup_connection()
664 sizeof(*p_conn->tcp_upload_params_virt_addr)); in qed_iscsi_setup_connection()
666 if (!p_conn->r2tq.p_virt_addr) in qed_iscsi_setup_connection()
668 qed_chain_pbl_zero_mem(&p_conn->r2tq); in qed_iscsi_setup_connection()
670 if (!p_conn->uhq.p_virt_addr) in qed_iscsi_setup_connection()
672 qed_chain_pbl_zero_mem(&p_conn->uhq); in qed_iscsi_setup_connection()
674 if (!p_conn->xhq.p_virt_addr) in qed_iscsi_setup_connection()
676 qed_chain_pbl_zero_mem(&p_conn->xhq); in qed_iscsi_setup_connection()
694 struct qed_iscsi_conn *p_conn = NULL; in qed_iscsi_allocate_connection() local
700 p_conn = list_first_entry(&p_hwfn->p_iscsi_info->free_list, in qed_iscsi_allocate_connection()
702 if (p_conn) { in qed_iscsi_allocate_connection()
703 list_del(&p_conn->list_entry); in qed_iscsi_allocate_connection()
705 *p_out_conn = p_conn; in qed_iscsi_allocate_connection()
713 p_conn = kzalloc(sizeof(*p_conn), GFP_KERNEL); in qed_iscsi_allocate_connection()
714 if (!p_conn) in qed_iscsi_allocate_connection()
719 &p_conn->queue_cnts_phys_addr, in qed_iscsi_allocate_connection()
723 p_conn->queue_cnts_virt_addr = p_q_cnts; in qed_iscsi_allocate_connection()
727 &p_conn->tcp_upload_params_phys_addr, in qed_iscsi_allocate_connection()
731 p_conn->tcp_upload_params_virt_addr = p_tcp; in qed_iscsi_allocate_connection()
737 rc = qed_chain_alloc(p_hwfn->cdev, &p_conn->r2tq, &params); in qed_iscsi_allocate_connection()
745 rc = qed_chain_alloc(p_hwfn->cdev, &p_conn->uhq, &params); in qed_iscsi_allocate_connection()
751 rc = qed_chain_alloc(p_hwfn->cdev, &p_conn->xhq, &params); in qed_iscsi_allocate_connection()
755 p_conn->free_on_delete = true; in qed_iscsi_allocate_connection()
756 *p_out_conn = p_conn; in qed_iscsi_allocate_connection()
760 qed_chain_free(p_hwfn->cdev, &p_conn->uhq); in qed_iscsi_allocate_connection()
762 qed_chain_free(p_hwfn->cdev, &p_conn->r2tq); in qed_iscsi_allocate_connection()
766 p_conn->tcp_upload_params_virt_addr, in qed_iscsi_allocate_connection()
767 p_conn->tcp_upload_params_phys_addr); in qed_iscsi_allocate_connection()
771 p_conn->queue_cnts_virt_addr, in qed_iscsi_allocate_connection()
772 p_conn->queue_cnts_phys_addr); in qed_iscsi_allocate_connection()
774 kfree(p_conn); in qed_iscsi_allocate_connection()
783 struct qed_iscsi_conn *p_conn = NULL; in qed_iscsi_acquire_connection() local
795 p_conn = p_in_conn; in qed_iscsi_acquire_connection()
797 rc = qed_iscsi_allocate_connection(p_hwfn, &p_conn); in qed_iscsi_acquire_connection()
800 rc = qed_iscsi_setup_connection(p_conn); in qed_iscsi_acquire_connection()
809 p_conn->icid = icid; in qed_iscsi_acquire_connection()
810 p_conn->conn_id = (u16)icid; in qed_iscsi_acquire_connection()
811 p_conn->fw_cid = (p_hwfn->hw_info.opaque_fid << 16) | icid; in qed_iscsi_acquire_connection()
813 *p_out_conn = p_conn; in qed_iscsi_acquire_connection()
819 struct qed_iscsi_conn *p_conn) in qed_iscsi_release_connection() argument
822 list_add_tail(&p_conn->list_entry, &p_hwfn->p_iscsi_info->free_list); in qed_iscsi_release_connection()
823 qed_cxt_release_cid(p_hwfn, p_conn->icid); in qed_iscsi_release_connection()
828 struct qed_iscsi_conn *p_conn) in qed_iscsi_free_connection() argument
830 qed_chain_free(p_hwfn->cdev, &p_conn->xhq); in qed_iscsi_free_connection()
831 qed_chain_free(p_hwfn->cdev, &p_conn->uhq); in qed_iscsi_free_connection()
832 qed_chain_free(p_hwfn->cdev, &p_conn->r2tq); in qed_iscsi_free_connection()
835 p_conn->tcp_upload_params_virt_addr, in qed_iscsi_free_connection()
836 p_conn->tcp_upload_params_phys_addr); in qed_iscsi_free_connection()
839 p_conn->queue_cnts_virt_addr, in qed_iscsi_free_connection()
840 p_conn->queue_cnts_phys_addr); in qed_iscsi_free_connection()
841 kfree(p_conn); in qed_iscsi_free_connection()
865 struct qed_iscsi_conn *p_conn = NULL; in qed_iscsi_free() local
871 p_conn = list_first_entry(&p_hwfn->p_iscsi_info->free_list, in qed_iscsi_free()
873 if (p_conn) { in qed_iscsi_free()
874 list_del(&p_conn->list_entry); in qed_iscsi_free()
875 qed_iscsi_free_connection(p_hwfn, p_conn); in qed_iscsi_free()