Lines Matching refs:ddb_entry
426 struct ddb_entry *ddb_entry; in __qla4xxx_is_chap_active() local
433 ddb_entry = sess->dd_data; in __qla4xxx_is_chap_active()
438 if (ddb_entry->chap_tbl_idx == *chap_tbl_idx) in __qla4xxx_is_chap_active()
753 struct ddb_entry *ddb_entry; in qla4xxx_conn_get_stats() local
764 ddb_entry = sess->dd_data; in qla4xxx_conn_get_stats()
765 ha = ddb_entry->ha; in qla4xxx_conn_get_stats()
777 ret = qla4xxx_get_mgmt_data(ha, ddb_entry->fw_ddb_index, stats_size, in qla4xxx_conn_get_stats()
1303 struct ddb_entry *ddb_entry = sess->dd_data; in qla4xxx_session_get_param() local
1304 struct scsi_qla_host *ha = ddb_entry->ha; in qla4xxx_session_get_param()
1399 struct ddb_entry *ddb_entry, in qla4xxx_match_ipaddress() argument
1407 if (ddb_entry->fw_ddb_entry.options & DDB_OPT_IPV6_DEVICE) { in qla4xxx_match_ipaddress()
1439 struct ddb_entry *ddb_entry; in qla4xxx_match_fwdb_session() local
1453 ddb_entry = qla4xxx_lookup_ddb_by_fw_index(ha, idx); in qla4xxx_match_fwdb_session()
1454 if (ddb_entry == NULL) in qla4xxx_match_fwdb_session()
1457 if (ddb_entry->ddb_type != FLASH_DDB) in qla4xxx_match_fwdb_session()
1460 existing_sess = ddb_entry->sess->dd_data; in qla4xxx_match_fwdb_session()
1461 existing_conn = ddb_entry->conn->dd_data; in qla4xxx_match_fwdb_session()
1485 rval = qla4xxx_match_ipaddress(ha, ddb_entry, in qla4xxx_match_fwdb_session()
1511 struct ddb_entry *ddb_entry; in qla4xxx_session_create() local
1532 cmds_max, sizeof(struct ddb_entry), in qla4xxx_session_create()
1539 ddb_entry = sess->dd_data; in qla4xxx_session_create()
1540 ddb_entry->fw_ddb_index = ddb_index; in qla4xxx_session_create()
1541 ddb_entry->fw_ddb_device_state = DDB_DS_NO_CONNECTION_ACTIVE; in qla4xxx_session_create()
1542 ddb_entry->ha = ha; in qla4xxx_session_create()
1543 ddb_entry->sess = cls_sess; in qla4xxx_session_create()
1544 ddb_entry->unblock_sess = qla4xxx_unblock_ddb; in qla4xxx_session_create()
1545 ddb_entry->ddb_change = qla4xxx_ddb_change; in qla4xxx_session_create()
1547 ha->fw_ddb_index_map[ddb_entry->fw_ddb_index] = ddb_entry; in qla4xxx_session_create()
1556 struct ddb_entry *ddb_entry; in qla4xxx_session_destroy() local
1562 ddb_entry = sess->dd_data; in qla4xxx_session_destroy()
1563 ha = ddb_entry->ha; in qla4xxx_session_destroy()
1565 qla4xxx_clear_ddb_entry(ha, ddb_entry->fw_ddb_index); in qla4xxx_session_destroy()
1568 qla4xxx_free_ddb(ha, ddb_entry); in qla4xxx_session_destroy()
1578 struct ddb_entry *ddb_entry; in qla4xxx_conn_create() local
1587 ddb_entry = sess->dd_data; in qla4xxx_conn_create()
1588 ddb_entry->conn = cls_conn; in qla4xxx_conn_create()
1616 struct ddb_entry *ddb_entry; in qla4xxx_conn_start() local
1626 ddb_entry = sess->dd_data; in qla4xxx_conn_start()
1627 ha = ddb_entry->ha; in qla4xxx_conn_start()
1650 ret = qla4xxx_set_param_ddbentry(ha, ddb_entry, cls_conn, &mbx_sts); in qla4xxx_conn_start()
1658 if (ddb_entry->fw_ddb_device_state == in qla4xxx_conn_start()
1660 ddb_entry->unblock_sess(ddb_entry->sess); in qla4xxx_conn_start()
1665 __func__, ddb_entry->fw_ddb_index); in qla4xxx_conn_start()
1669 status = qla4xxx_conn_open(ha, ddb_entry->fw_ddb_index); in qla4xxx_conn_start()
1677 if (ddb_entry->fw_ddb_device_state == DDB_DS_NO_CONNECTION_ACTIVE) in qla4xxx_conn_start()
1678 ddb_entry->fw_ddb_device_state = DDB_DS_LOGIN_IN_PROCESS; in qla4xxx_conn_start()
1681 ddb_entry->fw_ddb_device_state)); in qla4xxx_conn_start()
1698 struct ddb_entry *ddb_entry; in qla4xxx_conn_destroy() local
1703 ddb_entry = sess->dd_data; in qla4xxx_conn_destroy()
1704 ha = ddb_entry->ha; in qla4xxx_conn_destroy()
1707 if (qla4xxx_session_logout_ddb(ha, ddb_entry, options) == QLA_ERROR) in qla4xxx_conn_destroy()
1759 struct ddb_entry *ddb_entry; in qla4xxx_alloc_pdu() local
1764 ddb_entry = sess->dd_data; in qla4xxx_alloc_pdu()
1765 ha = ddb_entry->ha; in qla4xxx_alloc_pdu()
1825 struct ddb_entry *ddb_entry; in qla4xxx_task_cleanup() local
1831 ddb_entry = sess->dd_data; in qla4xxx_task_cleanup()
1832 ha = ddb_entry->ha; in qla4xxx_task_cleanup()
1854 struct ddb_entry *ddb_entry = sess->dd_data; in qla4xxx_task_xmit() local
1855 struct scsi_qla_host *ha = ddb_entry->ha; in qla4xxx_task_xmit()
1872 struct ddb_entry *ddb_entry; in qla4xxx_copy_fwddb_param() local
1878 ddb_entry = sess->dd_data; in qla4xxx_copy_fwddb_param()
1881 ddb_entry->chap_tbl_idx = le16_to_cpu(fw_ddb_entry->chap_tbl_idx); in qla4xxx_copy_fwddb_param()
1927 struct ddb_entry *ddb_entry) in qla4xxx_update_session_conn_fwddb_param() argument
1943 if (qla4xxx_get_fwddb_entry(ha, ddb_entry->fw_ddb_index, fw_ddb_entry, in qla4xxx_update_session_conn_fwddb_param()
1949 ddb_entry->fw_ddb_index)); in qla4xxx_update_session_conn_fwddb_param()
1953 cls_sess = ddb_entry->sess; in qla4xxx_update_session_conn_fwddb_param()
1955 cls_conn = ddb_entry->conn; in qla4xxx_update_session_conn_fwddb_param()
1967 struct ddb_entry *ddb_entry) in qla4xxx_update_session_conn_param() argument
1985 if (qla4xxx_get_fwddb_entry(ha, ddb_entry->fw_ddb_index, fw_ddb_entry, in qla4xxx_update_session_conn_param()
1991 ddb_entry->fw_ddb_index)); in qla4xxx_update_session_conn_param()
1995 cls_sess = ddb_entry->sess; in qla4xxx_update_session_conn_param()
1998 cls_conn = ddb_entry->conn; in qla4xxx_update_session_conn_param()
2002 ddb_entry->default_relogin_timeout = in qla4xxx_update_session_conn_param()
2006 ddb_entry->default_time2wait = in qla4xxx_update_session_conn_param()
2010 ddb_entry->chap_tbl_idx = le16_to_cpu(fw_ddb_entry->chap_tbl_idx); in qla4xxx_update_session_conn_param()
2095 struct ddb_entry *ddb_entry, in qla4xxx_get_new_srb() argument
2106 srb->ddb = ddb_entry; in qla4xxx_get_new_srb()
2154 struct ddb_entry *ddb_entry = cmd->device->hostdata; in qla4xxx_queuecommand() local
2155 struct iscsi_cls_session *sess = ddb_entry->sess; in qla4xxx_queuecommand()
2188 srb = qla4xxx_get_new_srb(ha, ddb_entry, cmd); in qla4xxx_queuecommand()
2517 struct ddb_entry *ddb_entry; in qla4xxx_check_relogin_flash_ddb() local
2521 ddb_entry = sess->dd_data; in qla4xxx_check_relogin_flash_ddb()
2522 ha = ddb_entry->ha; in qla4xxx_check_relogin_flash_ddb()
2524 if (!(ddb_entry->ddb_type == FLASH_DDB)) in qla4xxx_check_relogin_flash_ddb()
2527 if (adapter_up(ha) && !test_bit(DF_RELOGIN, &ddb_entry->flags) && in qla4xxx_check_relogin_flash_ddb()
2529 if (atomic_read(&ddb_entry->retry_relogin_timer) != in qla4xxx_check_relogin_flash_ddb()
2531 if (atomic_read(&ddb_entry->retry_relogin_timer) == in qla4xxx_check_relogin_flash_ddb()
2533 atomic_set(&ddb_entry->retry_relogin_timer, in qla4xxx_check_relogin_flash_ddb()
2536 set_bit(DF_RELOGIN, &ddb_entry->flags); in qla4xxx_check_relogin_flash_ddb()
2539 __func__, ddb_entry->fw_ddb_index)); in qla4xxx_check_relogin_flash_ddb()
2541 atomic_dec(&ddb_entry->retry_relogin_timer); in qla4xxx_check_relogin_flash_ddb()
2546 if (atomic_read(&ddb_entry->relogin_timer) && in qla4xxx_check_relogin_flash_ddb()
2547 (atomic_dec_and_test(&ddb_entry->relogin_timer) != 0)) { in qla4xxx_check_relogin_flash_ddb()
2554 atomic_inc(&ddb_entry->relogin_retry_count); in qla4xxx_check_relogin_flash_ddb()
2558 ddb_entry->fw_ddb_index, in qla4xxx_check_relogin_flash_ddb()
2559 atomic_read(&ddb_entry->relogin_retry_count), in qla4xxx_check_relogin_flash_ddb()
2560 ddb_entry->default_time2wait + 4)); in qla4xxx_check_relogin_flash_ddb()
2562 atomic_set(&ddb_entry->retry_relogin_timer, in qla4xxx_check_relogin_flash_ddb()
2563 ddb_entry->default_time2wait + 4); in qla4xxx_check_relogin_flash_ddb()
2847 struct ddb_entry *ddb_entry; in qla4xxx_fail_session() local
2850 ddb_entry = sess->dd_data; in qla4xxx_fail_session()
2851 ddb_entry->fw_ddb_device_state = DDB_DS_SESSION_FAILED; in qla4xxx_fail_session()
2853 if (ddb_entry->ddb_type == FLASH_DDB) in qla4xxx_fail_session()
2854 iscsi_block_session(ddb_entry->sess); in qla4xxx_fail_session()
3053 struct ddb_entry *ddb_entry; in qla4xxx_relogin_devices() local
3057 ddb_entry = sess->dd_data; in qla4xxx_relogin_devices()
3058 ha = ddb_entry->ha; in qla4xxx_relogin_devices()
3060 if (ddb_entry->fw_ddb_device_state == DDB_DS_SESSION_ACTIVE) { in qla4xxx_relogin_devices()
3063 ddb_entry->fw_ddb_index); in qla4xxx_relogin_devices()
3064 iscsi_unblock_session(ddb_entry->sess); in qla4xxx_relogin_devices()
3067 if (ddb_entry->ddb_type == FLASH_DDB) { in qla4xxx_relogin_devices()
3068 if (!test_bit(DF_RELOGIN, &ddb_entry->flags)) in qla4xxx_relogin_devices()
3069 qla4xxx_arm_relogin_timer(ddb_entry); in qla4xxx_relogin_devices()
3080 struct ddb_entry *ddb_entry; in qla4xxx_unblock_flash_ddb() local
3084 ddb_entry = sess->dd_data; in qla4xxx_unblock_flash_ddb()
3085 ha = ddb_entry->ha; in qla4xxx_unblock_flash_ddb()
3088 ddb_entry->fw_ddb_index); in qla4xxx_unblock_flash_ddb()
3090 iscsi_unblock_session(ddb_entry->sess); in qla4xxx_unblock_flash_ddb()
3096 ddb_entry->fw_ddb_index); in qla4xxx_unblock_flash_ddb()
3097 scsi_queue_work(ha->host, &ddb_entry->sess->scan_work); in qla4xxx_unblock_flash_ddb()
3105 struct ddb_entry *ddb_entry; in qla4xxx_unblock_ddb() local
3109 ddb_entry = sess->dd_data; in qla4xxx_unblock_ddb()
3110 ha = ddb_entry->ha; in qla4xxx_unblock_ddb()
3113 ddb_entry->fw_ddb_index); in qla4xxx_unblock_ddb()
3114 iscsi_conn_start(ddb_entry->conn); in qla4xxx_unblock_ddb()
3115 iscsi_conn_login_event(ddb_entry->conn, in qla4xxx_unblock_ddb()
3130 struct ddb_entry *ddb_entry; in qla4xxx_relogin_flash_ddb() local
3134 ddb_entry = sess->dd_data; in qla4xxx_relogin_flash_ddb()
3135 ha = ddb_entry->ha; in qla4xxx_relogin_flash_ddb()
3137 relogin_timer = max(ddb_entry->default_relogin_timeout, in qla4xxx_relogin_flash_ddb()
3139 atomic_set(&ddb_entry->relogin_timer, relogin_timer); in qla4xxx_relogin_flash_ddb()
3143 ddb_entry->fw_ddb_index, relogin_timer)); in qla4xxx_relogin_flash_ddb()
3151 struct ddb_entry *ddb_entry; in qla4xxx_dpc_relogin() local
3155 ddb_entry = sess->dd_data; in qla4xxx_dpc_relogin()
3156 ha = ddb_entry->ha; in qla4xxx_dpc_relogin()
3158 if (!(ddb_entry->ddb_type == FLASH_DDB)) in qla4xxx_dpc_relogin()
3161 if (test_and_clear_bit(DF_RELOGIN, &ddb_entry->flags) && in qla4xxx_dpc_relogin()
4215 static void qla4xxx_get_param_ddb(struct ddb_entry *ddb_entry, in qla4xxx_get_param_ddb() argument
4225 ha = ddb_entry->ha; in qla4xxx_get_param_ddb()
4226 cls_sess = ddb_entry->sess; in qla4xxx_get_param_ddb()
4228 cls_conn = ddb_entry->conn; in qla4xxx_get_param_ddb()
4302 struct ddb_entry *ddb_entry; in qla4xxx_is_session_exists() local
4327 ddb_entry = qla4xxx_lookup_ddb_by_fw_index(ha, idx); in qla4xxx_is_session_exists()
4328 if (ddb_entry == NULL) in qla4xxx_is_session_exists()
4331 qla4xxx_get_param_ddb(ddb_entry, tmp_tddb); in qla4xxx_is_session_exists()
4443 struct ddb_entry *ddb_entry) in qla4xxx_setup_flash_ddb_entry() argument
4447 ddb_entry->ddb_type = FLASH_DDB; in qla4xxx_setup_flash_ddb_entry()
4448 ddb_entry->fw_ddb_index = INVALID_ENTRY; in qla4xxx_setup_flash_ddb_entry()
4449 ddb_entry->fw_ddb_device_state = DDB_DS_NO_CONNECTION_ACTIVE; in qla4xxx_setup_flash_ddb_entry()
4450 ddb_entry->ha = ha; in qla4xxx_setup_flash_ddb_entry()
4451 ddb_entry->unblock_sess = qla4xxx_unblock_flash_ddb; in qla4xxx_setup_flash_ddb_entry()
4452 ddb_entry->ddb_change = qla4xxx_flash_ddb_change; in qla4xxx_setup_flash_ddb_entry()
4454 atomic_set(&ddb_entry->retry_relogin_timer, INVALID_ENTRY); in qla4xxx_setup_flash_ddb_entry()
4455 atomic_set(&ddb_entry->relogin_timer, 0); in qla4xxx_setup_flash_ddb_entry()
4456 atomic_set(&ddb_entry->relogin_retry_count, 0); in qla4xxx_setup_flash_ddb_entry()
4457 def_timeout = le16_to_cpu(ddb_entry->fw_ddb_entry.def_timeout); in qla4xxx_setup_flash_ddb_entry()
4458 ddb_entry->default_relogin_timeout = in qla4xxx_setup_flash_ddb_entry()
4461 ddb_entry->default_time2wait = in qla4xxx_setup_flash_ddb_entry()
4462 le16_to_cpu(ddb_entry->fw_ddb_entry.iscsi_def_time2wait); in qla4xxx_setup_flash_ddb_entry()
4610 struct ddb_entry *ddb_entry = NULL; in qla4xxx_sess_conn_setup() local
4616 cmds_max, sizeof(struct ddb_entry), in qla4xxx_sess_conn_setup()
4630 ddb_entry = sess->dd_data; in qla4xxx_sess_conn_setup()
4631 ddb_entry->sess = cls_sess; in qla4xxx_sess_conn_setup()
4634 memcpy(&ddb_entry->fw_ddb_entry, fw_ddb_entry, in qla4xxx_sess_conn_setup()
4637 qla4xxx_setup_flash_ddb_entry(ha, ddb_entry); in qla4xxx_sess_conn_setup()
4646 ddb_entry->conn = cls_conn; in qla4xxx_sess_conn_setup()
4670 set_bit(DF_RELOGIN, &ddb_entry->flags); in qla4xxx_sess_conn_setup()
5102 struct ddb_entry *ddb_entry; in qla4xxx_destroy_fw_ddb_session() local
5108 ddb_entry = qla4xxx_lookup_ddb_by_fw_index(ha, idx); in qla4xxx_destroy_fw_ddb_session()
5109 if ((ddb_entry != NULL) && in qla4xxx_destroy_fw_ddb_session()
5110 (ddb_entry->ddb_type == FLASH_DDB)) { in qla4xxx_destroy_fw_ddb_session()
5113 if (qla4xxx_session_logout_ddb(ha, ddb_entry, options) in qla4xxx_destroy_fw_ddb_session()
5118 qla4xxx_clear_ddb_entry(ha, ddb_entry->fw_ddb_index); in qla4xxx_destroy_fw_ddb_session()
5126 iscsi_destroy_endpoint(ddb_entry->conn->ep); in qla4xxx_destroy_fw_ddb_session()
5127 qla4xxx_free_ddb(ha, ddb_entry); in qla4xxx_destroy_fw_ddb_session()
5128 iscsi_session_teardown(ddb_entry->sess); in qla4xxx_destroy_fw_ddb_session()
5192 struct ddb_entry *ddb; in qla4xxx_slave_alloc()
5414 struct ddb_entry *ddb_entry = cmd->device->hostdata; in qla4xxx_eh_device_reset() local
5417 if (!ddb_entry) in qla4xxx_eh_device_reset()
5436 stat = qla4xxx_reset_lun(ha, ddb_entry, cmd->device->lun); in qla4xxx_eh_device_reset()
5451 if (qla4xxx_send_marker_iocb(ha, ddb_entry, cmd->device->lun, in qla4xxx_eh_device_reset()
5476 struct ddb_entry *ddb_entry = cmd->device->hostdata; in qla4xxx_eh_target_reset() local
5479 if (!ddb_entry) in qla4xxx_eh_target_reset()
5495 stat = qla4xxx_reset_target(ha, ddb_entry); in qla4xxx_eh_target_reset()
5511 if (qla4xxx_send_marker_iocb(ha, ddb_entry, cmd->device->lun, in qla4xxx_eh_target_reset()