Lines Matching refs:p_conn

290 				     struct qed_iscsi_conn *p_conn,  in qed_sp_iscsi_conn_offload()  argument
311 init_data.cid = p_conn->icid; in qed_sp_iscsi_conn_offload()
326 p_conn->physical_q0 = cpu_to_le16(physical_q); in qed_sp_iscsi_conn_offload()
331 p_conn->physical_q1 = cpu_to_le16(physical_q); in qed_sp_iscsi_conn_offload()
336 p_conn->layer_code); in qed_sp_iscsi_conn_offload()
338 p_ramrod->conn_id = cpu_to_le16(p_conn->conn_id); in qed_sp_iscsi_conn_offload()
339 p_ramrod->fw_cid = cpu_to_le32(p_conn->icid); in qed_sp_iscsi_conn_offload()
341 DMA_REGPAIR_LE(p_ramrod->iscsi.sq_pbl_addr, p_conn->sq_pbl_addr); in qed_sp_iscsi_conn_offload()
343 r2tq_pbl_addr = qed_chain_get_pbl_phys(&p_conn->r2tq); in qed_sp_iscsi_conn_offload()
346 xhq_pbl_addr = qed_chain_get_pbl_phys(&p_conn->xhq); in qed_sp_iscsi_conn_offload()
349 uhq_pbl_addr = qed_chain_get_pbl_phys(&p_conn->uhq); in qed_sp_iscsi_conn_offload()
352 p_ramrod->iscsi.initial_ack = cpu_to_le32(p_conn->initial_ack); in qed_sp_iscsi_conn_offload()
353 p_ramrod->iscsi.flags = p_conn->offl_flags; in qed_sp_iscsi_conn_offload()
354 p_ramrod->iscsi.default_cq = p_conn->default_cq; in qed_sp_iscsi_conn_offload()
355 p_ramrod->iscsi.stat_sn = cpu_to_le32(p_conn->stat_sn); in qed_sp_iscsi_conn_offload()
361 p = (u16 *)p_conn->local_mac; in qed_sp_iscsi_conn_offload()
366 p = (u16 *)p_conn->remote_mac; in qed_sp_iscsi_conn_offload()
371 p_tcp->vlan_id = cpu_to_le16(p_conn->vlan_id); in qed_sp_iscsi_conn_offload()
373 p_tcp->flags = cpu_to_le16(p_conn->tcp_flags); in qed_sp_iscsi_conn_offload()
374 p_tcp->ip_version = p_conn->ip_version; in qed_sp_iscsi_conn_offload()
376 dval = p_conn->remote_ip[i]; in qed_sp_iscsi_conn_offload()
378 dval = p_conn->local_ip[i]; in qed_sp_iscsi_conn_offload()
381 p_tcp->ka_max_probe_cnt = p_conn->ka_max_probe_cnt; in qed_sp_iscsi_conn_offload()
382 p_tcp->dup_ack_theshold = p_conn->dup_ack_theshold; in qed_sp_iscsi_conn_offload()
384 p_tcp->rcv_next = cpu_to_le32(p_conn->rcv_next); in qed_sp_iscsi_conn_offload()
385 p_tcp->snd_una = cpu_to_le32(p_conn->snd_una); in qed_sp_iscsi_conn_offload()
386 p_tcp->snd_next = cpu_to_le32(p_conn->snd_next); in qed_sp_iscsi_conn_offload()
387 p_tcp->snd_max = cpu_to_le32(p_conn->snd_max); in qed_sp_iscsi_conn_offload()
388 p_tcp->snd_wnd = cpu_to_le32(p_conn->snd_wnd); in qed_sp_iscsi_conn_offload()
389 p_tcp->rcv_wnd = cpu_to_le32(p_conn->rcv_wnd); in qed_sp_iscsi_conn_offload()
390 p_tcp->snd_wl1 = cpu_to_le32(p_conn->snd_wl1); in qed_sp_iscsi_conn_offload()
391 p_tcp->cwnd = cpu_to_le32(p_conn->cwnd); in qed_sp_iscsi_conn_offload()
392 p_tcp->ss_thresh = cpu_to_le32(p_conn->ss_thresh); in qed_sp_iscsi_conn_offload()
393 p_tcp->srtt = cpu_to_le16(p_conn->srtt); in qed_sp_iscsi_conn_offload()
394 p_tcp->rtt_var = cpu_to_le16(p_conn->rtt_var); in qed_sp_iscsi_conn_offload()
395 p_tcp->ts_recent = cpu_to_le32(p_conn->ts_recent); in qed_sp_iscsi_conn_offload()
396 p_tcp->ts_recent_age = cpu_to_le32(p_conn->ts_recent_age); in qed_sp_iscsi_conn_offload()
397 p_tcp->total_rt = cpu_to_le32(p_conn->total_rt); in qed_sp_iscsi_conn_offload()
398 dval = p_conn->ka_timeout_delta; in qed_sp_iscsi_conn_offload()
400 dval = p_conn->rt_timeout_delta; in qed_sp_iscsi_conn_offload()
402 p_tcp->dup_ack_cnt = p_conn->dup_ack_cnt; in qed_sp_iscsi_conn_offload()
403 p_tcp->snd_wnd_probe_cnt = p_conn->snd_wnd_probe_cnt; in qed_sp_iscsi_conn_offload()
404 p_tcp->ka_probe_cnt = p_conn->ka_probe_cnt; in qed_sp_iscsi_conn_offload()
405 p_tcp->rt_cnt = p_conn->rt_cnt; in qed_sp_iscsi_conn_offload()
406 p_tcp->flow_label = cpu_to_le32(p_conn->flow_label); in qed_sp_iscsi_conn_offload()
407 p_tcp->ka_timeout = cpu_to_le32(p_conn->ka_timeout); in qed_sp_iscsi_conn_offload()
408 p_tcp->ka_interval = cpu_to_le32(p_conn->ka_interval); in qed_sp_iscsi_conn_offload()
409 p_tcp->max_rt_time = cpu_to_le32(p_conn->max_rt_time); in qed_sp_iscsi_conn_offload()
410 dval = p_conn->initial_rcv_wnd; in qed_sp_iscsi_conn_offload()
412 p_tcp->ttl = p_conn->ttl; in qed_sp_iscsi_conn_offload()
413 p_tcp->tos_or_tc = p_conn->tos_or_tc; in qed_sp_iscsi_conn_offload()
414 p_tcp->remote_port = cpu_to_le16(p_conn->remote_port); in qed_sp_iscsi_conn_offload()
415 p_tcp->local_port = cpu_to_le16(p_conn->local_port); in qed_sp_iscsi_conn_offload()
416 p_tcp->mss = cpu_to_le16(p_conn->mss); in qed_sp_iscsi_conn_offload()
417 p_tcp->snd_wnd_scale = p_conn->snd_wnd_scale; in qed_sp_iscsi_conn_offload()
418 p_tcp->rcv_wnd_scale = p_conn->rcv_wnd_scale; in qed_sp_iscsi_conn_offload()
419 wval = p_conn->da_timeout_value; in qed_sp_iscsi_conn_offload()
421 p_tcp->ack_frequency = p_conn->ack_frequency; in qed_sp_iscsi_conn_offload()
422 p_tcp->connect_mode = p_conn->connect_mode; in qed_sp_iscsi_conn_offload()
427 p = (u16 *)p_conn->local_mac; in qed_sp_iscsi_conn_offload()
432 p = (u16 *)p_conn->remote_mac; in qed_sp_iscsi_conn_offload()
437 p_tcp2->vlan_id = cpu_to_le16(p_conn->vlan_id); in qed_sp_iscsi_conn_offload()
438 p_tcp2->flags = cpu_to_le16(p_conn->tcp_flags); in qed_sp_iscsi_conn_offload()
440 p_tcp2->ip_version = p_conn->ip_version; in qed_sp_iscsi_conn_offload()
442 dval = p_conn->remote_ip[i]; in qed_sp_iscsi_conn_offload()
444 dval = p_conn->local_ip[i]; in qed_sp_iscsi_conn_offload()
448 p_tcp2->flow_label = cpu_to_le32(p_conn->flow_label); in qed_sp_iscsi_conn_offload()
449 p_tcp2->ttl = p_conn->ttl; in qed_sp_iscsi_conn_offload()
450 p_tcp2->tos_or_tc = p_conn->tos_or_tc; in qed_sp_iscsi_conn_offload()
451 p_tcp2->remote_port = cpu_to_le16(p_conn->remote_port); in qed_sp_iscsi_conn_offload()
452 p_tcp2->local_port = cpu_to_le16(p_conn->local_port); in qed_sp_iscsi_conn_offload()
453 p_tcp2->mss = cpu_to_le16(p_conn->mss); in qed_sp_iscsi_conn_offload()
454 p_tcp2->rcv_wnd_scale = p_conn->rcv_wnd_scale; in qed_sp_iscsi_conn_offload()
455 p_tcp2->connect_mode = p_conn->connect_mode; in qed_sp_iscsi_conn_offload()
456 wval = p_conn->syn_ip_payload_length; in qed_sp_iscsi_conn_offload()
458 p_tcp2->syn_phy_addr_lo = DMA_LO_LE(p_conn->syn_phy_addr); in qed_sp_iscsi_conn_offload()
459 p_tcp2->syn_phy_addr_hi = DMA_HI_LE(p_conn->syn_phy_addr); in qed_sp_iscsi_conn_offload()
460 p_tcp2->cwnd = cpu_to_le32(p_conn->cwnd); in qed_sp_iscsi_conn_offload()
461 p_tcp2->ka_max_probe_cnt = p_conn->ka_probe_cnt; in qed_sp_iscsi_conn_offload()
462 p_tcp2->ka_timeout = cpu_to_le32(p_conn->ka_timeout); in qed_sp_iscsi_conn_offload()
463 p_tcp2->max_rt_time = cpu_to_le32(p_conn->max_rt_time); in qed_sp_iscsi_conn_offload()
464 p_tcp2->ka_interval = cpu_to_le32(p_conn->ka_interval); in qed_sp_iscsi_conn_offload()
471 struct qed_iscsi_conn *p_conn, in qed_sp_iscsi_conn_update() argument
483 init_data.cid = p_conn->icid; in qed_sp_iscsi_conn_update()
497 ISCSI_SLOW_PATH_HDR_LAYER_CODE, p_conn->layer_code); in qed_sp_iscsi_conn_update()
499 p_ramrod->conn_id = cpu_to_le16(p_conn->conn_id); in qed_sp_iscsi_conn_update()
500 p_ramrod->fw_cid = cpu_to_le32(p_conn->icid); in qed_sp_iscsi_conn_update()
501 p_ramrod->flags = p_conn->update_flag; in qed_sp_iscsi_conn_update()
502 p_ramrod->max_seq_size = cpu_to_le32(p_conn->max_seq_size); in qed_sp_iscsi_conn_update()
503 dval = p_conn->max_recv_pdu_length; in qed_sp_iscsi_conn_update()
505 dval = p_conn->max_send_pdu_length; in qed_sp_iscsi_conn_update()
507 dval = p_conn->first_seq_length; in qed_sp_iscsi_conn_update()
509 p_ramrod->exp_stat_sn = cpu_to_le32(p_conn->exp_stat_sn); in qed_sp_iscsi_conn_update()
516 struct qed_iscsi_conn *p_conn, in qed_sp_iscsi_mac_update() argument
528 init_data.cid = p_conn->icid; in qed_sp_iscsi_mac_update()
542 ISCSI_SLOW_PATH_HDR_LAYER_CODE, p_conn->layer_code); in qed_sp_iscsi_mac_update()
544 p_ramrod->conn_id = cpu_to_le16(p_conn->conn_id); in qed_sp_iscsi_mac_update()
545 p_ramrod->fw_cid = cpu_to_le32(p_conn->icid); in qed_sp_iscsi_mac_update()
546 ucval = p_conn->remote_mac[1]; in qed_sp_iscsi_mac_update()
548 ucval = p_conn->remote_mac[0]; in qed_sp_iscsi_mac_update()
550 ucval = p_conn->remote_mac[3]; in qed_sp_iscsi_mac_update()
552 ucval = p_conn->remote_mac[2]; in qed_sp_iscsi_mac_update()
554 ucval = p_conn->remote_mac[5]; in qed_sp_iscsi_mac_update()
556 ucval = p_conn->remote_mac[4]; in qed_sp_iscsi_mac_update()
563 struct qed_iscsi_conn *p_conn, in qed_sp_iscsi_conn_terminate() argument
574 init_data.cid = p_conn->icid; in qed_sp_iscsi_conn_terminate()
588 ISCSI_SLOW_PATH_HDR_LAYER_CODE, p_conn->layer_code); in qed_sp_iscsi_conn_terminate()
590 p_ramrod->conn_id = cpu_to_le16(p_conn->conn_id); in qed_sp_iscsi_conn_terminate()
591 p_ramrod->fw_cid = cpu_to_le32(p_conn->icid); in qed_sp_iscsi_conn_terminate()
592 p_ramrod->abortive = p_conn->abortive_dsconnect; in qed_sp_iscsi_conn_terminate()
595 p_conn->tcp_upload_params_phys_addr); in qed_sp_iscsi_conn_terminate()
596 DMA_REGPAIR_LE(p_ramrod->queue_cnts_addr, p_conn->queue_cnts_phys_addr); in qed_sp_iscsi_conn_terminate()
602 struct qed_iscsi_conn *p_conn, in qed_sp_iscsi_conn_clear_sq() argument
613 init_data.cid = p_conn->icid; in qed_sp_iscsi_conn_clear_sq()
627 ISCSI_SLOW_PATH_HDR_LAYER_CODE, p_conn->layer_code); in qed_sp_iscsi_conn_clear_sq()
699 static int qed_iscsi_setup_connection(struct qed_iscsi_conn *p_conn) in qed_iscsi_setup_connection() argument
701 if (!p_conn->queue_cnts_virt_addr) in qed_iscsi_setup_connection()
703 memset(p_conn->queue_cnts_virt_addr, 0, in qed_iscsi_setup_connection()
704 sizeof(*p_conn->queue_cnts_virt_addr)); in qed_iscsi_setup_connection()
706 if (!p_conn->tcp_upload_params_virt_addr) in qed_iscsi_setup_connection()
708 memset(p_conn->tcp_upload_params_virt_addr, 0, in qed_iscsi_setup_connection()
709 sizeof(*p_conn->tcp_upload_params_virt_addr)); in qed_iscsi_setup_connection()
711 if (!p_conn->r2tq.p_virt_addr) in qed_iscsi_setup_connection()
713 qed_chain_pbl_zero_mem(&p_conn->r2tq); in qed_iscsi_setup_connection()
715 if (!p_conn->uhq.p_virt_addr) in qed_iscsi_setup_connection()
717 qed_chain_pbl_zero_mem(&p_conn->uhq); in qed_iscsi_setup_connection()
719 if (!p_conn->xhq.p_virt_addr) in qed_iscsi_setup_connection()
721 qed_chain_pbl_zero_mem(&p_conn->xhq); in qed_iscsi_setup_connection()
735 struct qed_iscsi_conn *p_conn = NULL; in qed_iscsi_allocate_connection() local
741 p_conn = list_first_entry(&p_hwfn->p_iscsi_info->free_list, in qed_iscsi_allocate_connection()
743 if (p_conn) { in qed_iscsi_allocate_connection()
744 list_del(&p_conn->list_entry); in qed_iscsi_allocate_connection()
746 *p_out_conn = p_conn; in qed_iscsi_allocate_connection()
754 p_conn = kzalloc(sizeof(*p_conn), GFP_KERNEL); in qed_iscsi_allocate_connection()
755 if (!p_conn) in qed_iscsi_allocate_connection()
760 &p_conn->queue_cnts_phys_addr, in qed_iscsi_allocate_connection()
764 p_conn->queue_cnts_virt_addr = p_q_cnts; in qed_iscsi_allocate_connection()
768 &p_conn->tcp_upload_params_phys_addr, in qed_iscsi_allocate_connection()
772 p_conn->tcp_upload_params_virt_addr = p_tcp; in qed_iscsi_allocate_connection()
780 r2tq_num_elements, 0x80, &p_conn->r2tq, NULL); in qed_iscsi_allocate_connection()
791 sizeof(struct iscsi_uhqe), &p_conn->uhq, NULL); in qed_iscsi_allocate_connection()
801 sizeof(struct iscsi_xhqe), &p_conn->xhq, NULL); in qed_iscsi_allocate_connection()
805 p_conn->free_on_delete = true; in qed_iscsi_allocate_connection()
806 *p_out_conn = p_conn; in qed_iscsi_allocate_connection()
810 qed_chain_free(p_hwfn->cdev, &p_conn->uhq); in qed_iscsi_allocate_connection()
812 qed_chain_free(p_hwfn->cdev, &p_conn->r2tq); in qed_iscsi_allocate_connection()
816 p_conn->tcp_upload_params_virt_addr, in qed_iscsi_allocate_connection()
817 p_conn->tcp_upload_params_phys_addr); in qed_iscsi_allocate_connection()
821 p_conn->queue_cnts_virt_addr, in qed_iscsi_allocate_connection()
822 p_conn->queue_cnts_phys_addr); in qed_iscsi_allocate_connection()
824 kfree(p_conn); in qed_iscsi_allocate_connection()
833 struct qed_iscsi_conn *p_conn = NULL; in qed_iscsi_acquire_connection() local
845 p_conn = p_in_conn; in qed_iscsi_acquire_connection()
847 rc = qed_iscsi_allocate_connection(p_hwfn, &p_conn); in qed_iscsi_acquire_connection()
850 rc = qed_iscsi_setup_connection(p_conn); in qed_iscsi_acquire_connection()
859 p_conn->icid = icid; in qed_iscsi_acquire_connection()
860 p_conn->conn_id = (u16)icid; in qed_iscsi_acquire_connection()
861 p_conn->fw_cid = (p_hwfn->hw_info.opaque_fid << 16) | icid; in qed_iscsi_acquire_connection()
863 *p_out_conn = p_conn; in qed_iscsi_acquire_connection()
869 struct qed_iscsi_conn *p_conn) in qed_iscsi_release_connection() argument
872 list_add_tail(&p_conn->list_entry, &p_hwfn->p_iscsi_info->free_list); in qed_iscsi_release_connection()
873 qed_cxt_release_cid(p_hwfn, p_conn->icid); in qed_iscsi_release_connection()
878 struct qed_iscsi_conn *p_conn) in qed_iscsi_free_connection() argument
880 qed_chain_free(p_hwfn->cdev, &p_conn->xhq); in qed_iscsi_free_connection()
881 qed_chain_free(p_hwfn->cdev, &p_conn->uhq); in qed_iscsi_free_connection()
882 qed_chain_free(p_hwfn->cdev, &p_conn->r2tq); in qed_iscsi_free_connection()
885 p_conn->tcp_upload_params_virt_addr, in qed_iscsi_free_connection()
886 p_conn->tcp_upload_params_phys_addr); in qed_iscsi_free_connection()
889 p_conn->queue_cnts_virt_addr, in qed_iscsi_free_connection()
890 p_conn->queue_cnts_phys_addr); in qed_iscsi_free_connection()
891 kfree(p_conn); in qed_iscsi_free_connection()
915 struct qed_iscsi_conn *p_conn = NULL; in qed_iscsi_free() local
921 p_conn = list_first_entry(&p_hwfn->p_iscsi_info->free_list, in qed_iscsi_free()
923 if (p_conn) { in qed_iscsi_free()
924 list_del(&p_conn->list_entry); in qed_iscsi_free()
925 qed_iscsi_free_connection(p_hwfn, p_conn); in qed_iscsi_free()