Lines Matching refs:fw_ddb_entry

2986 	if (ddb_entry->fw_ddb_entry.options & DDB_OPT_IPV6_DEVICE) {  in qla4xxx_match_ipaddress()
3138 struct dev_db_entry *fw_ddb_entry = NULL; in qla4xxx_session_destroy() local
3149 fw_ddb_entry = dma_alloc_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), in qla4xxx_session_destroy()
3151 if (!fw_ddb_entry) { in qla4xxx_session_destroy()
3160 fw_ddb_entry, fw_ddb_entry_dma, in qla4xxx_session_destroy()
3183 if (fw_ddb_entry) in qla4xxx_session_destroy()
3184 dma_free_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), in qla4xxx_session_destroy()
3185 fw_ddb_entry, fw_ddb_entry_dma); in qla4xxx_session_destroy()
3249 struct dev_db_entry *fw_ddb_entry = NULL; in qla4xxx_conn_start() local
3273 fw_ddb_entry = dma_alloc_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), in qla4xxx_conn_start()
3275 if (!fw_ddb_entry) { in qla4xxx_conn_start()
3319 if (fw_ddb_entry) in qla4xxx_conn_start()
3320 dma_free_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), in qla4xxx_conn_start()
3321 fw_ddb_entry, fw_ddb_entry_dma); in qla4xxx_conn_start()
3500 struct dev_db_entry *fw_ddb_entry) in qla4xxx_copy_from_fwddb_param() argument
3505 options = le16_to_cpu(fw_ddb_entry->options); in qla4xxx_copy_from_fwddb_param()
3524 options = le16_to_cpu(fw_ddb_entry->iscsi_options); in qla4xxx_copy_from_fwddb_param()
3544 options = le16_to_cpu(fw_ddb_entry->tcp_options); in qla4xxx_copy_from_fwddb_param()
3558 options = le16_to_cpu(fw_ddb_entry->ip_options); in qla4xxx_copy_from_fwddb_param()
3562 le16_to_cpu(fw_ddb_entry->iscsi_max_rcv_data_seg_len); in qla4xxx_copy_from_fwddb_param()
3564 le16_to_cpu(fw_ddb_entry->iscsi_max_snd_data_seg_len); in qla4xxx_copy_from_fwddb_param()
3566 le16_to_cpu(fw_ddb_entry->iscsi_first_burst_len); in qla4xxx_copy_from_fwddb_param()
3568 le16_to_cpu(fw_ddb_entry->iscsi_max_burst_len); in qla4xxx_copy_from_fwddb_param()
3569 sess->max_r2t = le16_to_cpu(fw_ddb_entry->iscsi_max_outsnd_r2t); in qla4xxx_copy_from_fwddb_param()
3570 sess->time2wait = le16_to_cpu(fw_ddb_entry->iscsi_def_time2wait); in qla4xxx_copy_from_fwddb_param()
3571 sess->time2retain = le16_to_cpu(fw_ddb_entry->iscsi_def_time2retain); in qla4xxx_copy_from_fwddb_param()
3572 sess->tpgt = le32_to_cpu(fw_ddb_entry->tgt_portal_grp); in qla4xxx_copy_from_fwddb_param()
3573 conn->max_segment_size = le16_to_cpu(fw_ddb_entry->mss); in qla4xxx_copy_from_fwddb_param()
3574 conn->tcp_xmit_wsf = fw_ddb_entry->tcp_xmt_wsf; in qla4xxx_copy_from_fwddb_param()
3575 conn->tcp_recv_wsf = fw_ddb_entry->tcp_rcv_wsf; in qla4xxx_copy_from_fwddb_param()
3576 conn->ipv6_flow_label = le16_to_cpu(fw_ddb_entry->ipv6_flow_lbl); in qla4xxx_copy_from_fwddb_param()
3577 conn->keepalive_timeout = le16_to_cpu(fw_ddb_entry->ka_timeout); in qla4xxx_copy_from_fwddb_param()
3578 conn->local_port = le16_to_cpu(fw_ddb_entry->lcl_port); in qla4xxx_copy_from_fwddb_param()
3579 conn->statsn = le32_to_cpu(fw_ddb_entry->stat_sn); in qla4xxx_copy_from_fwddb_param()
3580 conn->exp_statsn = le32_to_cpu(fw_ddb_entry->exp_stat_sn); in qla4xxx_copy_from_fwddb_param()
3581 sess->discovery_parent_idx = le16_to_cpu(fw_ddb_entry->ddb_link); in qla4xxx_copy_from_fwddb_param()
3582 sess->discovery_parent_type = le16_to_cpu(fw_ddb_entry->ddb_link); in qla4xxx_copy_from_fwddb_param()
3583 sess->chap_out_idx = le16_to_cpu(fw_ddb_entry->chap_tbl_idx); in qla4xxx_copy_from_fwddb_param()
3584 sess->tsid = le16_to_cpu(fw_ddb_entry->tsid); in qla4xxx_copy_from_fwddb_param()
3587 le16_to_cpu(fw_ddb_entry->def_timeout); in qla4xxx_copy_from_fwddb_param()
3588 conn->port = le16_to_cpu(fw_ddb_entry->port); in qla4xxx_copy_from_fwddb_param()
3590 options = le16_to_cpu(fw_ddb_entry->options); in qla4xxx_copy_from_fwddb_param()
3603 memcpy(conn->ipaddress, fw_ddb_entry->ip_addr, IPv6_ADDR_LEN); in qla4xxx_copy_from_fwddb_param()
3604 memcpy(conn->redirect_ipaddr, fw_ddb_entry->tgt_addr, IPv6_ADDR_LEN); in qla4xxx_copy_from_fwddb_param()
3607 conn->ipv6_traffic_class = fw_ddb_entry->ipv4_tos; in qla4xxx_copy_from_fwddb_param()
3610 fw_ddb_entry->link_local_ipv6_addr, in qla4xxx_copy_from_fwddb_param()
3617 conn->ipv4_tos = fw_ddb_entry->ipv4_tos; in qla4xxx_copy_from_fwddb_param()
3620 if (fw_ddb_entry->iscsi_name[0]) { in qla4xxx_copy_from_fwddb_param()
3622 (char *)fw_ddb_entry->iscsi_name); in qla4xxx_copy_from_fwddb_param()
3627 if (fw_ddb_entry->iscsi_alias[0]) { in qla4xxx_copy_from_fwddb_param()
3629 (char *)fw_ddb_entry->iscsi_alias); in qla4xxx_copy_from_fwddb_param()
3634 COPY_ISID(sess->isid, fw_ddb_entry->isid); in qla4xxx_copy_from_fwddb_param()
3642 struct dev_db_entry *fw_ddb_entry) in qla4xxx_copy_to_fwddb_param() argument
3647 options = le16_to_cpu(fw_ddb_entry->options); in qla4xxx_copy_to_fwddb_param()
3657 fw_ddb_entry->options = cpu_to_le16(options); in qla4xxx_copy_to_fwddb_param()
3659 options = le16_to_cpu(fw_ddb_entry->iscsi_options); in qla4xxx_copy_to_fwddb_param()
3673 fw_ddb_entry->iscsi_options = cpu_to_le16(options); in qla4xxx_copy_to_fwddb_param()
3675 options = le16_to_cpu(fw_ddb_entry->tcp_options); in qla4xxx_copy_to_fwddb_param()
3683 fw_ddb_entry->tcp_options = cpu_to_le16(options); in qla4xxx_copy_to_fwddb_param()
3685 options = le16_to_cpu(fw_ddb_entry->ip_options); in qla4xxx_copy_to_fwddb_param()
3687 fw_ddb_entry->ip_options = cpu_to_le16(options); in qla4xxx_copy_to_fwddb_param()
3689 fw_ddb_entry->iscsi_max_outsnd_r2t = cpu_to_le16(sess->max_r2t); in qla4xxx_copy_to_fwddb_param()
3690 fw_ddb_entry->iscsi_max_rcv_data_seg_len = in qla4xxx_copy_to_fwddb_param()
3692 fw_ddb_entry->iscsi_max_snd_data_seg_len = in qla4xxx_copy_to_fwddb_param()
3694 fw_ddb_entry->iscsi_first_burst_len = in qla4xxx_copy_to_fwddb_param()
3696 fw_ddb_entry->iscsi_max_burst_len = cpu_to_le16(sess->max_burst / in qla4xxx_copy_to_fwddb_param()
3698 fw_ddb_entry->iscsi_def_time2wait = cpu_to_le16(sess->time2wait); in qla4xxx_copy_to_fwddb_param()
3699 fw_ddb_entry->iscsi_def_time2retain = cpu_to_le16(sess->time2retain); in qla4xxx_copy_to_fwddb_param()
3700 fw_ddb_entry->tgt_portal_grp = cpu_to_le16(sess->tpgt); in qla4xxx_copy_to_fwddb_param()
3701 fw_ddb_entry->mss = cpu_to_le16(conn->max_segment_size); in qla4xxx_copy_to_fwddb_param()
3702 fw_ddb_entry->tcp_xmt_wsf = (uint8_t) cpu_to_le32(conn->tcp_xmit_wsf); in qla4xxx_copy_to_fwddb_param()
3703 fw_ddb_entry->tcp_rcv_wsf = (uint8_t) cpu_to_le32(conn->tcp_recv_wsf); in qla4xxx_copy_to_fwddb_param()
3704 fw_ddb_entry->ipv6_flow_lbl = cpu_to_le16(conn->ipv6_flow_label); in qla4xxx_copy_to_fwddb_param()
3705 fw_ddb_entry->ka_timeout = cpu_to_le16(conn->keepalive_timeout); in qla4xxx_copy_to_fwddb_param()
3706 fw_ddb_entry->lcl_port = cpu_to_le16(conn->local_port); in qla4xxx_copy_to_fwddb_param()
3707 fw_ddb_entry->stat_sn = cpu_to_le32(conn->statsn); in qla4xxx_copy_to_fwddb_param()
3708 fw_ddb_entry->exp_stat_sn = cpu_to_le32(conn->exp_statsn); in qla4xxx_copy_to_fwddb_param()
3709 fw_ddb_entry->ddb_link = cpu_to_le16(sess->discovery_parent_idx); in qla4xxx_copy_to_fwddb_param()
3710 fw_ddb_entry->chap_tbl_idx = cpu_to_le16(sess->chap_out_idx); in qla4xxx_copy_to_fwddb_param()
3711 fw_ddb_entry->tsid = cpu_to_le16(sess->tsid); in qla4xxx_copy_to_fwddb_param()
3712 fw_ddb_entry->port = cpu_to_le16(conn->port); in qla4xxx_copy_to_fwddb_param()
3713 fw_ddb_entry->def_timeout = in qla4xxx_copy_to_fwddb_param()
3717 fw_ddb_entry->ipv4_tos = conn->ipv6_traffic_class; in qla4xxx_copy_to_fwddb_param()
3719 fw_ddb_entry->ipv4_tos = conn->ipv4_tos; in qla4xxx_copy_to_fwddb_param()
3722 memcpy(fw_ddb_entry->ip_addr, conn->ipaddress, in qla4xxx_copy_to_fwddb_param()
3723 sizeof(fw_ddb_entry->ip_addr)); in qla4xxx_copy_to_fwddb_param()
3726 memcpy(fw_ddb_entry->tgt_addr, conn->redirect_ipaddr, in qla4xxx_copy_to_fwddb_param()
3727 sizeof(fw_ddb_entry->tgt_addr)); in qla4xxx_copy_to_fwddb_param()
3730 memcpy(fw_ddb_entry->link_local_ipv6_addr, in qla4xxx_copy_to_fwddb_param()
3732 sizeof(fw_ddb_entry->link_local_ipv6_addr)); in qla4xxx_copy_to_fwddb_param()
3735 memcpy(fw_ddb_entry->iscsi_name, sess->targetname, in qla4xxx_copy_to_fwddb_param()
3736 sizeof(fw_ddb_entry->iscsi_name)); in qla4xxx_copy_to_fwddb_param()
3739 memcpy(fw_ddb_entry->iscsi_alias, sess->targetalias, in qla4xxx_copy_to_fwddb_param()
3740 sizeof(fw_ddb_entry->iscsi_alias)); in qla4xxx_copy_to_fwddb_param()
3742 COPY_ISID(fw_ddb_entry->isid, sess->isid); in qla4xxx_copy_to_fwddb_param()
3749 struct dev_db_entry *fw_ddb_entry) in qla4xxx_copy_to_sess_conn_params() argument
3756 options = le16_to_cpu(fw_ddb_entry->options); in qla4xxx_copy_to_sess_conn_params()
3762 options = le16_to_cpu(fw_ddb_entry->iscsi_options); in qla4xxx_copy_to_sess_conn_params()
3781 options = le16_to_cpu(fw_ddb_entry->tcp_options); in qla4xxx_copy_to_sess_conn_params()
3795 options = le16_to_cpu(fw_ddb_entry->ip_options); in qla4xxx_copy_to_sess_conn_params()
3799 le16_to_cpu(fw_ddb_entry->iscsi_max_rcv_data_seg_len); in qla4xxx_copy_to_sess_conn_params()
3801 le16_to_cpu(fw_ddb_entry->iscsi_max_snd_data_seg_len); in qla4xxx_copy_to_sess_conn_params()
3802 sess->max_r2t = le16_to_cpu(fw_ddb_entry->iscsi_max_outsnd_r2t); in qla4xxx_copy_to_sess_conn_params()
3804 le16_to_cpu(fw_ddb_entry->iscsi_first_burst_len); in qla4xxx_copy_to_sess_conn_params()
3806 le16_to_cpu(fw_ddb_entry->iscsi_max_burst_len); in qla4xxx_copy_to_sess_conn_params()
3807 sess->time2wait = le16_to_cpu(fw_ddb_entry->iscsi_def_time2wait); in qla4xxx_copy_to_sess_conn_params()
3808 sess->time2retain = le16_to_cpu(fw_ddb_entry->iscsi_def_time2retain); in qla4xxx_copy_to_sess_conn_params()
3809 sess->tpgt = le32_to_cpu(fw_ddb_entry->tgt_portal_grp); in qla4xxx_copy_to_sess_conn_params()
3810 conn->max_segment_size = le16_to_cpu(fw_ddb_entry->mss); in qla4xxx_copy_to_sess_conn_params()
3811 conn->tcp_xmit_wsf = fw_ddb_entry->tcp_xmt_wsf; in qla4xxx_copy_to_sess_conn_params()
3812 conn->tcp_recv_wsf = fw_ddb_entry->tcp_rcv_wsf; in qla4xxx_copy_to_sess_conn_params()
3813 conn->ipv4_tos = fw_ddb_entry->ipv4_tos; in qla4xxx_copy_to_sess_conn_params()
3814 conn->keepalive_tmo = le16_to_cpu(fw_ddb_entry->ka_timeout); in qla4xxx_copy_to_sess_conn_params()
3815 conn->local_port = le16_to_cpu(fw_ddb_entry->lcl_port); in qla4xxx_copy_to_sess_conn_params()
3816 conn->statsn = le32_to_cpu(fw_ddb_entry->stat_sn); in qla4xxx_copy_to_sess_conn_params()
3817 conn->exp_statsn = le32_to_cpu(fw_ddb_entry->exp_stat_sn); in qla4xxx_copy_to_sess_conn_params()
3818 sess->tsid = le16_to_cpu(fw_ddb_entry->tsid); in qla4xxx_copy_to_sess_conn_params()
3819 COPY_ISID(sess->isid, fw_ddb_entry->isid); in qla4xxx_copy_to_sess_conn_params()
3821 ddb_link = le16_to_cpu(fw_ddb_entry->ddb_link); in qla4xxx_copy_to_sess_conn_params()
3835 (char *)fw_ddb_entry->iscsi_alias, 0); in qla4xxx_copy_to_sess_conn_params()
3837 options = le16_to_cpu(fw_ddb_entry->options); in qla4xxx_copy_to_sess_conn_params()
3840 sprintf(ip_addr, "%pI6", fw_ddb_entry->link_local_ipv6_addr); in qla4xxx_copy_to_sess_conn_params()
3847 struct dev_db_entry *fw_ddb_entry, in qla4xxx_copy_fwddb_param() argument
3864 ddb_entry->chap_tbl_idx = le16_to_cpu(fw_ddb_entry->chap_tbl_idx); in qla4xxx_copy_fwddb_param()
3866 qla4xxx_copy_to_sess_conn_params(conn, sess, fw_ddb_entry); in qla4xxx_copy_fwddb_param()
3868 sess->def_taskmgmt_tmo = le16_to_cpu(fw_ddb_entry->def_timeout); in qla4xxx_copy_fwddb_param()
3869 conn->persistent_port = le16_to_cpu(fw_ddb_entry->port); in qla4xxx_copy_fwddb_param()
3872 options = le16_to_cpu(fw_ddb_entry->options); in qla4xxx_copy_fwddb_param()
3877 sprintf(ip_addr, "%pI6", fw_ddb_entry->ip_addr); in qla4xxx_copy_fwddb_param()
3880 sprintf(ip_addr, "%pI4", fw_ddb_entry->ip_addr); in qla4xxx_copy_fwddb_param()
3886 (char *)fw_ddb_entry->iscsi_name, buflen); in qla4xxx_copy_fwddb_param()
3911 struct dev_db_entry *fw_ddb_entry; in qla4xxx_update_session_conn_fwddb_param() local
3913 fw_ddb_entry = dma_alloc_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), in qla4xxx_update_session_conn_fwddb_param()
3915 if (!fw_ddb_entry) { in qla4xxx_update_session_conn_fwddb_param()
3921 if (qla4xxx_get_fwddb_entry(ha, ddb_entry->fw_ddb_index, fw_ddb_entry, in qla4xxx_update_session_conn_fwddb_param()
3936 qla4xxx_copy_fwddb_param(ha, fw_ddb_entry, cls_sess, cls_conn); in qla4xxx_update_session_conn_fwddb_param()
3939 if (fw_ddb_entry) in qla4xxx_update_session_conn_fwddb_param()
3940 dma_free_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), in qla4xxx_update_session_conn_fwddb_param()
3941 fw_ddb_entry, fw_ddb_entry_dma); in qla4xxx_update_session_conn_fwddb_param()
3953 struct dev_db_entry *fw_ddb_entry; in qla4xxx_update_session_conn_param() local
3955 fw_ddb_entry = dma_alloc_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), in qla4xxx_update_session_conn_param()
3957 if (!fw_ddb_entry) { in qla4xxx_update_session_conn_param()
3963 if (qla4xxx_get_fwddb_entry(ha, ddb_entry->fw_ddb_index, fw_ddb_entry, in qla4xxx_update_session_conn_param()
3981 (le16_to_cpu(fw_ddb_entry->def_timeout) > LOGIN_TOV) && in qla4xxx_update_session_conn_param()
3982 (le16_to_cpu(fw_ddb_entry->def_timeout) < LOGIN_TOV * 10) ? in qla4xxx_update_session_conn_param()
3983 le16_to_cpu(fw_ddb_entry->def_timeout) : LOGIN_TOV; in qla4xxx_update_session_conn_param()
3985 le16_to_cpu(fw_ddb_entry->iscsi_def_time2wait); in qla4xxx_update_session_conn_param()
3988 ddb_entry->chap_tbl_idx = le16_to_cpu(fw_ddb_entry->chap_tbl_idx); in qla4xxx_update_session_conn_param()
3989 qla4xxx_copy_to_sess_conn_params(conn, sess, fw_ddb_entry); in qla4xxx_update_session_conn_param()
3995 if (fw_ddb_entry) in qla4xxx_update_session_conn_param()
3996 dma_free_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), in qla4xxx_update_session_conn_param()
3997 fw_ddb_entry, fw_ddb_entry_dma); in qla4xxx_update_session_conn_param()
6078 struct dev_db_entry *fw_ddb_entry; in qla4xxx_get_boot_target() local
6084 fw_ddb_entry = dma_alloc_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), in qla4xxx_get_boot_target()
6086 if (!fw_ddb_entry) { in qla4xxx_get_boot_target()
6094 if (qla4xxx_bootdb_by_index(ha, fw_ddb_entry, in qla4xxx_get_boot_target()
6103 memcpy(boot_sess->target_name, fw_ddb_entry->iscsi_name, in qla4xxx_get_boot_target()
6105 sizeof(fw_ddb_entry->iscsi_name))); in qla4xxx_get_boot_target()
6107 options = le16_to_cpu(fw_ddb_entry->options); in qla4xxx_get_boot_target()
6110 &fw_ddb_entry->ip_addr[0], IPv6_ADDR_LEN); in qla4xxx_get_boot_target()
6114 &fw_ddb_entry->ip_addr[0], IP_ADDR_LEN); in qla4xxx_get_boot_target()
6117 boot_conn->dest_port = le16_to_cpu(fw_ddb_entry->port); in qla4xxx_get_boot_target()
6120 idx = __le16_to_cpu(fw_ddb_entry->chap_tbl_idx); in qla4xxx_get_boot_target()
6122 if (BIT_7 & le16_to_cpu(fw_ddb_entry->iscsi_options)) { in qla4xxx_get_boot_target()
6140 if (BIT_4 & le16_to_cpu(fw_ddb_entry->iscsi_options)) { in qla4xxx_get_boot_target()
6159 dma_free_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), in qla4xxx_get_boot_target()
6160 fw_ddb_entry, fw_ddb_entry_dma); in qla4xxx_get_boot_target()
6295 static void qla4xxx_convert_param_ddb(struct dev_db_entry *fw_ddb_entry, in qla4xxx_convert_param_ddb() argument
6301 tddb->tpgt = le32_to_cpu(fw_ddb_entry->tgt_portal_grp); in qla4xxx_convert_param_ddb()
6302 memcpy(&tddb->iscsi_name[0], &fw_ddb_entry->iscsi_name[0], in qla4xxx_convert_param_ddb()
6303 min(sizeof(tddb->iscsi_name), sizeof(fw_ddb_entry->iscsi_name))); in qla4xxx_convert_param_ddb()
6305 options = le16_to_cpu(fw_ddb_entry->options); in qla4xxx_convert_param_ddb()
6307 sprintf(tddb->ip_addr, "%pI6", fw_ddb_entry->ip_addr); in qla4xxx_convert_param_ddb()
6309 sprintf(tddb->ip_addr, "%pI4", fw_ddb_entry->ip_addr); in qla4xxx_convert_param_ddb()
6311 tddb->port = le16_to_cpu(fw_ddb_entry->port); in qla4xxx_convert_param_ddb()
6314 memcpy(&tddb->isid[0], &fw_ddb_entry->isid[0], in qla4xxx_convert_param_ddb()
6360 struct dev_db_entry *fw_ddb_entry, in qla4xxx_is_session_exists() argument
6385 qla4xxx_convert_param_ddb(fw_ddb_entry, fw_tddb, NULL); in qla4xxx_is_session_exists()
6420 struct dev_db_entry *fw_ddb_entry; in qla4xxx_check_existing_isid() local
6423 fw_ddb_entry = &nt_ddb_idx->fw_ddb; in qla4xxx_check_existing_isid()
6425 if (memcmp(&fw_ddb_entry->isid[0], &isid[0], in qla4xxx_check_existing_isid()
6445 struct dev_db_entry *fw_ddb_entry) in qla4xxx_update_isid() argument
6449 base_value = fw_ddb_entry->isid[1] & 0x1f; in qla4xxx_update_isid()
6451 fw_ddb_entry->isid[1] = (base_value | (i << 5)); in qla4xxx_update_isid()
6452 if (qla4xxx_check_existing_isid(list_nt, fw_ddb_entry->isid)) in qla4xxx_update_isid()
6456 if (!qla4xxx_check_existing_isid(list_nt, fw_ddb_entry->isid)) in qla4xxx_update_isid()
6507 struct dev_db_entry *fw_ddb_entry) in qla4xxx_is_flash_ddb_exists() argument
6530 qla4xxx_convert_param_ddb(fw_ddb_entry, fw_tddb, NULL); in qla4xxx_is_flash_ddb_exists()
6546 rval = qla4xxx_update_isid(ha, list_nt, fw_ddb_entry); in qla4xxx_is_flash_ddb_exists()
6575 struct dev_db_entry *fw_ddb_entry) in qla4xxx_get_ep_fwdb() argument
6589 if (fw_ddb_entry->options & DDB_OPT_IPV6_DEVICE) { in qla4xxx_get_ep_fwdb()
6594 memcpy(ip, fw_ddb_entry->ip_addr, IPv6_ADDR_LEN); in qla4xxx_get_ep_fwdb()
6595 addr6->sin6_port = htons(le16_to_cpu(fw_ddb_entry->port)); in qla4xxx_get_ep_fwdb()
6602 memcpy(ip, fw_ddb_entry->ip_addr, IP_ADDR_LEN); in qla4xxx_get_ep_fwdb()
6603 addr->sin_port = htons(le16_to_cpu(fw_ddb_entry->port)); in qla4xxx_get_ep_fwdb()
6637 def_timeout = le16_to_cpu(ddb_entry->fw_ddb_entry.def_timeout); in qla4xxx_setup_flash_ddb_entry()
6642 le16_to_cpu(ddb_entry->fw_ddb_entry.iscsi_def_time2wait); in qla4xxx_setup_flash_ddb_entry()
6694 static int qla4xxx_cmp_fw_stentry(struct dev_db_entry *fw_ddb_entry, in qla4xxx_cmp_fw_stentry() argument
6700 options = le16_to_cpu(fw_ddb_entry->options); in qla4xxx_cmp_fw_stentry()
6704 if (memcmp(fw_ddb_entry->ip_addr, flash_ddb_entry->ip_addr, ip_len)) in qla4xxx_cmp_fw_stentry()
6707 if (memcmp(&fw_ddb_entry->isid[0], &flash_ddb_entry->isid[0], in qla4xxx_cmp_fw_stentry()
6708 sizeof(fw_ddb_entry->isid))) in qla4xxx_cmp_fw_stentry()
6711 if (memcmp(&fw_ddb_entry->port, &flash_ddb_entry->port, in qla4xxx_cmp_fw_stentry()
6712 sizeof(fw_ddb_entry->port))) in qla4xxx_cmp_fw_stentry()
6719 struct dev_db_entry *fw_ddb_entry, in qla4xxx_find_flash_st_idx() argument
6733 if (flash_ddb_entry == NULL || fw_ddb_entry == NULL) { in qla4xxx_find_flash_st_idx()
6741 status = qla4xxx_cmp_fw_stentry(fw_ddb_entry, flash_ddb_entry); in qla4xxx_find_flash_st_idx()
6755 status = qla4xxx_cmp_fw_stentry(fw_ddb_entry, flash_ddb_entry); in qla4xxx_find_flash_st_idx()
6781 struct dev_db_entry *fw_ddb_entry; in qla4xxx_build_st_list() local
6789 fw_ddb_entry = dma_pool_alloc(ha->fw_ddb_dma_pool, GFP_KERNEL, in qla4xxx_build_st_list()
6791 if (fw_ddb_entry == NULL) { in qla4xxx_build_st_list()
6801 ret = qla4xxx_get_fwddb_entry(ha, idx, fw_ddb_entry, fw_ddb_dma, in qla4xxx_build_st_list()
6812 if (strlen((char *) fw_ddb_entry->iscsi_name) != 0) in qla4xxx_build_st_list()
6819 ret = qla4xxx_find_flash_st_idx(ha, fw_ddb_entry, idx, in qla4xxx_build_st_list()
6841 if (fw_ddb_entry) in qla4xxx_build_st_list()
6842 dma_pool_free(ha->fw_ddb_dma_pool, fw_ddb_entry, fw_ddb_dma); in qla4xxx_build_st_list()
6878 struct dev_db_entry *fw_ddb_entry) in qla4xxx_update_sess_disc_idx() argument
6891 ddb_link = le16_to_cpu(fw_ddb_entry->ddb_link); in qla4xxx_update_sess_disc_idx()
6899 struct dev_db_entry *fw_ddb_entry, in qla4xxx_sess_conn_setup() argument
6935 memcpy(&ddb_entry->fw_ddb_entry, fw_ddb_entry, in qla4xxx_sess_conn_setup()
6950 ep = qla4xxx_get_ep_fwdb(ha, fw_ddb_entry); in qla4xxx_sess_conn_setup()
6961 qla4xxx_copy_fwddb_param(ha, fw_ddb_entry, cls_sess, cls_conn); in qla4xxx_sess_conn_setup()
6962 qla4xxx_update_sess_disc_idx(ha, ddb_entry, fw_ddb_entry); in qla4xxx_sess_conn_setup()
6981 struct dev_db_entry *fw_ddb_entry) in qla4xxx_update_fw_ddb_link() argument
6986 ddb_link = le16_to_cpu(fw_ddb_entry->ddb_link); in qla4xxx_update_fw_ddb_link()
6993 fw_ddb_entry->ddb_link = in qla4xxx_update_fw_ddb_link()
7005 struct dev_db_entry *fw_ddb_entry; in qla4xxx_build_nt_list() local
7018 fw_ddb_entry = dma_pool_alloc(ha->fw_ddb_dma_pool, GFP_KERNEL, in qla4xxx_build_nt_list()
7020 if (fw_ddb_entry == NULL) { in qla4xxx_build_nt_list()
7029 ret = qla4xxx_get_fwddb_entry(ha, idx, fw_ddb_entry, fw_ddb_dma, in qla4xxx_build_nt_list()
7039 if (strlen((char *) fw_ddb_entry->iscsi_name) == 0) in qla4xxx_build_nt_list()
7042 ddb_link = le16_to_cpu(fw_ddb_entry->ddb_link); in qla4xxx_build_nt_list()
7044 qla4xxx_update_fw_ddb_link(ha, list_st, fw_ddb_entry); in qla4xxx_build_nt_list()
7066 &fw_ddb_entry->isid[0], in qla4xxx_build_nt_list()
7070 fw_ddb_entry); in qla4xxx_build_nt_list()
7078 memcpy(&nt_ddb_idx->fw_ddb, fw_ddb_entry, in qla4xxx_build_nt_list()
7083 ret = qla4xxx_is_session_exists(ha, fw_ddb_entry, in qla4xxx_build_nt_list()
7091 fw_ddb_entry); in qla4xxx_build_nt_list()
7096 ret = qla4xxx_sess_conn_setup(ha, fw_ddb_entry, is_reset, idx); in qla4xxx_build_nt_list()
7106 if (fw_ddb_entry) in qla4xxx_build_nt_list()
7107 dma_pool_free(ha->fw_ddb_dma_pool, fw_ddb_entry, fw_ddb_dma); in qla4xxx_build_nt_list()
7114 struct dev_db_entry *fw_ddb_entry; in qla4xxx_build_new_nt_list() local
7124 fw_ddb_entry = dma_pool_alloc(ha->fw_ddb_dma_pool, GFP_KERNEL, in qla4xxx_build_new_nt_list()
7126 if (fw_ddb_entry == NULL) { in qla4xxx_build_new_nt_list()
7135 ret = qla4xxx_get_fwddb_entry(ha, idx, fw_ddb_entry, fw_ddb_dma, in qla4xxx_build_new_nt_list()
7142 if (strlen((char *)fw_ddb_entry->iscsi_name) == 0) in qla4xxx_build_new_nt_list()
7157 ret = qla4xxx_is_session_exists(ha, fw_ddb_entry, NULL); in qla4xxx_build_new_nt_list()
7165 fw_ddb_entry->ddb_link = cpu_to_le16(target_id); in qla4xxx_build_new_nt_list()
7169 ret = qla4xxx_sess_conn_setup(ha, fw_ddb_entry, RESET_ADAPTER, in qla4xxx_build_new_nt_list()
7180 if (fw_ddb_entry) in qla4xxx_build_new_nt_list()
7181 dma_pool_free(ha->fw_ddb_dma_pool, fw_ddb_entry, fw_ddb_dma); in qla4xxx_build_new_nt_list()
7222 struct dev_db_entry *fw_ddb_entry, in qla4xxx_sysfs_ddb_tgt_create() argument
7259 fw_ddb_entry); in qla4xxx_sysfs_ddb_tgt_create()
7291 struct dev_db_entry *fw_ddb_entry = NULL; in qla4xxx_sysfs_ddb_add() local
7309 fw_ddb_entry = dma_alloc_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), in qla4xxx_sysfs_ddb_add()
7311 if (!fw_ddb_entry) { in qla4xxx_sysfs_ddb_add()
7330 if (qla4xxx_flashdb_by_index(ha, fw_ddb_entry, in qla4xxx_sysfs_ddb_add()
7345 rval = qla4xxx_sysfs_ddb_tgt_create(ha, fw_ddb_entry, &idx, 1); in qla4xxx_sysfs_ddb_add()
7348 if (fw_ddb_entry) in qla4xxx_sysfs_ddb_add()
7349 dma_free_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), in qla4xxx_sysfs_ddb_add()
7350 fw_ddb_entry, fw_ddb_entry_dma); in qla4xxx_sysfs_ddb_add()
7371 struct dev_db_entry *fw_ddb_entry = NULL; in qla4xxx_sysfs_ddb_apply() local
7376 fw_ddb_entry = dma_alloc_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), in qla4xxx_sysfs_ddb_apply()
7378 if (!fw_ddb_entry) { in qla4xxx_sysfs_ddb_apply()
7394 sizeof(*fw_ddb_entry)); in qla4xxx_sysfs_ddb_apply()
7396 qla4xxx_copy_to_fwddb_param(fnode_sess, fnode_conn, fw_ddb_entry); in qla4xxx_sysfs_ddb_apply()
7397 fw_ddb_entry->cookie = DDB_VALID_COOKIE; in qla4xxx_sysfs_ddb_apply()
7400 sizeof(*fw_ddb_entry), FLASH_OPT_RMW_COMMIT); in qla4xxx_sysfs_ddb_apply()
7415 if (fw_ddb_entry) in qla4xxx_sysfs_ddb_apply()
7416 dma_free_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), in qla4xxx_sysfs_ddb_apply()
7417 fw_ddb_entry, fw_ddb_entry_dma); in qla4xxx_sysfs_ddb_apply()
7422 struct dev_db_entry *fw_ddb_entry, in qla4xxx_sysfs_ddb_conn_open() argument
7442 memcpy(ddb_entry, fw_ddb_entry, sizeof(*ddb_entry)); in qla4xxx_sysfs_ddb_conn_open()
7485 struct dev_db_entry *fw_ddb_entry, in qla4xxx_ddb_login_st() argument
7507 ret = qla4xxx_sysfs_ddb_conn_open(ha, fw_ddb_entry, ddb_index); in qla4xxx_ddb_login_st()
7533 struct dev_db_entry *fw_ddb_entry, in qla4xxx_ddb_login_nt() argument
7538 ret = qla4xxx_is_session_exists(ha, fw_ddb_entry, NULL); in qla4xxx_ddb_login_nt()
7540 ret = qla4xxx_sess_conn_setup(ha, fw_ddb_entry, RESET_ADAPTER, in qla4xxx_ddb_login_nt()
7560 struct dev_db_entry *fw_ddb_entry = NULL; in qla4xxx_sysfs_ddb_login() local
7572 fw_ddb_entry = dma_alloc_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), in qla4xxx_sysfs_ddb_login()
7574 if (!fw_ddb_entry) { in qla4xxx_sysfs_ddb_login()
7589 qla4xxx_copy_to_fwddb_param(fnode_sess, fnode_conn, fw_ddb_entry); in qla4xxx_sysfs_ddb_login()
7590 fw_ddb_entry->cookie = DDB_VALID_COOKIE; in qla4xxx_sysfs_ddb_login()
7592 if (strlen((char *)fw_ddb_entry->iscsi_name) == 0) in qla4xxx_sysfs_ddb_login()
7593 ret = qla4xxx_ddb_login_st(ha, fw_ddb_entry, in qla4xxx_sysfs_ddb_login()
7596 ret = qla4xxx_ddb_login_nt(ha, fw_ddb_entry, in qla4xxx_sysfs_ddb_login()
7603 if (fw_ddb_entry) in qla4xxx_sysfs_ddb_login()
7604 dma_free_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), in qla4xxx_sysfs_ddb_login()
7605 fw_ddb_entry, fw_ddb_entry_dma); in qla4xxx_sysfs_ddb_login()
7620 struct dev_db_entry *fw_ddb_entry = NULL; in qla4xxx_sysfs_ddb_logout_sid() local
7647 fw_ddb_entry = dma_alloc_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), in qla4xxx_sysfs_ddb_logout_sid()
7649 if (!fw_ddb_entry) { in qla4xxx_sysfs_ddb_logout_sid()
7660 fw_ddb_entry, fw_ddb_entry_dma, in qla4xxx_sysfs_ddb_logout_sid()
7687 memset(fw_ddb_entry, 0, sizeof(*fw_ddb_entry)); in qla4xxx_sysfs_ddb_logout_sid()
7691 fw_ddb_entry, fw_ddb_entry_dma, in qla4xxx_sysfs_ddb_logout_sid()
7726 if (fw_ddb_entry) in qla4xxx_sysfs_ddb_logout_sid()
7727 dma_free_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), in qla4xxx_sysfs_ddb_logout_sid()
7728 fw_ddb_entry, fw_ddb_entry_dma); in qla4xxx_sysfs_ddb_logout_sid()
7746 struct dev_db_entry *fw_ddb_entry = NULL; in qla4xxx_sysfs_ddb_logout() local
7755 fw_ddb_entry = dma_pool_alloc(ha->fw_ddb_dma_pool, GFP_KERNEL, in qla4xxx_sysfs_ddb_logout()
7757 if (fw_ddb_entry == NULL) { in qla4xxx_sysfs_ddb_logout()
7817 status = qla4xxx_get_fwddb_entry(ha, index, fw_ddb_entry, in qla4xxx_sysfs_ddb_logout()
7826 qla4xxx_convert_param_ddb(fw_ddb_entry, tmp_tddb, NULL); in qla4xxx_sysfs_ddb_logout()
7844 if (fw_ddb_entry) in qla4xxx_sysfs_ddb_logout()
7845 dma_pool_free(ha->fw_ddb_dma_pool, fw_ddb_entry, fw_ddb_dma); in qla4xxx_sysfs_ddb_logout()
8339 struct dev_db_entry *fw_ddb_entry = NULL; in qla4xxx_sysfs_ddb_delete() local
8362 sizeof(*fw_ddb_entry)); in qla4xxx_sysfs_ddb_delete()
8363 ddb_size = sizeof(*fw_ddb_entry); in qla4xxx_sysfs_ddb_delete()
8377 sizeof(*fw_ddb_entry)); in qla4xxx_sysfs_ddb_delete()
8404 fw_ddb_entry = pddb; in qla4xxx_sysfs_ddb_delete()
8405 memset(fw_ddb_entry, 0, ddb_size); in qla4xxx_sysfs_ddb_delete()
8406 ddb_cookie = &fw_ddb_entry->cookie; in qla4xxx_sysfs_ddb_delete()
8437 struct dev_db_entry *fw_ddb_entry = NULL; in qla4xxx_sysfs_ddb_export() local
8443 fw_ddb_entry = dma_alloc_coherent(&ha->pdev->dev, in qla4xxx_sysfs_ddb_export()
8444 sizeof(*fw_ddb_entry), in qla4xxx_sysfs_ddb_export()
8446 if (!fw_ddb_entry) { in qla4xxx_sysfs_ddb_export()
8457 if (qla4xxx_flashdb_by_index(ha, fw_ddb_entry, fw_ddb_entry_dma, in qla4xxx_sysfs_ddb_export()
8461 ret = qla4xxx_sysfs_ddb_tgt_create(ha, fw_ddb_entry, &idx, 0); in qla4xxx_sysfs_ddb_export()
8468 dma_free_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), fw_ddb_entry, in qla4xxx_sysfs_ddb_export()
8555 struct dev_db_entry *fw_ddb_entry = NULL; in qla4xxx_wait_login_resp_boot_tgt() local
8564 fw_ddb_entry = dma_alloc_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), in qla4xxx_wait_login_resp_boot_tgt()
8566 if (!fw_ddb_entry) { in qla4xxx_wait_login_resp_boot_tgt()
8586 fw_ddb_entry, fw_ddb_entry_dma, in qla4xxx_wait_login_resp_boot_tgt()
8610 if (fw_ddb_entry) in qla4xxx_wait_login_resp_boot_tgt()
8611 dma_free_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), in qla4xxx_wait_login_resp_boot_tgt()
8612 fw_ddb_entry, fw_ddb_entry_dma); in qla4xxx_wait_login_resp_boot_tgt()
8933 struct dev_db_entry *fw_ddb_entry = NULL; in qla4xxx_destroy_ddb() local
8946 fw_ddb_entry = dma_alloc_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), in qla4xxx_destroy_ddb()
8948 if (!fw_ddb_entry) { in qla4xxx_destroy_ddb()
8957 fw_ddb_entry, fw_ddb_entry_dma, in qla4xxx_destroy_ddb()
8971 dma_free_coherent(&ha->pdev->dev, sizeof(*fw_ddb_entry), in qla4xxx_destroy_ddb()
8972 fw_ddb_entry, fw_ddb_entry_dma); in qla4xxx_destroy_ddb()