Lines Matching refs:fnode_sess
171 qla4xxx_sysfs_ddb_set_param(struct iscsi_bus_flash_session *fnode_sess,
175 qla4xxx_sysfs_ddb_get_param(struct iscsi_bus_flash_session *fnode_sess,
180 qla4xxx_sysfs_ddb_delete(struct iscsi_bus_flash_session *fnode_sess);
181 static int qla4xxx_sysfs_ddb_login(struct iscsi_bus_flash_session *fnode_sess,
183 static int qla4xxx_sysfs_ddb_logout(struct iscsi_bus_flash_session *fnode_sess,
7184 struct iscsi_bus_flash_session *fnode_sess; in qla4xxx_sysfs_ddb_is_non_persistent() local
7189 fnode_sess = iscsi_dev_to_flash_session(dev); in qla4xxx_sysfs_ddb_is_non_persistent()
7191 return (fnode_sess->flash_state == DEV_DB_NON_PERSISTENT); in qla4xxx_sysfs_ddb_is_non_persistent()
7214 struct iscsi_bus_flash_session *fnode_sess = NULL; in qla4xxx_sysfs_ddb_tgt_create() local
7218 fnode_sess = iscsi_create_flashnode_sess(ha->host, *idx, in qla4xxx_sysfs_ddb_tgt_create()
7220 if (!fnode_sess) { in qla4xxx_sysfs_ddb_tgt_create()
7227 fnode_conn = iscsi_create_flashnode_conn(ha->host, fnode_sess, in qla4xxx_sysfs_ddb_tgt_create()
7237 fnode_sess->flash_state = DEV_DB_NON_PERSISTENT; in qla4xxx_sysfs_ddb_tgt_create()
7239 fnode_sess->flash_state = DEV_DB_PERSISTENT; in qla4xxx_sysfs_ddb_tgt_create()
7242 fnode_sess->is_boot_target = 1; in qla4xxx_sysfs_ddb_tgt_create()
7244 fnode_sess->is_boot_target = 0; in qla4xxx_sysfs_ddb_tgt_create()
7247 rc = qla4xxx_copy_from_fwddb_param(fnode_sess, fnode_conn, in qla4xxx_sysfs_ddb_tgt_create()
7253 __func__, fnode_sess->dev.kobj.name); in qla4xxx_sysfs_ddb_tgt_create()
7261 iscsi_destroy_flashnode_sess(fnode_sess); in qla4xxx_sysfs_ddb_tgt_create()
7354 static int qla4xxx_sysfs_ddb_apply(struct iscsi_bus_flash_session *fnode_sess, in qla4xxx_sysfs_ddb_apply() argument
7357 struct Scsi_Host *shost = iscsi_flash_session_to_shost(fnode_sess); in qla4xxx_sysfs_ddb_apply()
7375 if (!strncasecmp(fnode_sess->portal_type, PORTAL_TYPE_IPV6, 4)) in qla4xxx_sysfs_ddb_apply()
7382 dev_db_start_offset += (fnode_sess->target_id * in qla4xxx_sysfs_ddb_apply()
7385 qla4xxx_copy_to_fwddb_param(fnode_sess, fnode_conn, fw_ddb_entry); in qla4xxx_sysfs_ddb_apply()
7392 fnode_sess->flash_state = DEV_DB_PERSISTENT; in qla4xxx_sysfs_ddb_apply()
7395 __func__, fnode_sess->target_id, ha->host_no); in qla4xxx_sysfs_ddb_apply()
7400 __func__, fnode_sess->target_id, ha->host_no); in qla4xxx_sysfs_ddb_apply()
7544 static int qla4xxx_sysfs_ddb_login(struct iscsi_bus_flash_session *fnode_sess, in qla4xxx_sysfs_ddb_login() argument
7547 struct Scsi_Host *shost = iscsi_flash_session_to_shost(fnode_sess); in qla4xxx_sysfs_ddb_login()
7554 if (fnode_sess->flash_state == DEV_DB_NON_PERSISTENT) { in qla4xxx_sysfs_ddb_login()
7571 if (!strncasecmp(fnode_sess->portal_type, PORTAL_TYPE_IPV6, 4)) in qla4xxx_sysfs_ddb_login()
7578 qla4xxx_copy_to_fwddb_param(fnode_sess, fnode_conn, fw_ddb_entry); in qla4xxx_sysfs_ddb_login()
7583 fnode_sess->target_id); in qla4xxx_sysfs_ddb_login()
7586 fnode_sess->target_id); in qla4xxx_sysfs_ddb_login()
7728 static int qla4xxx_sysfs_ddb_logout(struct iscsi_bus_flash_session *fnode_sess, in qla4xxx_sysfs_ddb_logout() argument
7731 struct Scsi_Host *shost = iscsi_flash_session_to_shost(fnode_sess); in qla4xxx_sysfs_ddb_logout()
7768 if (!fnode_sess->targetname) { in qla4xxx_sysfs_ddb_logout()
7776 if (fnode_sess->is_boot_target) { in qla4xxx_sysfs_ddb_logout()
7784 strlcpy(flash_tddb->iscsi_name, fnode_sess->targetname, in qla4xxx_sysfs_ddb_logout()
7787 if (!strncmp(fnode_sess->portal_type, PORTAL_TYPE_IPV6, 4)) in qla4xxx_sysfs_ddb_logout()
7792 flash_tddb->tpgt = fnode_sess->tpgt; in qla4xxx_sysfs_ddb_logout()
7795 COPY_ISID(flash_tddb->isid, fnode_sess->isid); in qla4xxx_sysfs_ddb_logout()
7838 qla4xxx_sysfs_ddb_get_param(struct iscsi_bus_flash_session *fnode_sess, in qla4xxx_sysfs_ddb_get_param() argument
7841 struct Scsi_Host *shost = iscsi_flash_session_to_shost(fnode_sess); in qla4xxx_sysfs_ddb_get_param()
7849 dev = iscsi_find_flashnode_conn(fnode_sess); in qla4xxx_sysfs_ddb_get_param()
7860 rc = sprintf(buf, "%s\n", fnode_sess->portal_type); in qla4xxx_sysfs_ddb_get_param()
7863 rc = sprintf(buf, "%u\n", fnode_sess->auto_snd_tgt_disable); in qla4xxx_sysfs_ddb_get_param()
7866 rc = sprintf(buf, "%u\n", fnode_sess->discovery_sess); in qla4xxx_sysfs_ddb_get_param()
7869 rc = sprintf(buf, "%u\n", fnode_sess->entry_state); in qla4xxx_sysfs_ddb_get_param()
7878 rc = sprintf(buf, "%u\n", fnode_sess->imm_data_en); in qla4xxx_sysfs_ddb_get_param()
7881 rc = sprintf(buf, "%u\n", fnode_sess->initial_r2t_en); in qla4xxx_sysfs_ddb_get_param()
7884 rc = sprintf(buf, "%u\n", fnode_sess->dataseq_inorder_en); in qla4xxx_sysfs_ddb_get_param()
7887 rc = sprintf(buf, "%u\n", fnode_sess->pdu_inorder_en); in qla4xxx_sysfs_ddb_get_param()
7890 rc = sprintf(buf, "%u\n", fnode_sess->chap_auth_en); in qla4xxx_sysfs_ddb_get_param()
7896 rc = sprintf(buf, "%u\n", fnode_sess->discovery_logout_en); in qla4xxx_sysfs_ddb_get_param()
7899 rc = sprintf(buf, "%u\n", fnode_sess->bidi_chap_en); in qla4xxx_sysfs_ddb_get_param()
7902 rc = sprintf(buf, "%u\n", fnode_sess->discovery_auth_optional); in qla4xxx_sysfs_ddb_get_param()
7905 rc = sprintf(buf, "%u\n", fnode_sess->erl); in qla4xxx_sysfs_ddb_get_param()
7932 rc = sprintf(buf, "%u\n", fnode_sess->first_burst); in qla4xxx_sysfs_ddb_get_param()
7935 rc = sprintf(buf, "%u\n", fnode_sess->time2wait); in qla4xxx_sysfs_ddb_get_param()
7938 rc = sprintf(buf, "%u\n", fnode_sess->time2retain); in qla4xxx_sysfs_ddb_get_param()
7941 rc = sprintf(buf, "%u\n", fnode_sess->max_r2t); in qla4xxx_sysfs_ddb_get_param()
7947 rc = sprintf(buf, "%pm\n", fnode_sess->isid); in qla4xxx_sysfs_ddb_get_param()
7950 rc = sprintf(buf, "%u\n", fnode_sess->tsid); in qla4xxx_sysfs_ddb_get_param()
7956 rc = sprintf(buf, "%u\n", fnode_sess->max_burst); in qla4xxx_sysfs_ddb_get_param()
7960 fnode_sess->default_taskmgmt_timeout); in qla4xxx_sysfs_ddb_get_param()
7963 if (!strncmp(fnode_sess->portal_type, PORTAL_TYPE_IPV6, 4)) in qla4xxx_sysfs_ddb_get_param()
7969 if (fnode_sess->targetalias) in qla4xxx_sysfs_ddb_get_param()
7970 rc = sprintf(buf, "%s\n", fnode_sess->targetalias); in qla4xxx_sysfs_ddb_get_param()
7975 if (!strncmp(fnode_sess->portal_type, PORTAL_TYPE_IPV6, 4)) in qla4xxx_sysfs_ddb_get_param()
7992 if (!strncmp(fnode_sess->portal_type, PORTAL_TYPE_IPV6, 4)) in qla4xxx_sysfs_ddb_get_param()
8002 if (!strncmp(fnode_sess->portal_type, PORTAL_TYPE_IPV6, 4)) in qla4xxx_sysfs_ddb_get_param()
8009 rc = sprintf(buf, "%u\n", fnode_sess->discovery_parent_idx); in qla4xxx_sysfs_ddb_get_param()
8012 if (fnode_sess->discovery_parent_type == DDB_ISNS) in qla4xxx_sysfs_ddb_get_param()
8014 else if (fnode_sess->discovery_parent_type == DDB_NO_LINK) in qla4xxx_sysfs_ddb_get_param()
8016 else if (fnode_sess->discovery_parent_type < MAX_DDB_ENTRIES) in qla4xxx_sysfs_ddb_get_param()
8025 if (fnode_sess->targetname) in qla4xxx_sysfs_ddb_get_param()
8026 rc = sprintf(buf, "%s\n", fnode_sess->targetname); in qla4xxx_sysfs_ddb_get_param()
8031 rc = sprintf(buf, "%u\n", fnode_sess->tpgt); in qla4xxx_sysfs_ddb_get_param()
8040 rc = sprintf(buf, "%u\n", fnode_sess->chap_out_idx); in qla4xxx_sysfs_ddb_get_param()
8043 if (fnode_sess->chap_auth_en) { in qla4xxx_sysfs_ddb_get_param()
8047 fnode_sess->chap_out_idx); in qla4xxx_sysfs_ddb_get_param()
8054 if (fnode_sess->chap_auth_en) { in qla4xxx_sysfs_ddb_get_param()
8058 fnode_sess->chap_out_idx); in qla4xxx_sysfs_ddb_get_param()
8071 rc = sprintf(buf, "%u\n", fnode_sess->is_boot_target); in qla4xxx_sysfs_ddb_get_param()
8092 qla4xxx_sysfs_ddb_set_param(struct iscsi_bus_flash_session *fnode_sess, in qla4xxx_sysfs_ddb_set_param() argument
8096 struct Scsi_Host *shost = iscsi_flash_session_to_shost(fnode_sess); in qla4xxx_sysfs_ddb_set_param()
8114 memcpy(fnode_sess->portal_type, fnode_param->value, in qla4xxx_sysfs_ddb_set_param()
8115 strlen(fnode_sess->portal_type)); in qla4xxx_sysfs_ddb_set_param()
8118 fnode_sess->auto_snd_tgt_disable = in qla4xxx_sysfs_ddb_set_param()
8122 fnode_sess->discovery_sess = fnode_param->value[0]; in qla4xxx_sysfs_ddb_set_param()
8125 fnode_sess->entry_state = fnode_param->value[0]; in qla4xxx_sysfs_ddb_set_param()
8134 fnode_sess->imm_data_en = fnode_param->value[0]; in qla4xxx_sysfs_ddb_set_param()
8137 fnode_sess->initial_r2t_en = fnode_param->value[0]; in qla4xxx_sysfs_ddb_set_param()
8140 fnode_sess->dataseq_inorder_en = fnode_param->value[0]; in qla4xxx_sysfs_ddb_set_param()
8143 fnode_sess->pdu_inorder_en = fnode_param->value[0]; in qla4xxx_sysfs_ddb_set_param()
8146 fnode_sess->chap_auth_en = fnode_param->value[0]; in qla4xxx_sysfs_ddb_set_param()
8148 if (!fnode_sess->chap_auth_en) in qla4xxx_sysfs_ddb_set_param()
8149 fnode_sess->chap_out_idx = INVALID_ENTRY; in qla4xxx_sysfs_ddb_set_param()
8156 fnode_sess->discovery_logout_en = fnode_param->value[0]; in qla4xxx_sysfs_ddb_set_param()
8159 fnode_sess->bidi_chap_en = fnode_param->value[0]; in qla4xxx_sysfs_ddb_set_param()
8162 fnode_sess->discovery_auth_optional = in qla4xxx_sysfs_ddb_set_param()
8166 fnode_sess->erl = fnode_param->value[0]; in qla4xxx_sysfs_ddb_set_param()
8195 fnode_sess->first_burst = in qla4xxx_sysfs_ddb_set_param()
8199 fnode_sess->time2wait = *(uint16_t *)fnode_param->value; in qla4xxx_sysfs_ddb_set_param()
8202 fnode_sess->time2retain = in qla4xxx_sysfs_ddb_set_param()
8206 fnode_sess->max_r2t = in qla4xxx_sysfs_ddb_set_param()
8214 memcpy(fnode_sess->isid, fnode_param->value, in qla4xxx_sysfs_ddb_set_param()
8215 sizeof(fnode_sess->isid)); in qla4xxx_sysfs_ddb_set_param()
8218 fnode_sess->tsid = *(uint16_t *)fnode_param->value; in qla4xxx_sysfs_ddb_set_param()
8224 fnode_sess->max_burst = *(unsigned *)fnode_param->value; in qla4xxx_sysfs_ddb_set_param()
8227 fnode_sess->default_taskmgmt_timeout = in qla4xxx_sysfs_ddb_set_param()
8235 rc = iscsi_switch_str_param(&fnode_sess->targetalias, in qla4xxx_sysfs_ddb_set_param()
8260 rc = iscsi_switch_str_param(&fnode_sess->targetname, in qla4xxx_sysfs_ddb_set_param()
8264 fnode_sess->tpgt = *(uint16_t *)fnode_param->value; in qla4xxx_sysfs_ddb_set_param()
8271 fnode_sess->discovery_parent_idx = in qla4xxx_sysfs_ddb_set_param()
8295 fnode_sess->chap_out_idx = chap_out_idx; in qla4xxx_sysfs_ddb_set_param()
8297 fnode_sess->chap_auth_en = QL4_PARAM_ENABLE; in qla4xxx_sysfs_ddb_set_param()
8308 rc = qla4xxx_sysfs_ddb_apply(fnode_sess, fnode_conn); in qla4xxx_sysfs_ddb_set_param()
8320 static int qla4xxx_sysfs_ddb_delete(struct iscsi_bus_flash_session *fnode_sess) in qla4xxx_sysfs_ddb_delete() argument
8322 struct Scsi_Host *shost = iscsi_flash_session_to_shost(fnode_sess); in qla4xxx_sysfs_ddb_delete()
8334 if (fnode_sess->is_boot_target) { in qla4xxx_sysfs_ddb_delete()
8342 if (fnode_sess->flash_state == DEV_DB_NON_PERSISTENT) in qla4xxx_sysfs_ddb_delete()
8348 dev_db_start_offset += (fnode_sess->target_id * in qla4xxx_sysfs_ddb_delete()
8363 dev_db_start_offset += (fnode_sess->target_id * in qla4xxx_sysfs_ddb_delete()
8376 __func__, fnode_sess->target_id)); in qla4xxx_sysfs_ddb_delete()
8404 target_id = fnode_sess->target_id; in qla4xxx_sysfs_ddb_delete()
8405 iscsi_destroy_flashnode_sess(fnode_sess); in qla4xxx_sysfs_ddb_delete()