• Home
  • Raw
  • Download

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,
7197 struct iscsi_bus_flash_session *fnode_sess; in qla4xxx_sysfs_ddb_is_non_persistent() local
7202 fnode_sess = iscsi_dev_to_flash_session(dev); in qla4xxx_sysfs_ddb_is_non_persistent()
7204 return (fnode_sess->flash_state == DEV_DB_NON_PERSISTENT); in qla4xxx_sysfs_ddb_is_non_persistent()
7227 struct iscsi_bus_flash_session *fnode_sess = NULL; in qla4xxx_sysfs_ddb_tgt_create() local
7231 fnode_sess = iscsi_create_flashnode_sess(ha->host, *idx, in qla4xxx_sysfs_ddb_tgt_create()
7233 if (!fnode_sess) { in qla4xxx_sysfs_ddb_tgt_create()
7240 fnode_conn = iscsi_create_flashnode_conn(ha->host, fnode_sess, in qla4xxx_sysfs_ddb_tgt_create()
7250 fnode_sess->flash_state = DEV_DB_NON_PERSISTENT; in qla4xxx_sysfs_ddb_tgt_create()
7252 fnode_sess->flash_state = DEV_DB_PERSISTENT; in qla4xxx_sysfs_ddb_tgt_create()
7255 fnode_sess->is_boot_target = 1; in qla4xxx_sysfs_ddb_tgt_create()
7257 fnode_sess->is_boot_target = 0; in qla4xxx_sysfs_ddb_tgt_create()
7260 rc = qla4xxx_copy_from_fwddb_param(fnode_sess, fnode_conn, in qla4xxx_sysfs_ddb_tgt_create()
7266 __func__, fnode_sess->dev.kobj.name); in qla4xxx_sysfs_ddb_tgt_create()
7274 iscsi_destroy_flashnode_sess(fnode_sess); in qla4xxx_sysfs_ddb_tgt_create()
7367 static int qla4xxx_sysfs_ddb_apply(struct iscsi_bus_flash_session *fnode_sess, in qla4xxx_sysfs_ddb_apply() argument
7370 struct Scsi_Host *shost = iscsi_flash_session_to_shost(fnode_sess); in qla4xxx_sysfs_ddb_apply()
7388 if (!strncasecmp(fnode_sess->portal_type, PORTAL_TYPE_IPV6, 4)) in qla4xxx_sysfs_ddb_apply()
7395 dev_db_start_offset += (fnode_sess->target_id * in qla4xxx_sysfs_ddb_apply()
7398 qla4xxx_copy_to_fwddb_param(fnode_sess, fnode_conn, fw_ddb_entry); in qla4xxx_sysfs_ddb_apply()
7405 fnode_sess->flash_state = DEV_DB_PERSISTENT; in qla4xxx_sysfs_ddb_apply()
7408 __func__, fnode_sess->target_id, ha->host_no); in qla4xxx_sysfs_ddb_apply()
7413 __func__, fnode_sess->target_id, ha->host_no); in qla4xxx_sysfs_ddb_apply()
7557 static int qla4xxx_sysfs_ddb_login(struct iscsi_bus_flash_session *fnode_sess, in qla4xxx_sysfs_ddb_login() argument
7560 struct Scsi_Host *shost = iscsi_flash_session_to_shost(fnode_sess); in qla4xxx_sysfs_ddb_login()
7567 if (fnode_sess->flash_state == DEV_DB_NON_PERSISTENT) { in qla4xxx_sysfs_ddb_login()
7584 if (!strncasecmp(fnode_sess->portal_type, PORTAL_TYPE_IPV6, 4)) in qla4xxx_sysfs_ddb_login()
7591 qla4xxx_copy_to_fwddb_param(fnode_sess, fnode_conn, fw_ddb_entry); in qla4xxx_sysfs_ddb_login()
7596 fnode_sess->target_id); in qla4xxx_sysfs_ddb_login()
7599 fnode_sess->target_id); in qla4xxx_sysfs_ddb_login()
7741 static int qla4xxx_sysfs_ddb_logout(struct iscsi_bus_flash_session *fnode_sess, in qla4xxx_sysfs_ddb_logout() argument
7744 struct Scsi_Host *shost = iscsi_flash_session_to_shost(fnode_sess); in qla4xxx_sysfs_ddb_logout()
7781 if (!fnode_sess->targetname) { in qla4xxx_sysfs_ddb_logout()
7789 if (fnode_sess->is_boot_target) { in qla4xxx_sysfs_ddb_logout()
7797 strlcpy(flash_tddb->iscsi_name, fnode_sess->targetname, in qla4xxx_sysfs_ddb_logout()
7800 if (!strncmp(fnode_sess->portal_type, PORTAL_TYPE_IPV6, 4)) in qla4xxx_sysfs_ddb_logout()
7805 flash_tddb->tpgt = fnode_sess->tpgt; in qla4xxx_sysfs_ddb_logout()
7808 COPY_ISID(flash_tddb->isid, fnode_sess->isid); in qla4xxx_sysfs_ddb_logout()
7853 qla4xxx_sysfs_ddb_get_param(struct iscsi_bus_flash_session *fnode_sess, in qla4xxx_sysfs_ddb_get_param() argument
7856 struct Scsi_Host *shost = iscsi_flash_session_to_shost(fnode_sess); in qla4xxx_sysfs_ddb_get_param()
7864 dev = iscsi_find_flashnode_conn(fnode_sess); in qla4xxx_sysfs_ddb_get_param()
7875 rc = sprintf(buf, "%s\n", fnode_sess->portal_type); in qla4xxx_sysfs_ddb_get_param()
7878 rc = sprintf(buf, "%u\n", fnode_sess->auto_snd_tgt_disable); in qla4xxx_sysfs_ddb_get_param()
7881 rc = sprintf(buf, "%u\n", fnode_sess->discovery_sess); in qla4xxx_sysfs_ddb_get_param()
7884 rc = sprintf(buf, "%u\n", fnode_sess->entry_state); in qla4xxx_sysfs_ddb_get_param()
7893 rc = sprintf(buf, "%u\n", fnode_sess->imm_data_en); in qla4xxx_sysfs_ddb_get_param()
7896 rc = sprintf(buf, "%u\n", fnode_sess->initial_r2t_en); in qla4xxx_sysfs_ddb_get_param()
7899 rc = sprintf(buf, "%u\n", fnode_sess->dataseq_inorder_en); in qla4xxx_sysfs_ddb_get_param()
7902 rc = sprintf(buf, "%u\n", fnode_sess->pdu_inorder_en); in qla4xxx_sysfs_ddb_get_param()
7905 rc = sprintf(buf, "%u\n", fnode_sess->chap_auth_en); in qla4xxx_sysfs_ddb_get_param()
7911 rc = sprintf(buf, "%u\n", fnode_sess->discovery_logout_en); in qla4xxx_sysfs_ddb_get_param()
7914 rc = sprintf(buf, "%u\n", fnode_sess->bidi_chap_en); in qla4xxx_sysfs_ddb_get_param()
7917 rc = sprintf(buf, "%u\n", fnode_sess->discovery_auth_optional); in qla4xxx_sysfs_ddb_get_param()
7920 rc = sprintf(buf, "%u\n", fnode_sess->erl); in qla4xxx_sysfs_ddb_get_param()
7947 rc = sprintf(buf, "%u\n", fnode_sess->first_burst); in qla4xxx_sysfs_ddb_get_param()
7950 rc = sprintf(buf, "%u\n", fnode_sess->time2wait); in qla4xxx_sysfs_ddb_get_param()
7953 rc = sprintf(buf, "%u\n", fnode_sess->time2retain); in qla4xxx_sysfs_ddb_get_param()
7956 rc = sprintf(buf, "%u\n", fnode_sess->max_r2t); in qla4xxx_sysfs_ddb_get_param()
7962 rc = sprintf(buf, "%pm\n", fnode_sess->isid); in qla4xxx_sysfs_ddb_get_param()
7965 rc = sprintf(buf, "%u\n", fnode_sess->tsid); in qla4xxx_sysfs_ddb_get_param()
7971 rc = sprintf(buf, "%u\n", fnode_sess->max_burst); in qla4xxx_sysfs_ddb_get_param()
7975 fnode_sess->default_taskmgmt_timeout); in qla4xxx_sysfs_ddb_get_param()
7978 if (!strncmp(fnode_sess->portal_type, PORTAL_TYPE_IPV6, 4)) in qla4xxx_sysfs_ddb_get_param()
7984 if (fnode_sess->targetalias) in qla4xxx_sysfs_ddb_get_param()
7985 rc = sprintf(buf, "%s\n", fnode_sess->targetalias); in qla4xxx_sysfs_ddb_get_param()
7990 if (!strncmp(fnode_sess->portal_type, PORTAL_TYPE_IPV6, 4)) in qla4xxx_sysfs_ddb_get_param()
8007 if (!strncmp(fnode_sess->portal_type, PORTAL_TYPE_IPV6, 4)) in qla4xxx_sysfs_ddb_get_param()
8017 if (!strncmp(fnode_sess->portal_type, PORTAL_TYPE_IPV6, 4)) in qla4xxx_sysfs_ddb_get_param()
8024 rc = sprintf(buf, "%u\n", fnode_sess->discovery_parent_idx); in qla4xxx_sysfs_ddb_get_param()
8027 if (fnode_sess->discovery_parent_type == DDB_ISNS) in qla4xxx_sysfs_ddb_get_param()
8029 else if (fnode_sess->discovery_parent_type == DDB_NO_LINK) in qla4xxx_sysfs_ddb_get_param()
8031 else if (fnode_sess->discovery_parent_type < MAX_DDB_ENTRIES) in qla4xxx_sysfs_ddb_get_param()
8040 if (fnode_sess->targetname) in qla4xxx_sysfs_ddb_get_param()
8041 rc = sprintf(buf, "%s\n", fnode_sess->targetname); in qla4xxx_sysfs_ddb_get_param()
8046 rc = sprintf(buf, "%u\n", fnode_sess->tpgt); in qla4xxx_sysfs_ddb_get_param()
8055 rc = sprintf(buf, "%u\n", fnode_sess->chap_out_idx); in qla4xxx_sysfs_ddb_get_param()
8058 if (fnode_sess->chap_auth_en) { in qla4xxx_sysfs_ddb_get_param()
8062 fnode_sess->chap_out_idx); in qla4xxx_sysfs_ddb_get_param()
8069 if (fnode_sess->chap_auth_en) { in qla4xxx_sysfs_ddb_get_param()
8073 fnode_sess->chap_out_idx); in qla4xxx_sysfs_ddb_get_param()
8086 rc = sprintf(buf, "%u\n", fnode_sess->is_boot_target); in qla4xxx_sysfs_ddb_get_param()
8107 qla4xxx_sysfs_ddb_set_param(struct iscsi_bus_flash_session *fnode_sess, in qla4xxx_sysfs_ddb_set_param() argument
8111 struct Scsi_Host *shost = iscsi_flash_session_to_shost(fnode_sess); in qla4xxx_sysfs_ddb_set_param()
8129 memcpy(fnode_sess->portal_type, fnode_param->value, in qla4xxx_sysfs_ddb_set_param()
8130 strlen(fnode_sess->portal_type)); in qla4xxx_sysfs_ddb_set_param()
8133 fnode_sess->auto_snd_tgt_disable = in qla4xxx_sysfs_ddb_set_param()
8137 fnode_sess->discovery_sess = fnode_param->value[0]; in qla4xxx_sysfs_ddb_set_param()
8140 fnode_sess->entry_state = fnode_param->value[0]; in qla4xxx_sysfs_ddb_set_param()
8149 fnode_sess->imm_data_en = fnode_param->value[0]; in qla4xxx_sysfs_ddb_set_param()
8152 fnode_sess->initial_r2t_en = fnode_param->value[0]; in qla4xxx_sysfs_ddb_set_param()
8155 fnode_sess->dataseq_inorder_en = fnode_param->value[0]; in qla4xxx_sysfs_ddb_set_param()
8158 fnode_sess->pdu_inorder_en = fnode_param->value[0]; in qla4xxx_sysfs_ddb_set_param()
8161 fnode_sess->chap_auth_en = fnode_param->value[0]; in qla4xxx_sysfs_ddb_set_param()
8163 if (!fnode_sess->chap_auth_en) in qla4xxx_sysfs_ddb_set_param()
8164 fnode_sess->chap_out_idx = INVALID_ENTRY; in qla4xxx_sysfs_ddb_set_param()
8171 fnode_sess->discovery_logout_en = fnode_param->value[0]; in qla4xxx_sysfs_ddb_set_param()
8174 fnode_sess->bidi_chap_en = fnode_param->value[0]; in qla4xxx_sysfs_ddb_set_param()
8177 fnode_sess->discovery_auth_optional = in qla4xxx_sysfs_ddb_set_param()
8181 fnode_sess->erl = fnode_param->value[0]; in qla4xxx_sysfs_ddb_set_param()
8210 fnode_sess->first_burst = in qla4xxx_sysfs_ddb_set_param()
8214 fnode_sess->time2wait = *(uint16_t *)fnode_param->value; in qla4xxx_sysfs_ddb_set_param()
8217 fnode_sess->time2retain = in qla4xxx_sysfs_ddb_set_param()
8221 fnode_sess->max_r2t = in qla4xxx_sysfs_ddb_set_param()
8229 memcpy(fnode_sess->isid, fnode_param->value, in qla4xxx_sysfs_ddb_set_param()
8230 sizeof(fnode_sess->isid)); in qla4xxx_sysfs_ddb_set_param()
8233 fnode_sess->tsid = *(uint16_t *)fnode_param->value; in qla4xxx_sysfs_ddb_set_param()
8239 fnode_sess->max_burst = *(unsigned *)fnode_param->value; in qla4xxx_sysfs_ddb_set_param()
8242 fnode_sess->default_taskmgmt_timeout = in qla4xxx_sysfs_ddb_set_param()
8250 rc = iscsi_switch_str_param(&fnode_sess->targetalias, in qla4xxx_sysfs_ddb_set_param()
8275 rc = iscsi_switch_str_param(&fnode_sess->targetname, in qla4xxx_sysfs_ddb_set_param()
8279 fnode_sess->tpgt = *(uint16_t *)fnode_param->value; in qla4xxx_sysfs_ddb_set_param()
8286 fnode_sess->discovery_parent_idx = in qla4xxx_sysfs_ddb_set_param()
8310 fnode_sess->chap_out_idx = chap_out_idx; in qla4xxx_sysfs_ddb_set_param()
8312 fnode_sess->chap_auth_en = QL4_PARAM_ENABLE; in qla4xxx_sysfs_ddb_set_param()
8323 rc = qla4xxx_sysfs_ddb_apply(fnode_sess, fnode_conn); in qla4xxx_sysfs_ddb_set_param()
8335 static int qla4xxx_sysfs_ddb_delete(struct iscsi_bus_flash_session *fnode_sess) in qla4xxx_sysfs_ddb_delete() argument
8337 struct Scsi_Host *shost = iscsi_flash_session_to_shost(fnode_sess); in qla4xxx_sysfs_ddb_delete()
8349 if (fnode_sess->is_boot_target) { in qla4xxx_sysfs_ddb_delete()
8357 if (fnode_sess->flash_state == DEV_DB_NON_PERSISTENT) in qla4xxx_sysfs_ddb_delete()
8363 dev_db_start_offset += (fnode_sess->target_id * in qla4xxx_sysfs_ddb_delete()
8378 dev_db_start_offset += (fnode_sess->target_id * in qla4xxx_sysfs_ddb_delete()
8391 __func__, fnode_sess->target_id)); in qla4xxx_sysfs_ddb_delete()
8419 target_id = fnode_sess->target_id; in qla4xxx_sysfs_ddb_delete()
8420 iscsi_destroy_flashnode_sess(fnode_sess); in qla4xxx_sysfs_ddb_delete()