Lines Matching +full:0 +full:xf006
37 "Enables Sequence level error recovery (aka FC Tape). Default is 0 - no SLER. 1 - Enable SLER.");
67 FCP_TMF_CMPL = 0,
79 #define FCP_PTA_SIMPLE 0 /* simple task attribute */
85 #define FCP_PRI_RESVD_MASK 0x80 /* reserved bits in priority field */
167 if (unlikely(vha->marker_needed != 0)) { in qlt_issue_marker()
171 ql_dbg(ql_dbg_tgt, vha, 0xe03d, in qlt_issue_marker()
195 ql_dbg(ql_dbg_tgt_mgt + ql_dbg_verbose, vha, 0xf005, in qla_find_host_by_d_id()
247 ql_dbg(ql_dbg_async, vha, 0x502c, in qlt_queue_unknown_atio()
271 qlt_send_term_exchange(vha->hw->base_qpair, NULL, atio, ha_locked, 0); in qlt_queue_unknown_atio()
282 uint8_t queued = 0; in qlt_try_to_dequeue_unknown_atios()
286 ql_dbg(ql_dbg_async, vha, 0x502e, in qlt_try_to_dequeue_unknown_atios()
290 &u->atio, ha_locked, 0); in qlt_try_to_dequeue_unknown_atios()
296 ql_dbg(ql_dbg_async + ql_dbg_verbose, vha, 0x502f, in qlt_try_to_dequeue_unknown_atios()
300 ql_dbg(ql_dbg_async + ql_dbg_verbose, vha, 0x503a, in qlt_try_to_dequeue_unknown_atios()
304 &u->atio, ha_locked, 0); in qlt_try_to_dequeue_unknown_atios()
306 ql_dbg(ql_dbg_async + ql_dbg_verbose, vha, 0x503d, in qlt_try_to_dequeue_unknown_atios()
329 qlt_try_to_dequeue_unknown_atios(vha, 0); in qlt_unknown_atio_work_fn()
335 ql_dbg(ql_dbg_tgt, vha, 0xe072, in qlt_24xx_atio_pkt_all_vps()
346 ql_dbg(ql_dbg_tgt, vha, 0xe03e, in qlt_24xx_atio_pkt_all_vps()
372 if ((entry->u.isp24.vp_index != 0xFF) && in qlt_24xx_atio_pkt_all_vps()
373 (entry->u.isp24.nport_handle != cpu_to_le16(0xFFFF))) { in qlt_24xx_atio_pkt_all_vps()
377 ql_dbg(ql_dbg_tgt, vha, 0xe03f, in qlt_24xx_atio_pkt_all_vps()
403 ql_dbg(ql_dbg_tgt, vha, 0xe00a, in qlt_24xx_atio_pkt_all_vps()
420 ql_dbg(ql_dbg_tgt, vha, 0xe040, in qlt_24xx_atio_pkt_all_vps()
434 ql_dbg(ql_dbg_tgt, vha, 0xe073, in qlt_response_pkt_all_vps()
444 ql_dbg(ql_dbg_tgt, vha, 0xe041, in qlt_response_pkt_all_vps()
462 ql_dbg(ql_dbg_tgt, vha, 0xe042, in qlt_response_pkt_all_vps()
477 if (0xFF != entry->u.isp24.vp_index) { in qlt_response_pkt_all_vps()
481 ql_dbg(ql_dbg_tgt, vha, 0xe043, in qlt_response_pkt_all_vps()
501 ql_dbg(ql_dbg_tgt, vha, 0xe044, in qlt_response_pkt_all_vps()
518 ql_dbg(ql_dbg_tgt, vha, 0xe045, in qlt_response_pkt_all_vps()
557 ql_dbg(ql_dbg_disc, vha, 0x20f2, in qla2x00_async_nack_sp_done()
571 sp->fcport->send_els_logo = 0; in qla2x00_async_nack_sp_done()
574 ql_dbg(ql_dbg_edif, vha, 0x20ef, in qla2x00_async_nack_sp_done()
582 0, sp->fcport); in qla2x00_async_nack_sp_done()
588 sp->fcport->deleted = 0; in qla2x00_async_nack_sp_done()
589 sp->fcport->send_els_logo = 0; in qla2x00_async_nack_sp_done()
600 sp->fcport->login_retry = 0; in qla2x00_async_nack_sp_done()
603 sp->fcport->deleted = 0; in qla2x00_async_nack_sp_done()
637 fcport->deleted = 0; in qla24xx_async_notify_ack()
657 ql_dbg(ql_dbg_disc, vha, 0x20f4, in qla24xx_async_notify_ack()
684 t = qlt_create_sess(vha, e->u.nack.fcport, 0); in qla24xx_do_nack_work()
687 ql_log(ql_log_info, vha, 0xd034, in qla24xx_do_nack_work()
755 ql_dbg(ql_dbg_disc, vha, 0x2107, in qlt_fc_port_added()
762 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf04c, in qlt_fc_port_added()
767 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf007, in qlt_fc_port_added()
776 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf04d, in qlt_fc_port_added()
780 sess->local = 0; in qlt_fc_port_added()
802 ql_dbg(ql_dbg_disc + ql_dbg_verbose, vha, 0x210d, in qlt_plogi_ack_find_add()
814 ql_dbg(ql_dbg_async, vha, 0x5088, in qlt_plogi_ack_find_add()
841 ql_dbg(ql_dbg_disc, vha, 0x5089, in qlt_plogi_ack_unref()
845 iocb->u.isp24.port_id[0], in qlt_plogi_ack_unref()
851 port_id.b.al_pa = iocb->u.isp24.port_id[0]; in qlt_plogi_ack_unref()
852 port_id.b.rsvd_1 = 0; in qlt_plogi_ack_unref()
882 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf097, in qlt_plogi_ack_link()
887 iocb->u.isp24.port_id[1], iocb->u.isp24.port_id[0], in qlt_plogi_ack_link()
916 * triggered by a command, otherwise, to 0
931 res = 0; in qlt_send_first_logo()
956 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf098, in qlt_send_first_logo()
975 ql_dbg(ql_dbg_disc, vha, 0xf084, in qlt_free_session_done()
984 qla2x00_mark_device_lost(vha, sess, 0); in qlt_free_session_done()
990 logo.cmd_count = 0; in qlt_free_session_done()
994 sess->send_els_logo = 0; in qlt_free_session_done()
1002 sess->logout_completed = 0; in qlt_free_session_done()
1006 ql_log(ql_log_warn, vha, 0xf085, in qlt_free_session_done()
1016 ql_log(ql_log_warn, vha, 0xf085, in qlt_free_session_done()
1033 sess->edif.authok = 0; in qlt_free_session_done()
1035 ql_dbg(ql_dbg_edif, vha, 0x911e, in qlt_free_session_done()
1040 ql_dbg(ql_dbg_edif, vha, 0x911e, in qlt_free_session_done()
1058 u16 cnt = 0; in qlt_free_session_done()
1062 ql_dbg(ql_dbg_disc, vha, 0xf086, in qlt_free_session_done()
1078 ql_dbg(ql_dbg_disc, vha, 0xf087, in qlt_free_session_done()
1083 sess->logo_ack_needed = 0; in qlt_free_session_done()
1105 sess->login_succ = 0; in qlt_free_session_done()
1111 sess->conflict->login_pause = 0; in qlt_free_session_done()
1126 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf099, in qlt_free_session_done()
1136 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf09a, in qlt_free_session_done()
1151 sess->explicit_logout = 0; in qlt_free_session_done()
1153 sess->free_pending = 0; in qlt_free_session_done()
1157 ql_dbg(ql_dbg_disc, vha, 0xf001, in qlt_free_session_done()
1161 if (tgt && (tgt->sess_count == 0)) in qlt_free_session_done()
1180 if (vha->fcport_count == 0) in qlt_free_session_done()
1190 ql_dbg(ql_dbg_disc, sess->vha, 0x210a, in qlt_unreg_sess()
1224 int res = 0; in qlt_reset()
1229 if (loop_id == 0xFFFF) { in qlt_reset()
1241 ql_dbg(ql_dbg_tgt, vha, 0xe000, in qlt_reset()
1248 ql_dbg(ql_dbg_tgt, vha, 0xe047, in qlt_reset()
1253 return qlt_issue_task_mgmt(sess, 0, mcmd, iocb, QLA24XX_MGMT_SEND_NACK); in qlt_reset()
1259 sess->logout_on_delete = 0; in qla24xx_chk_fcp_state()
1260 sess->logo_ack_needed = 0; in qla24xx_chk_fcp_state()
1277 if (tgt && tgt->tgt_stop && tgt->sess_count == 0) in qlt_schedule_sess_for_deletion()
1280 if (sess->vha->fcport_count == 0) in qlt_schedule_sess_for_deletion()
1295 ql_dbg(ql_dbg_disc, sess->vha, 0xffff, in qlt_schedule_sess_for_deletion()
1312 sess->prli_pend_timer = 0; in qlt_schedule_sess_for_deletion()
1317 ql_dbg(ql_log_warn, sess->vha, 0xe001, in qlt_schedule_sess_for_deletion()
1349 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf044, in qla24xx_get_loop_id()
1358 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf045, in qla24xx_get_loop_id()
1367 for (i = 0; i < entries; i++) { in qla24xx_get_loop_id()
1372 res = 0; in qla24xx_get_loop_id()
1402 ql_dbg(ql_dbg_disc, vha, 0x20f6, in qlt_create_sess()
1419 sess->keep_nport_handle = 0; in qlt_create_sess()
1420 sess->logout_completed = 0; in qlt_create_sess()
1423 &fcport->port_name[0], sess) < 0) { in qlt_create_sess()
1424 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf015, in qlt_create_sess()
1435 ql_dbg(ql_dbg_disc, vha, 0x20f7, in qlt_create_sess()
1449 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf006, in qlt_create_sess()
1454 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf04b, in qlt_create_sess()
1491 if (max_gen - sess->generation < 0) { in qlt_fc_port_deleted()
1493 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf092, in qlt_fc_port_deleted()
1501 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf008, "qla_tgt_fc_port_deleted %p", sess); in qlt_fc_port_deleted()
1518 ql_dbg(ql_dbg_tgt, tgt->vha, 0xe002, in test_tgt_sess_count()
1521 res = (tgt->sess_count == 0); in test_tgt_sess_count()
1538 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf04e, in qlt_stop_phase1()
1545 ql_dbg(ql_dbg_tgt_mgt, vha, 0xe003, "Stopping target for host %ld(%p)\n", in qlt_stop_phase1()
1557 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf009, in qlt_stop_phase1()
1567 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf00a, in qlt_stop_phase1()
1581 return 0; in qlt_stop_phase1()
1591 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf04f, in qlt_stop_phase2()
1597 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf00b, in qlt_stop_phase2()
1605 tgt->tgt_stop = 0; in qlt_stop_phase2()
1610 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf00c, "Stop of tgt %p finished\n", in qlt_stop_phase2()
1629 u64 key = 0; in qlt_release()
1640 for (i = 0; i < vha->hw->max_qpairs + 1; i++) { in qlt_release()
1669 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf00d, in qlt_release()
1684 ql_dbg(ql_dbg_tgt_mgt, tgt->vha, 0xf050, in qlt_sched_sess_work()
1686 "work, command will be refused", 0); in qlt_sched_sess_work()
1690 ql_dbg(ql_dbg_tgt_mgt, tgt->vha, 0xf00e, in qlt_sched_sess_work()
1704 return 0; in qlt_sched_sess_work()
1723 ql_dbg(ql_dbg_tgt, vha, 0xe004, "Sending NOTIFY_ACK (ha=%p)\n", ha); in qlt_send_notify_ack()
1727 ql_dbg(ql_dbg_tgt, vha, 0xe049, in qlt_send_notify_ack()
1766 ql_dbg(ql_dbg_tgt, vha, 0xe005, in qlt_send_notify_ack()
1787 ql_dbg(ql_dbg_tgt, vha, 0xe006, in qlt_build_abts_resp_iocb()
1793 ql_dbg(ql_dbg_tgt, vha, 0xe04a, in qlt_build_abts_resp_iocb()
1800 memset(resp, 0, sizeof(*resp)); in qlt_build_abts_resp_iocb()
1826 resp->fcp_hdr_le.f_ctl[0] = *p++; in qlt_build_abts_resp_iocb()
1837 resp->payload.ba_acct.low_seq_cnt = 0x0000; in qlt_build_abts_resp_iocb()
1838 resp->payload.ba_acct.high_seq_cnt = cpu_to_le16(0xFFFF); in qlt_build_abts_resp_iocb()
1873 ql_dbg(ql_dbg_tgt, vha, 0xe006, in qlt_24xx_send_abts_resp()
1880 ql_dbg(ql_dbg_tgt, vha, 0xe04a, in qlt_24xx_send_abts_resp()
1898 resp->fcp_hdr_le.f_ctl[0] = *p++; in qlt_24xx_send_abts_resp()
1912 resp->payload.ba_acct.low_seq_cnt = 0x0000; in qlt_24xx_send_abts_resp()
1913 resp->payload.ba_acct.high_seq_cnt = cpu_to_le16(0xFFFF); in qlt_24xx_send_abts_resp()
1945 ql_dbg(ql_dbg_tgt, vha, 0xe04b, in qlt_24xx_retry_term_exchange()
1978 tmp |= (0x4 << 9); in qlt_24xx_retry_term_exchange()
1983 tmp |= (0x4 << 9); in qlt_24xx_retry_term_exchange()
1988 ql_dbg(ql_dbg_tgt, vha, 0xe007, in qlt_24xx_retry_term_exchange()
1992 (mcmd && mcmd->flags & QLA24XX_MGMT_ABORT_IO_ATTR_VALID) ? 1 : 0); in qlt_24xx_retry_term_exchange()
2056 h = &tgt->qphints[0]; in qlt_find_qphint()
2058 h = &tgt->qphints[0]; in qlt_find_qphint()
2078 tag = 0; in qlt_do_tmr_work()
2085 if (rc != 0) { in qlt_do_tmr_work()
2105 &mcmd->orig_iocb.imm_ntfy, 0, 0, 0, 0, 0, 0); in qlt_do_tmr_work()
2110 ql_dbg(ql_dbg_tgt_mgt, mcmd->vha, 0xf052, in qlt_do_tmr_work()
2123 struct qla_qpair_hint *h = &vha->vha_tgt.qla_tgt->qphints[0]; in __qlt_24xx_handle_abts()
2126 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf00f, in __qlt_24xx_handle_abts()
2132 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf051, in __qlt_24xx_handle_abts()
2137 memset(mcmd, 0, sizeof(*mcmd)); in __qlt_24xx_handle_abts()
2170 return 0; in __qlt_24xx_handle_abts()
2187 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf053, in qlt_24xx_handle_abts()
2196 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf010, in qlt_24xx_handle_abts()
2204 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf011, in qlt_24xx_handle_abts()
2215 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf012, in qlt_24xx_handle_abts()
2234 if (rc != 0) { in qlt_24xx_handle_abts()
2235 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf054, in qlt_24xx_handle_abts()
2255 ql_dbg(ql_dbg_tgt, ha, 0xe008, in qlt_24xx_send_task_mgmt_ctio()
2262 ql_dbg(ql_dbg_tgt, ha, 0xe04c, in qlt_24xx_send_task_mgmt_ctio()
2284 ctio->u.status1.sense_data[0] = resp_code; in qlt_24xx_send_task_mgmt_ctio()
2312 ql_dbg(ql_dbg_tgt_dif, vha, 0x3066, in qlt_send_resp_ctio()
2319 ql_dbg(ql_dbg_async, vha, 0x3067, in qlt_send_resp_ctio()
2343 if (ctio->u.status1.residual != 0) in qlt_send_resp_ctio()
2348 ctio->u.status1.sense_data[0] = 0x70; in qlt_send_resp_ctio()
2351 ctio->u.status1.sense_data[7] = 0xa; in qlt_send_resp_ctio()
2377 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf013, in qlt_xmit_tm_rsp()
2388 ql_dbg(ql_dbg_async, vha, 0xe100, in qlt_xmit_tm_rsp()
2402 ql_dbg(ql_dbg_disc, vha, 0x2106, in qlt_xmit_tm_rsp()
2410 &mcmd->orig_iocb.imm_ntfy, 0, 0, 0, 0, 0, 0); in qlt_xmit_tm_rsp()
2441 BUG_ON(cmd->sg_cnt == 0); in qlt_pci_map_calc_cnt()
2446 if (unlikely(prm->seg_cnt == 0)) in qlt_pci_map_calc_cnt()
2474 if (unlikely(prm->prot_seg_cnt == 0)) in qlt_pci_map_calc_cnt()
2488 return 0; in qlt_pci_map_calc_cnt()
2491 ql_dbg_qp(ql_dbg_tgt, prm->cmd->qpair, 0xe04d, in qlt_pci_map_calc_cnt()
2493 0, prm->cmd->sg_cnt); in qlt_pci_map_calc_cnt()
2509 cmd->sg_mapped = 0; in qlt_unmap_sg()
2545 return 0; in qlt_check_reserve_free_req()
2556 req->ring_index = 0; in qlt_get_req_pkt()
2569 uint8_t found = 0; in qlt_make_handle()
2591 ql_dbg(ql_dbg_io, qpair->vha, 0x305b, in qlt_make_handle()
2612 memset(pkt, 0, sizeof(*pkt)); in qlt_24xx_build_ctio_pkt()
2650 return 0; in qlt_24xx_build_ctio_pkt()
2663 while (prm->seg_cnt > 0) { in qlt_load_cont_data_segments()
2675 memset(cont_pkt64, 0, sizeof(*cont_pkt64)); in qlt_load_cont_data_segments()
2678 cont_pkt64->sys_define = 0; in qlt_load_cont_data_segments()
2684 for (cnt = 0; in qlt_load_cont_data_segments()
2712 if (prm->seg_cnt == 0) { in qlt_load_data_segments()
2714 cur_dsd->address = 0; in qlt_load_data_segments()
2715 cur_dsd->length = 0; in qlt_load_data_segments()
2722 for (cnt = 0; in qlt_load_data_segments()
2734 return cmd->bufflen > 0; in qlt_has_data()
2742 /* asc 0x10=dif error */ in qlt_print_dif_err()
2743 if (prm->sense_buffer && (prm->sense_buffer[12] == 0x10)) { in qlt_print_dif_err()
2749 ql_dbg(ql_dbg_tgt_dif, vha, 0xe00b, in qlt_print_dif_err()
2750 "BE detected Guard TAG ERR: lba[0x%llx|%lld] len[0x%x] " in qlt_print_dif_err()
2756 ql_dbg(ql_dbg_tgt_dif, vha, 0xe00c, in qlt_print_dif_err()
2757 "BE detected APP TAG ERR: lba[0x%llx|%lld] len[0x%x] " in qlt_print_dif_err()
2763 ql_dbg(ql_dbg_tgt_dif, vha, 0xe00f, in qlt_print_dif_err()
2764 "BE detected REF TAG ERR: lba[0x%llx|%lld] len[0x%x] " in qlt_print_dif_err()
2770 ql_dbg(ql_dbg_tgt_dif, vha, 0xe010, in qlt_print_dif_err()
2777 ql_dump_buffer(ql_dbg_tgt_dif, vha, 0xe011, cmd->cdb, 16); in qlt_print_dif_err()
2795 prm->sense_buffer = &cmd->sense_buffer[0]; in qlt_pre_xmit_response()
2800 prm->residual = 0; in qlt_pre_xmit_response()
2801 prm->add_status_pkt = 0; in qlt_pre_xmit_response()
2803 prm->prot_seg_cnt = 0; in qlt_pre_xmit_response()
2804 prm->tot_dsds = 0; in qlt_pre_xmit_response()
2807 if (qlt_pci_map_calc_cnt(prm) != 0) in qlt_pre_xmit_response()
2815 ql_dbg_qp(ql_dbg_io + ql_dbg_verbose, qpair, 0x305c, in qlt_pre_xmit_response()
2818 se_cmd->t_task_cdb ? se_cmd->t_task_cdb[0] : 0, in qlt_pre_xmit_response()
2823 ql_dbg_qp(ql_dbg_io, qpair, 0x305d, in qlt_pre_xmit_response()
2826 se_cmd->t_task_cdb[0] : 0, cmd->bufflen, prm->rq_result); in qlt_pre_xmit_response()
2838 (prm->rq_result != 0))) { in qlt_pre_xmit_response()
2845 return 0; in qlt_pre_xmit_response()
2852 return 0; in qlt_need_explicit_conf()
2867 if (qlt_need_explicit_conf(prm->cmd, 0)) { in qlt_24xx_init_ctio_to_isp()
2878 if ((prm->rq_result & SS_SCSI_STATUS_BYTE) != 0) { in qlt_24xx_init_ctio_to_isp()
2879 ql_dbg_qp(ql_dbg_tgt, prm->cmd->qpair, 0xe017, in qlt_24xx_init_ctio_to_isp()
2898 for (i = 0; i < prm->sense_buffer_len/4; i++) { in qlt_24xx_init_ctio_to_isp()
2913 ctio->u.status1.sense_length = 0; in qlt_24xx_init_ctio_to_isp()
2914 memset(ctio->u.status1.sense_data, 0, in qlt_24xx_init_ctio_to_isp()
2941 return 0; in qlt_hba_err_chk_enabled()
2956 return 0; in qla_tgt_ref_mask_check()
2958 return 0; in qla_tgt_ref_mask_check()
2969 uint32_t lba = 0xffffffff & se_cmd->t_task_lba; in qla_tgt_set_dif_tags()
2972 uint32_t t32 = 0; in qla_tgt_set_dif_tags()
2979 ctx->app_tag = 0; in qla_tgt_set_dif_tags()
2980 ctx->app_tag_mask[0] = 0x0; in qla_tgt_set_dif_tags()
2981 ctx->app_tag_mask[1] = 0x0; in qla_tgt_set_dif_tags()
3002 ctx->ref_tag_mask[0] = 0xff; in qla_tgt_set_dif_tags()
3003 ctx->ref_tag_mask[1] = 0xff; in qla_tgt_set_dif_tags()
3004 ctx->ref_tag_mask[2] = 0xff; in qla_tgt_set_dif_tags()
3005 ctx->ref_tag_mask[3] = 0xff; in qla_tgt_set_dif_tags()
3019 ctx->ref_tag_mask[0] = 0xff; in qla_tgt_set_dif_tags()
3020 ctx->ref_tag_mask[1] = 0xff; in qla_tgt_set_dif_tags()
3021 ctx->ref_tag_mask[2] = 0xff; in qla_tgt_set_dif_tags()
3022 ctx->ref_tag_mask[3] = 0xff; in qla_tgt_set_dif_tags()
3036 ctx->ref_tag_mask[0] = 0xff; in qla_tgt_set_dif_tags()
3037 ctx->ref_tag_mask[1] = 0xff; in qla_tgt_set_dif_tags()
3038 ctx->ref_tag_mask[2] = 0xff; in qla_tgt_set_dif_tags()
3039 ctx->ref_tag_mask[3] = 0xff; in qla_tgt_set_dif_tags()
3044 ctx->ref_tag_mask[0] = ctx->ref_tag_mask[1] = in qla_tgt_set_dif_tags()
3045 ctx->ref_tag_mask[2] = ctx->ref_tag_mask[3] = 0x00; in qla_tgt_set_dif_tags()
3054 uint32_t transfer_length = 0; in qlt_build_ctio_crc2_pkt()
3062 uint16_t fw_prot_opts = 0; in qlt_build_ctio_crc2_pkt()
3075 memset(pkt, 0, sizeof(*pkt)); in qlt_build_ctio_crc2_pkt()
3077 ql_dbg_qp(ql_dbg_tgt, cmd->qpair, 0xe071, in qlt_build_ctio_crc2_pkt()
3078 "qla_target(%d):%s: se_cmd[%p] CRC2 prot_op[0x%x] cmd prot sg:cnt[%p:%x] lba[%llu]\n", in qlt_build_ctio_crc2_pkt()
3084 bundling = 0; in qlt_build_ctio_crc2_pkt()
3109 fw_prot_opts |= 0x10; /* Disable Guard tag checking */ in qlt_build_ctio_crc2_pkt()
3201 cur_dsd = &crc_ctx_pkt->u.nobundling.data_dsd[0]; in qlt_build_ctio_crc2_pkt()
3211 cur_dsd = &crc_ctx_pkt->u.bundling.data_dsd[0]; in qlt_build_ctio_crc2_pkt()
3218 crc_ctx_pkt->guard_seed = cpu_to_le16(0); in qlt_build_ctio_crc2_pkt()
3220 memset((uint8_t *)&tc, 0 , sizeof(tc)); in qlt_build_ctio_crc2_pkt()
3269 uint32_t full_req_cnt = 0; in qlt_xmit_response()
3270 unsigned long flags = 0; in qlt_xmit_response()
3276 return 0; in qlt_xmit_response()
3279 ql_dbg_qp(ql_dbg_tgt, qpair, 0xe018, in qlt_xmit_response()
3282 1 : 0, cmd->bufflen, cmd->sg_cnt, cmd->dma_data_direction, in qlt_xmit_response()
3287 if (unlikely(res != 0)) { in qlt_xmit_response()
3304 ql_dbg_qp(ql_dbg_async, qpair, 0xe101, in qlt_xmit_response()
3308 res = 0; in qlt_xmit_response()
3321 if (unlikely(res != 0)) { in qlt_xmit_response()
3336 if (prm.add_status_pkt == 0) { in qlt_xmit_response()
3346 if (qlt_need_explicit_conf(cmd, 0)) { in qlt_xmit_response()
3364 ql_dbg_qp(ql_dbg_tgt, qpair, 0x305e, in qlt_xmit_response()
3365 "Building additional status packet 0x%p.\n", in qlt_xmit_response()
3376 ctio->dseg_count = 0; in qlt_xmit_response()
3408 return 0; in qlt_xmit_response()
3424 unsigned long flags = 0; in qlt_rdy_to_xfer()
3425 int res = 0; in qlt_rdy_to_xfer()
3428 memset(&prm, 0, sizeof(prm)); in qlt_rdy_to_xfer()
3441 cmd->write_data_transferred = 0; in qlt_rdy_to_xfer()
3444 ql_dbg_qp(ql_dbg_async, qpair, 0xe102, in qlt_rdy_to_xfer()
3448 return 0; in qlt_rdy_to_xfer()
3452 if (qlt_pci_map_calc_cnt(&prm) != 0) in qlt_rdy_to_xfer()
3458 if (res != 0) in qlt_rdy_to_xfer()
3465 if (unlikely(res != 0)) { in qlt_rdy_to_xfer()
3507 uint8_t *ap = &sts->actual_dif[0]; in qlt_handle_dif_error()
3508 uint8_t *ep = &sts->expected_dif[0]; in qlt_handle_dif_error()
3516 cmd->a_guard = get_unaligned_be16(ap + 0); in qlt_handle_dif_error()
3520 cmd->e_guard = get_unaligned_be16(ep + 0); in qlt_handle_dif_error()
3524 ql_dbg(ql_dbg_tgt_dif, vha, 0xf075, in qlt_handle_dif_error()
3527 scsi_status = sense_key = asc = ascq = 0; in qlt_handle_dif_error()
3531 ql_dbg(ql_dbg_tgt_dif, vha, 0xe00d, in qlt_handle_dif_error()
3533 cmd->cdb[0], lba, (lba+cmd->num_blks), cmd->num_blks, in qlt_handle_dif_error()
3541 asc = 0x10; in qlt_handle_dif_error()
3542 ascq = 0x2; in qlt_handle_dif_error()
3547 ql_dbg(ql_dbg_tgt_dif, vha, 0xe00e, in qlt_handle_dif_error()
3549 cmd->cdb[0], lba, (lba+cmd->num_blks), cmd->num_blks, in qlt_handle_dif_error()
3557 asc = 0x10; in qlt_handle_dif_error()
3558 ascq = 0x3; in qlt_handle_dif_error()
3564 ql_dbg(ql_dbg_tgt_dif, vha, 0xe012, in qlt_handle_dif_error()
3566 cmd->cdb[0], lba, (lba+cmd->num_blks), cmd->num_blks, in qlt_handle_dif_error()
3574 asc = 0x10; in qlt_handle_dif_error()
3575 ascq = 0x1; in qlt_handle_dif_error()
3611 int ret = 0; in __qlt_send_term_imm_notif()
3613 ql_dbg(ql_dbg_tgt_tmr, vha, 0xe01c, in __qlt_send_term_imm_notif()
3618 ql_dbg(ql_dbg_tgt, vha, 0xe080, in __qlt_send_term_imm_notif()
3676 int ret = 0; in __qlt_send_term_exchange()
3679 ql_dbg(ql_dbg_tgt, vha, 0xe009, "Sending TERM EXCH CTIO (ha=%p)\n", ha); in __qlt_send_term_exchange()
3686 ql_dbg(ql_dbg_tgt, vha, 0xe050, in __qlt_send_term_exchange()
3694 ql_dbg(ql_dbg_tgt, vha, 0xe051, in __qlt_send_term_exchange()
3733 unsigned long flags = 0; in qlt_send_term_exchange()
3745 qlt_alloc_qfull_cmd(vha, atio, 0, 0); in qlt_send_term_exchange()
3751 qlt_alloc_qfull_cmd(vha, atio, 0, 0); in qlt_send_term_exchange()
3788 vha->hw->tgt.num_qfull_cmds_dropped = 0; in qlt_init_term_exchange()
3800 ql_dbg(ql_dbg_tgt, vha, 0xe079, in qlt_chk_exch_leak_thresh_hold()
3820 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf014, in qlt_abort_cmd()
3836 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf016, in qlt_abort_cmd()
3846 qlt_send_term_exchange(cmd->qpair, cmd, &cmd->atio, 0, 1); in qlt_abort_cmd()
3847 return 0; in qlt_abort_cmd()
3855 ql_dbg(ql_dbg_tgt, cmd->vha, 0xe074, in qlt_free_cmd()
3883 int term = 0; in qlt_term_ctio_exchange()
3887 ql_dbg(ql_dbg_tgt_dif, vha, 0xe013, in qlt_term_ctio_exchange()
3888 "Term DIF cmd: lba[0x%llx|%lld] len[0x%x] " in qlt_term_ctio_exchange()
3905 qlt_send_term_exchange(qpair, cmd, &cmd->atio, 1, 0); in qlt_term_ctio_exchange()
3926 ql_dbg(ql_dbg_tgt_mgt, vha, 0x1000a, in qlt_ctio_to_cmd()
3938 ql_dbg(ql_dbg_tgt, vha, 0xe052, in qlt_ctio_to_cmd()
3946 ql_dbg(ql_dbg_async, vha, 0xe053, in qlt_ctio_to_cmd()
3954 ql_dbg(ql_dbg_tgt, vha, 0xe054, in qlt_ctio_to_cmd()
3977 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf01d, in qlt_do_ctio_completion()
3995 cmd->cmd_sent_to_fw = 0; in qlt_do_ctio_completion()
4000 switch (status & 0xFFFF) { in qlt_do_ctio_completion()
4006 ((cmd->ctio_flags >> 9) & 0xf), in qlt_do_ctio_completion()
4016 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf058, in qlt_do_ctio_completion()
4028 (status & 0xFFFF) == CTIO_PORT_LOGGED_OUT; in qlt_do_ctio_completion()
4030 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf059, in qlt_do_ctio_completion()
4042 ql_dbg(ql_dbg_disc, vha, 0x20f8, in qlt_do_ctio_completion()
4053 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf073, in qlt_do_ctio_completion()
4055 "received (state %x, ulp_cmd %p) actual_dif[0x%llx] " in qlt_do_ctio_completion()
4056 "expect_dif[0x%llx]\n", in qlt_do_ctio_completion()
4058 *((u64 *)&crc->actual_dif[0]), in qlt_do_ctio_completion()
4059 *((u64 *)&crc->expected_dif[0])); in qlt_do_ctio_completion()
4069 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf05b, in qlt_do_ctio_completion()
4070 "qla_target(%d): CTIO with EDIF error status 0x%x received (state %x, se_cmd %p\n", in qlt_do_ctio_completion()
4075 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf05b, in qlt_do_ctio_completion()
4076 "qla_target(%d): CTIO with error status 0x%x received (state %x, se_cmd %p\n", in qlt_do_ctio_completion()
4108 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf01e, in qlt_do_ctio_completion()
4112 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf05c, in qlt_do_ctio_completion()
4119 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf01f, "Finishing failed CTIO\n"); in qlt_do_ctio_completion()
4148 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf05d, in qlt_get_fcp_task_attr()
4170 int ret, fcp_task_attr, data_dir, bidi = 0; in __qlt_do_work()
4173 cmd->cmd_in_wq = 0; in __qlt_do_work()
4177 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf082, in __qlt_do_work()
4184 cdb = &atio->u.isp24.fcp_cmnd.cdb[0]; in __qlt_do_work()
4204 if (ret != 0) in __qlt_do_work()
4213 ql_dbg(ql_dbg_io, vha, 0x3060, "Terminating work cmd %p", cmd); in __qlt_do_work()
4220 qlt_send_term_exchange(qpair, NULL, &cmd->atio, 1, 0); in __qlt_do_work()
4248 u64 key = 0; in qlt_clr_qp_table()
4250 ql_log(ql_log_info, vha, 0x706c, in qlt_clr_qp_table()
4259 ha->base_qpair->lun_cnt = 0; in qlt_clr_qp_table()
4260 for (key = 0; key < ha->max_qpairs; key++) in qlt_clr_qp_table()
4262 ha->queue_pair_map[key]->lun_cnt = 0; in qlt_clr_qp_table()
4278 int lcnt = 0, rc; in qlt_assign_qpair()
4283 if (qpair->lun_cnt == 0) { in qlt_assign_qpair()
4291 ql_log(ql_log_info, vha, 0xd037, in qlt_assign_qpair()
4303 if (qp->lun_cnt == 0) { in qlt_assign_qpair()
4311 ql_log(ql_log_info, vha, 0xd038, in qlt_assign_qpair()
4333 ql_log(ql_log_info, vha, 0xd039, in qlt_assign_qpair()
4339 h = &tgt->qphints[0]; in qlt_assign_qpair()
4367 cmd->trc_flags = 0; in qlt_get_tag()
4392 ql_dbg(ql_dbg_io, vha, 0x3061, in qlt_handle_cmd_for_atio()
4408 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf002, in qlt_handle_cmd_for_atio()
4418 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf004, in qlt_handle_cmd_for_atio()
4427 ql_dbg(ql_dbg_io, vha, 0x3062, in qlt_handle_cmd_for_atio()
4454 return 0; in qlt_handle_cmd_for_atio()
4465 struct qla_qpair_hint *h = &vha->vha_tgt.qla_tgt->qphints[0]; in qlt_issue_task_mgmt()
4469 ql_dbg(ql_dbg_tgt_tmr, vha, 0x10009, in qlt_issue_task_mgmt()
4475 memset(mcmd, 0, sizeof(*mcmd)); in qlt_issue_task_mgmt()
4515 return 0; in qlt_issue_task_mgmt()
4541 return qlt_issue_task_mgmt(sess, unpacked_lun, fn, iocb, 0); in qlt_handle_task_mgmt()
4556 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf05f, in __qlt_abort_task()
4561 memset(mcmd, 0, sizeof(*mcmd)); in __qlt_abort_task()
4575 if (rc != 0) { in __qlt_abort_task()
4576 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf060, in __qlt_abort_task()
4583 return 0; in __qlt_abort_task()
4602 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf025, in qlt_abort_task()
4615 ql_dbg(ql_dbg_tgt_mgt, fcport->vha, 0xf093, in qlt_logo_completion_handler()
4659 ql_dbg(ql_dbg_disc, vha, 0x1000c, in qlt_find_sess_invalidate_other()
4675 ql_dbg(ql_dbg_disc, vha, 0xf01b, in qlt_find_sess_invalidate_other()
4690 ql_dbg(ql_dbg_disc, vha, 0x1000d, in qlt_find_sess_invalidate_other()
4709 int count = 0; in abort_cmds_for_s_id()
4746 int res = 0; in qlt_handle_login()
4756 port_id.b.al_pa = iocb->u.isp24.port_id[0]; in qlt_handle_login()
4757 port_id.b.rsvd_1 = 0; in qlt_handle_login()
4770 ql_dbg(ql_dbg_disc, vha, 0xffff, in qlt_handle_login()
4771 "%s %d Term INOT due to WWN=0 lid=%d, NportID %06X ", in qlt_handle_login()
4786 ql_dbg(ql_dbg_disc, vha, 0xffff, in qlt_handle_login()
4795 ql_dbg(ql_dbg_disc, vha, 0xffff, in qlt_handle_login()
4802 ql_dbg(ql_dbg_disc, vha, 0xffff, in qlt_handle_login()
4812 ql_dbg(ql_dbg_disc + ql_dbg_verbose, vha, 0xffff, in qlt_handle_login()
4828 ql_dbg(ql_dbg_disc, vha, 0xffff, in qlt_handle_login()
4835 pla, 0); in qlt_handle_login()
4839 pla, 0); in qlt_handle_login()
4858 ql_dbg(ql_dbg_disc, vha, 0xffff, in qlt_handle_login()
4882 ql_dbg(ql_dbg_disc, vha, 0xffff, in qlt_handle_login()
4892 sess->local = 0; in qlt_handle_login()
4901 if ((wd3_lo & BIT_4) == 0) in qlt_handle_login()
4910 ql_dbg(ql_dbg_disc, vha, 0x20f9, in qlt_handle_login()
4942 ql_dbg(ql_dbg_disc, vha, 0x20f9, in qlt_handle_login()
4967 int res = 0; in qlt_24xx_handle_els()
4976 port_id.b.al_pa = iocb->u.isp24.port_id[0]; in qlt_24xx_handle_els()
4977 port_id.b.rsvd_1 = 0; in qlt_24xx_handle_els()
4981 ql_dbg(ql_dbg_disc, vha, 0xf026, in qlt_24xx_handle_els()
4982 "qla_target(%d): Port ID: %02x:%02x:%02x ELS opcode: 0x%02x lid %d %8phC\n", in qlt_24xx_handle_els()
4984 iocb->u.isp24.port_id[1], iocb->u.isp24.port_id[0], in qlt_24xx_handle_els()
4989 * res = 0 means ack async/later. in qlt_24xx_handle_els()
5004 ql_dbg(ql_dbg_disc, vha, 0xffff, in qlt_24xx_handle_els()
5012 ql_dbg(ql_dbg_disc, vha, 0xffff, in qlt_24xx_handle_els()
5044 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf09b, in qlt_24xx_handle_els()
5050 res = 0; in qlt_24xx_handle_els()
5062 ql_dbg(ql_dbg_disc, vha, 0xffff, in qlt_24xx_handle_els()
5090 ql_dbg(ql_dbg_disc, sess->vha, 0xffff, in qlt_24xx_handle_els()
5095 return 0; in qlt_24xx_handle_els()
5115 ql_log(ql_log_warn, sess->vha, 0xf095, in qlt_24xx_handle_els()
5119 res = 0; in qlt_24xx_handle_els()
5127 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf096, in qlt_24xx_handle_els()
5131 sess->local = 0; in qlt_24xx_handle_els()
5139 if ((wd3_lo & BIT_4) == 0) in qlt_24xx_handle_els()
5151 ql_dbg(ql_dbg_disc, vha, 0x20fa, in qlt_24xx_handle_els()
5156 res = 0; in qlt_24xx_handle_els()
5164 ql_dbg(ql_dbg_disc, vha, 0x20fb, in qlt_24xx_handle_els()
5169 res = 0; in qlt_24xx_handle_els()
5177 loop_id = 0xFFFF; in qlt_24xx_handle_els()
5198 ql_dbg(ql_dbg_disc, vha, 0x20fc, in qlt_24xx_handle_els()
5201 if (res == 0) { in qlt_24xx_handle_els()
5207 res = 0; in qlt_24xx_handle_els()
5212 res = 0; in qlt_24xx_handle_els()
5224 &tgt->link_reinit_iocb, 0, 0, 0, 0, 0, 0); in qlt_24xx_handle_els()
5225 tgt->link_reinit_iocb_pending = 0; in qlt_24xx_handle_els()
5231 ql_dbg(ql_dbg_disc, vha, 0x20fd, in qlt_24xx_handle_els()
5243 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf061, in qlt_24xx_handle_els()
5250 ql_dbg(ql_dbg_disc, vha, 0xf026, in qlt_24xx_handle_els()
5251 "qla_target(%d): Exit ELS opcode: 0x%02x res %d\n", in qlt_24xx_handle_els()
5265 uint32_t add_flags = 0; in qlt_handle_imm_notify()
5275 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf032, in qlt_handle_imm_notify()
5280 if (qlt_reset(vha, iocb, QLA_TGT_ABORT_ALL) == 0) in qlt_handle_imm_notify()
5281 send_notify_ack = 0; in qlt_handle_imm_notify()
5289 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf033, in qlt_handle_imm_notify()
5296 &tgt->link_reinit_iocb, 0, 0, 0, 0, 0, 0); in qlt_handle_imm_notify()
5304 send_notify_ack = 0; in qlt_handle_imm_notify()
5309 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf034, in qlt_handle_imm_notify()
5315 if (qlt_reset(vha, iocb, QLA_TGT_NEXUS_LOSS_SESS) == 0) in qlt_handle_imm_notify()
5316 send_notify_ack = 0; in qlt_handle_imm_notify()
5321 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf035, in qlt_handle_imm_notify()
5323 if (qlt_reset(vha, iocb, QLA_TGT_NEXUS_LOSS) == 0) in qlt_handle_imm_notify()
5324 send_notify_ack = 0; in qlt_handle_imm_notify()
5329 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf036, in qlt_handle_imm_notify()
5332 if (qlt_reset(vha, iocb, QLA_TGT_ABORT_ALL) == 0) in qlt_handle_imm_notify()
5333 send_notify_ack = 0; in qlt_handle_imm_notify()
5338 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf06a, in qlt_handle_imm_notify()
5342 if (qlt_reset(vha, iocb, QLA_TGT_NEXUS_LOSS) == 0) in qlt_handle_imm_notify()
5343 send_notify_ack = 0; in qlt_handle_imm_notify()
5347 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf06b, in qlt_handle_imm_notify()
5354 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf037, in qlt_handle_imm_notify()
5360 if (qlt_abort_task(vha, iocb) == 0) in qlt_handle_imm_notify()
5361 send_notify_ack = 0; in qlt_handle_imm_notify()
5365 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf06c, in qlt_handle_imm_notify()
5371 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf038, in qlt_handle_imm_notify()
5377 if (qlt_24xx_handle_els(vha, iocb) == 0) in qlt_handle_imm_notify()
5378 send_notify_ack = 0; in qlt_handle_imm_notify()
5381 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf06d, in qlt_handle_imm_notify()
5388 qlt_send_notify_ack(ha->base_qpair, iocb, add_flags, 0, 0, 0, in qlt_handle_imm_notify()
5389 0, 0); in qlt_handle_imm_notify()
5414 qlt_send_term_exchange(qpair, NULL, atio, 1, 0); in __qlt_send_busy()
5415 return 0; in __qlt_send_busy()
5421 ql_dbg(ql_dbg_io, vha, 0x3063, in __qlt_send_busy()
5452 if (ctio24->u.status1.residual != 0) in __qlt_send_busy()
5461 return 0; in __qlt_send_busy()
5480 ql_dbg(ql_dbg_io, vha, 0x300a, in qlt_alloc_qfull_cmd()
5492 ql_dbg(ql_dbg_io, vha, 0x3068, in qlt_alloc_qfull_cmd()
5508 ql_dbg(ql_dbg_io, vha, 0x3009, in qlt_alloc_qfull_cmd()
5558 int rc = 0; in qlt_free_qfull_cmds()
5561 return 0; in qlt_free_qfull_cmds()
5569 return 0; in qlt_free_qfull_cmds()
5587 ql_dbg(ql_dbg_io, vha, 0x3006, in qlt_free_qfull_cmds()
5591 ql_dbg(ql_dbg_io, vha, 0x3007, in qlt_free_qfull_cmds()
5595 ql_dbg(ql_dbg_io, vha, 0x3008, in qlt_free_qfull_cmds()
5629 int rc = 0; in qlt_send_busy()
5645 return 0; in qlt_chk_qfull_thresh_hold()
5664 unsigned long flags = 0; in qlt_24xx_atio_pkt()
5667 ql_dbg(ql_dbg_tgt, vha, 0x3064, in qlt_24xx_atio_pkt()
5682 ql_dbg(ql_dbg_io, vha, 0x3065, in qlt_24xx_atio_pkt()
5695 if (likely(atio->u.isp24.fcp_cmnd.task_mgmt_flags == 0)) { in qlt_24xx_atio_pkt()
5698 if (rc != 0) { in qlt_24xx_atio_pkt()
5706 if (unlikely(rc != 0)) { in qlt_24xx_atio_pkt()
5711 ql_dbg(ql_dbg_tgt, vha, 0xe05f, in qlt_24xx_atio_pkt()
5715 ql_dbg(ql_dbg_tgt, vha, 0xe05f, in qlt_24xx_atio_pkt()
5718 atio, 1, 0); in qlt_24xx_atio_pkt()
5721 ql_dbg(ql_dbg_tgt, vha, 0xe060, in qlt_24xx_atio_pkt()
5728 ql_dbg(ql_dbg_tgt, vha, 0xe060, in qlt_24xx_atio_pkt()
5743 if (unlikely(atio->u.isp2x.entry_status != 0)) { in qlt_24xx_atio_pkt()
5744 ql_dbg(ql_dbg_tgt, vha, 0xe05b, in qlt_24xx_atio_pkt()
5751 ql_dbg(ql_dbg_tgt, vha, 0xe02e, "%s", "IMMED_NOTIFY ATIO"); in qlt_24xx_atio_pkt()
5762 ql_dbg(ql_dbg_tgt, vha, 0xe05c, in qlt_24xx_atio_pkt()
5773 * rc = 0 : send terminate & abts respond
5774 * rc != 0: do not send term & abts respond
5780 int rc = 0; in qlt_chk_unresolv_exchg()
5794 qpair->retry_term_cnt = 0; in qlt_chk_unresolv_exchg()
5795 ql_log(ql_log_warn, vha, 0xffff, in qlt_chk_unresolv_exchg()
5798 vha, 0xffff, (uint8_t *)entry, sizeof(*entry)); in qlt_chk_unresolv_exchg()
5810 qpair->retry_term_cnt = 0; in qlt_chk_unresolv_exchg()
5829 ql_dbg(ql_dbg_async, vha, 0xe064, in qlt_handle_abts_completion()
5839 ql_dbg(ql_dbg_tgt, vha, 0xe038, in qlt_handle_abts_completion()
5844 if (le32_to_cpu(entry->error_subcode1) == 0x1E && in qlt_handle_abts_completion()
5845 le32_to_cpu(entry->error_subcode2) == 0) { in qlt_handle_abts_completion()
5853 ql_dbg(ql_dbg_tgt, vha, 0xe063, in qlt_handle_abts_completion()
5873 ql_dbg(ql_dbg_tgt, vha, 0xe05d, in qlt_response_pkt()
5903 ql_dbg(ql_dbg_tgt, vha, 0xe05e, in qlt_response_pkt()
5911 if (rc != 0) in qlt_response_pkt()
5915 if (unlikely(rc != 0)) { in qlt_response_pkt()
5918 ql_dbg(ql_dbg_tgt, vha, 0xe05f, in qlt_response_pkt()
5922 ql_dbg(ql_dbg_tgt, vha, 0xe05f, in qlt_response_pkt()
5925 atio, 1, 0); in qlt_response_pkt()
5928 ql_dbg(ql_dbg_tgt, vha, 0xe060, in qlt_response_pkt()
5935 ql_dbg(ql_dbg_tgt, vha, 0xe060, in qlt_response_pkt()
5967 ql_dbg(ql_dbg_tgt, vha, 0xe035, "%s", "IMMED_NOTIFY\n"); in qlt_response_pkt()
5972 if (tgt->notify_ack_expected > 0) { in qlt_response_pkt()
5975 ql_dbg(ql_dbg_tgt, vha, 0xe036, in qlt_response_pkt()
5982 ql_dbg(ql_dbg_tgt, vha, 0xe061, in qlt_response_pkt()
5988 ql_dbg(ql_dbg_tgt, vha, 0xe062, in qlt_response_pkt()
5995 ql_dbg(ql_dbg_tgt, vha, 0xe037, in qlt_response_pkt()
6001 if (tgt->abts_resp_expected > 0) { in qlt_response_pkt()
6004 ql_dbg(ql_dbg_tgt, vha, 0xe064, in qlt_response_pkt()
6011 ql_dbg(ql_dbg_tgt, vha, 0xe065, in qlt_response_pkt()
6046 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf03a, in qlt_async_event()
6056 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf03b, in qlt_async_event()
6058 "(m[0]=%x, m[1]=%x, m[2]=%x, m[3]=%x)", vha->vp_idx, in qlt_async_event()
6059 mailbox[0], mailbox[1], mailbox[2], mailbox[3]); in qlt_async_event()
6063 0, 0, 0, 0, 0, 0); in qlt_async_event()
6064 tgt->link_reinit_iocb_pending = 0; in qlt_async_event()
6073 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf03c, in qlt_async_event()
6075 "(m[0]=%x, m[1]=%x, m[2]=%x, m[3]=%x)", vha->vp_idx, code, in qlt_async_event()
6076 mailbox[0], mailbox[1], mailbox[2], mailbox[3]); in qlt_async_event()
6080 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf017, in qlt_async_event()
6081 "qla_target(%d): Async event LS_REJECT occurred (m[0]=%x, m[1]=%x, m[2]=%x, m[3]=%x)", in qlt_async_event()
6083 mailbox[0], mailbox[1], mailbox[2], mailbox[3]); in qlt_async_event()
6089 ql_log(ql_log_warn, vha, 0xd03a, in qlt_async_event()
6092 vha->hw->exch_starvation = 0; in qlt_async_event()
6105 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf03d, in qlt_async_event()
6107 "occurred: updating the ports database (m[0]=%x, m[1]=%x, " in qlt_async_event()
6109 mailbox[0], mailbox[1], mailbox[2], mailbox[3]); in qlt_async_event()
6112 if (login_code == 0x4) { in qlt_async_event()
6113 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf03e, in qlt_async_event()
6115 vha->hw->exch_starvation = 0; in qlt_async_event()
6116 } else if (login_code == 0x7) in qlt_async_event()
6117 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf03f, in qlt_async_event()
6132 u8 newfcport = 0; in qlt_get_port_database()
6136 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf06f, in qlt_get_port_database()
6144 rc = qla24xx_gpdb_wait(vha, fcport, 0); in qlt_get_port_database()
6146 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf070, in qlt_get_port_database()
6149 "(loop_id=0x%04x)", vha->vp_idx, rc, loop_id); in qlt_get_port_database()
6180 fcport->deleted = 0; in qlt_get_port_database()
6190 ql_dbg(ql_dbg_disc, vha, 0x20ff, in qlt_get_port_database()
6215 uint16_t loop_id = 0; in qlt_make_local_sess()
6217 if (s_id.domain == 0xFF && s_id.area == 0xFC) { in qlt_make_local_sess()
6222 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf042, in qlt_make_local_sess()
6235 if (rc != 0) { in qlt_make_local_sess()
6238 ql_log(ql_log_info, vha, 0xf071, in qlt_make_local_sess()
6262 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf043, in qlt_make_local_sess()
6284 unsigned long flags = 0, flags2 = 0; in qlt_abort_work()
6312 ql_dbg(ql_dbg_tgt_tmr, vha, 0xf01c, in qlt_abort_work()
6325 if (rc != 0) in qlt_abort_work()
6345 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf000, "Sess work (tgt %p)", tgt); in qlt_sess_work_fn()
6385 return 0; in qlt_add_target()
6388 ql_log(ql_log_warn, base_vha, 0xe070, in qlt_add_target()
6390 return 0; in qlt_add_target()
6393 ql_dbg(ql_dbg_tgt, base_vha, 0xe03b, in qlt_add_target()
6400 ql_dbg(ql_dbg_tgt, base_vha, 0xe066, in qlt_add_target()
6410 ql_log(ql_log_warn, base_vha, 0x0197, in qlt_add_target()
6422 ql_log(ql_log_info, base_vha, 0x0198, in qlt_add_target()
6426 h = &tgt->qphints[0]; in qlt_add_target()
6432 for (i = 0; i < ha->max_qpairs; i++) { in qlt_add_target()
6454 atomic_set(&tgt->tgt_global_resets_count, 0); in qlt_add_target()
6458 ql_dbg(ql_dbg_tgt, base_vha, 0xe067, in qlt_add_target()
6471 return 0; in qlt_add_target()
6478 return 0; in qlt_remove_target()
6482 return 0; in qlt_remove_target()
6488 ql_dbg(ql_dbg_tgt, vha, 0xe03c, "Unregistering target for host %ld(%p)", in qlt_remove_target()
6492 return 0; in qlt_remove_target()
6498 u32 key = 0; in qla_remove_hostmap()
6567 ql_dbg(ql_dbg_tgt, vha, 0xe068, in qlt_lport_register()
6579 if (rc != 0) in qlt_lport_register()
6664 ql_dbg(ql_dbg_tgt, vha, 0xe069, in qlt_enable_vha()
6676 tgt->tgt_stopped = 0; in qlt_enable_vha()
6681 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf021, in qlt_enable_vha()
6708 ql_dbg(ql_dbg_tgt, vha, 0xe06a, in qlt_disable_vha()
6727 ql_dbg(ql_dbg_tgt, vha, 0xe081, in qlt_disable_vha()
6760 u8 fc4_feature = 0; in qlt_rff_id()
6762 * FC-4 Feature bit 0 indicates target functionality to the name server. in qlt_rff_id()
6781 * Returns 0 on success.
6793 for (cnt = 0; cnt < ha->tgt.atio_q_length; cnt++) { in qlt_init_atio_q_entries()
6825 ql_log(ql_log_warn, vha, 0xd03c, in qlt_24xx_process_atio_queue()
6833 ha_locked, 0); in qlt_24xx_process_atio_queue()
6839 for (i = 0; i < cnt; i++) { in qlt_24xx_process_atio_queue()
6842 ha->tgt.atio_ring_index = 0; in qlt_24xx_process_atio_queue()
6867 wrt_reg_dword(ISP_ATIO_Q_IN(vha), 0); in qlt_24xx_config_rings()
6868 wrt_reg_dword(ISP_ATIO_Q_OUT(vha), 0); in qlt_24xx_config_rings()
6875 ql_dbg(ql_dbg_init, vha, 0xf072, in qlt_24xx_config_rings()
6876 "Registering ICB vector 0x%x for atio que.\n", in qlt_24xx_config_rings()
6882 icb->msix_atio = 0; in qlt_24xx_config_rings()
6884 ql_dbg(ql_dbg_init, vha, 0xf072, in qlt_24xx_config_rings()
6913 nv->exchange_count = cpu_to_le16(0xFFFF); in qlt_24xx_config_nvram_stage1()
7019 nv->exchange_count = cpu_to_le16(0xFFFF); in qlt_81xx_config_nvram_stage1()
7162 qlt_24xx_process_atio_queue(vha, 0); in qla83xx_msix_atio_q()
7183 qlt_24xx_process_atio_queue(vha, 0); in qlt_handle_abts_recv_work()
7222 return 0; in qlt_mem_alloc()
7237 return 0; in qlt_mem_alloc()
7252 ha->tgt.atio_dma = 0; in qlt_mem_free()
7276 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf018, in qlt_update_vp_map()
7281 ql_log(ql_log_info, vha, 0xd03e, in qlt_update_vp_map()
7286 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf019, in qlt_update_vp_map()
7296 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf01a, in qlt_update_vp_map()
7301 vha->d_id.b24 = 0; in qlt_update_vp_map()
7321 if (strcasecmp(qlini_mode, QLA2XXX_INI_MODE_STR_EXCLUSIVE) == 0) in qlt_parse_ini_mode()
7323 else if (strcasecmp(qlini_mode, QLA2XXX_INI_MODE_STR_DISABLED) == 0) in qlt_parse_ini_mode()
7325 else if (strcasecmp(qlini_mode, QLA2XXX_INI_MODE_STR_ENABLED) == 0) in qlt_parse_ini_mode()
7327 else if (strcasecmp(qlini_mode, QLA2XXX_INI_MODE_STR_DUAL) == 0) in qlt_parse_ini_mode()
7343 ql_log(ql_log_fatal, NULL, 0xe06b, in qlt_init()
7349 return 0; in qlt_init()
7353 qla_tgt_mgmt_cmd), 0, NULL); in qlt_init()
7355 ql_log(ql_log_fatal, NULL, 0xd04b, in qlt_init()
7362 0, NULL); in qlt_init()
7365 ql_log(ql_log_fatal, NULL, 0xe06d, in qlt_init()
7374 ql_log(ql_log_fatal, NULL, 0xe06e, in qlt_init()
7380 qla_tgt_wq = alloc_workqueue("qla_tgt_wq", 0, 0); in qlt_init()
7382 ql_log(ql_log_fatal, NULL, 0xe06f, in qlt_init()
7390 return (ql2x_ini_mode == QLA2XXX_INI_MODE_DISABLED) ? 1 : 0; in qlt_init()