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()
231 ql_dbg(ql_dbg_async, vha, 0x502c, in qlt_queue_unknown_atio()
255 qlt_send_term_exchange(vha->hw->base_qpair, NULL, atio, ha_locked, 0); in qlt_queue_unknown_atio()
266 uint8_t queued = 0; in qlt_try_to_dequeue_unknown_atios()
270 ql_dbg(ql_dbg_async, vha, 0x502e, in qlt_try_to_dequeue_unknown_atios()
274 &u->atio, ha_locked, 0); in qlt_try_to_dequeue_unknown_atios()
280 ql_dbg(ql_dbg_async + ql_dbg_verbose, vha, 0x502f, in qlt_try_to_dequeue_unknown_atios()
284 ql_dbg(ql_dbg_async + ql_dbg_verbose, vha, 0x503a, in qlt_try_to_dequeue_unknown_atios()
288 &u->atio, ha_locked, 0); in qlt_try_to_dequeue_unknown_atios()
290 ql_dbg(ql_dbg_async + ql_dbg_verbose, vha, 0x503d, in qlt_try_to_dequeue_unknown_atios()
313 qlt_try_to_dequeue_unknown_atios(vha, 0); in qlt_unknown_atio_work_fn()
319 ql_dbg(ql_dbg_tgt, vha, 0xe072, in qlt_24xx_atio_pkt_all_vps()
330 ql_dbg(ql_dbg_tgt, vha, 0xe03e, in qlt_24xx_atio_pkt_all_vps()
356 if ((entry->u.isp24.vp_index != 0xFF) && in qlt_24xx_atio_pkt_all_vps()
357 (entry->u.isp24.nport_handle != cpu_to_le16(0xFFFF))) { in qlt_24xx_atio_pkt_all_vps()
361 ql_dbg(ql_dbg_tgt, vha, 0xe03f, in qlt_24xx_atio_pkt_all_vps()
387 ql_dbg(ql_dbg_tgt, vha, 0xe00a, in qlt_24xx_atio_pkt_all_vps()
404 ql_dbg(ql_dbg_tgt, vha, 0xe040, in qlt_24xx_atio_pkt_all_vps()
418 ql_dbg(ql_dbg_tgt, vha, 0xe073, in qlt_response_pkt_all_vps()
428 ql_dbg(ql_dbg_tgt, vha, 0xe041, in qlt_response_pkt_all_vps()
446 ql_dbg(ql_dbg_tgt, vha, 0xe042, in qlt_response_pkt_all_vps()
461 if (0xFF != entry->u.isp24.vp_index) { in qlt_response_pkt_all_vps()
465 ql_dbg(ql_dbg_tgt, vha, 0xe043, in qlt_response_pkt_all_vps()
485 ql_dbg(ql_dbg_tgt, vha, 0xe044, in qlt_response_pkt_all_vps()
502 ql_dbg(ql_dbg_tgt, vha, 0xe045, in qlt_response_pkt_all_vps()
541 ql_dbg(ql_dbg_disc, vha, 0x20f2, in qla2x00_async_nack_sp_done()
555 sp->fcport->send_els_logo = 0; in qla2x00_async_nack_sp_done()
558 ql_dbg(ql_dbg_edif, vha, 0x20ef, in qla2x00_async_nack_sp_done()
566 0, sp->fcport); in qla2x00_async_nack_sp_done()
572 sp->fcport->deleted = 0; in qla2x00_async_nack_sp_done()
573 sp->fcport->send_els_logo = 0; in qla2x00_async_nack_sp_done()
584 sp->fcport->login_retry = 0; in qla2x00_async_nack_sp_done()
587 sp->fcport->deleted = 0; in qla2x00_async_nack_sp_done()
621 fcport->deleted = 0; in qla24xx_async_notify_ack()
641 ql_dbg(ql_dbg_disc, vha, 0x20f4, in qla24xx_async_notify_ack()
668 t = qlt_create_sess(vha, e->u.nack.fcport, 0); in qla24xx_do_nack_work()
671 ql_log(ql_log_info, vha, 0xd034, in qla24xx_do_nack_work()
739 ql_dbg(ql_dbg_disc, vha, 0x2107, in qlt_fc_port_added()
746 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf04c, in qlt_fc_port_added()
751 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf007, in qlt_fc_port_added()
760 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf04d, in qlt_fc_port_added()
764 sess->local = 0; in qlt_fc_port_added()
786 ql_dbg(ql_dbg_disc + ql_dbg_verbose, vha, 0x210d, in qlt_plogi_ack_find_add()
798 ql_dbg(ql_dbg_async, vha, 0x5088, in qlt_plogi_ack_find_add()
825 ql_dbg(ql_dbg_disc, vha, 0x5089, in qlt_plogi_ack_unref()
829 iocb->u.isp24.port_id[0], in qlt_plogi_ack_unref()
835 port_id.b.al_pa = iocb->u.isp24.port_id[0]; in qlt_plogi_ack_unref()
836 port_id.b.rsvd_1 = 0; in qlt_plogi_ack_unref()
866 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf097, in qlt_plogi_ack_link()
871 iocb->u.isp24.port_id[1], iocb->u.isp24.port_id[0], in qlt_plogi_ack_link()
900 * triggered by a command, otherwise, to 0
915 res = 0; in qlt_send_first_logo()
940 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf098, in qlt_send_first_logo()
959 ql_dbg(ql_dbg_disc, vha, 0xf084, in qlt_free_session_done()
968 qla2x00_mark_device_lost(vha, sess, 0); in qlt_free_session_done()
974 logo.cmd_count = 0; in qlt_free_session_done()
978 sess->send_els_logo = 0; in qlt_free_session_done()
986 sess->logout_completed = 0; in qlt_free_session_done()
990 ql_log(ql_log_warn, vha, 0xf085, in qlt_free_session_done()
1000 ql_log(ql_log_warn, vha, 0xf085, in qlt_free_session_done()
1016 sess->edif.authok = 0; in qlt_free_session_done()
1018 ql_dbg(ql_dbg_edif, vha, 0x911e, in qlt_free_session_done()
1023 ql_dbg(ql_dbg_edif, vha, 0x911e, in qlt_free_session_done()
1041 u16 cnt = 0; in qlt_free_session_done()
1045 ql_dbg(ql_dbg_disc, vha, 0xf086, in qlt_free_session_done()
1061 ql_dbg(ql_dbg_disc, vha, 0xf087, in qlt_free_session_done()
1067 qla2x00_eh_wait_for_pending_commands(sess->vha, sess->d_id.b24, 0, WAIT_TARGET)) { in qlt_free_session_done()
1068 ql_log(ql_log_warn, vha, 0x3027, in qlt_free_session_done()
1076 sess->logo_ack_needed = 0; in qlt_free_session_done()
1093 sess->login_succ = 0; in qlt_free_session_done()
1099 sess->conflict->login_pause = 0; in qlt_free_session_done()
1114 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf099, in qlt_free_session_done()
1124 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf09a, in qlt_free_session_done()
1139 sess->explicit_logout = 0; in qlt_free_session_done()
1147 sess->free_pending = 0; in qlt_free_session_done()
1150 ql_dbg(ql_dbg_disc, vha, 0xf001, in qlt_free_session_done()
1154 if (tgt && (tgt->sess_count == 0)) in qlt_free_session_done()
1173 if (vha->fcport_count == 0) in qlt_free_session_done()
1183 ql_dbg(ql_dbg_disc, sess->vha, 0x210a, in qlt_unreg_sess()
1217 int res = 0; in qlt_reset()
1222 if (loop_id == 0xFFFF) { in qlt_reset()
1234 ql_dbg(ql_dbg_tgt, vha, 0xe000, in qlt_reset()
1241 ql_dbg(ql_dbg_tgt, vha, 0xe047, in qlt_reset()
1246 return qlt_issue_task_mgmt(sess, 0, mcmd, iocb, QLA24XX_MGMT_SEND_NACK); in qlt_reset()
1252 sess->logout_on_delete = 0; in qla24xx_chk_fcp_state()
1253 sess->logo_ack_needed = 0; in qla24xx_chk_fcp_state()
1270 if (tgt && tgt->tgt_stop && tgt->sess_count == 0) in qlt_schedule_sess_for_deletion()
1273 if (sess->vha->fcport_count == 0) in qlt_schedule_sess_for_deletion()
1288 ql_dbg(ql_dbg_disc, sess->vha, 0xffff, in qlt_schedule_sess_for_deletion()
1305 sess->prli_pend_timer = 0; in qlt_schedule_sess_for_deletion()
1310 ql_dbg(ql_log_warn, sess->vha, 0xe001, in qlt_schedule_sess_for_deletion()
1342 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf044, in qla24xx_get_loop_id()
1351 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf045, in qla24xx_get_loop_id()
1360 for (i = 0; i < entries; i++) { in qla24xx_get_loop_id()
1365 res = 0; in qla24xx_get_loop_id()
1395 ql_dbg(ql_dbg_disc, vha, 0x20f6, in qlt_create_sess()
1412 sess->keep_nport_handle = 0; in qlt_create_sess()
1413 sess->logout_completed = 0; in qlt_create_sess()
1416 &fcport->port_name[0], sess) < 0) { in qlt_create_sess()
1417 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf015, in qlt_create_sess()
1428 ql_dbg(ql_dbg_disc, vha, 0x20f7, in qlt_create_sess()
1442 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf006, in qlt_create_sess()
1447 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf04b, in qlt_create_sess()
1484 if (max_gen - sess->generation < 0) { in qlt_fc_port_deleted()
1486 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf092, in qlt_fc_port_deleted()
1494 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf008, "qla_tgt_fc_port_deleted %p", sess); in qlt_fc_port_deleted()
1511 ql_dbg(ql_dbg_tgt, tgt->vha, 0xe002, in test_tgt_sess_count()
1514 res = (tgt->sess_count == 0); in test_tgt_sess_count()
1531 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf04e, in qlt_stop_phase1()
1538 ql_dbg(ql_dbg_tgt_mgt, vha, 0xe003, "Stopping target for host %ld(%p)\n", in qlt_stop_phase1()
1550 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf009, in qlt_stop_phase1()
1560 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf00a, in qlt_stop_phase1()
1574 return 0; in qlt_stop_phase1()
1584 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf04f, in qlt_stop_phase2()
1590 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf00b, in qlt_stop_phase2()
1598 tgt->tgt_stop = 0; in qlt_stop_phase2()
1603 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf00c, "Stop of tgt %p finished\n", in qlt_stop_phase2()
1622 u64 key = 0; in qlt_release()
1633 for (i = 0; i < vha->hw->max_qpairs + 1; i++) { in qlt_release()
1662 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf00d, in qlt_release()
1677 ql_dbg(ql_dbg_tgt_mgt, tgt->vha, 0xf050, in qlt_sched_sess_work()
1679 "work, command will be refused", 0); in qlt_sched_sess_work()
1683 ql_dbg(ql_dbg_tgt_mgt, tgt->vha, 0xf00e, in qlt_sched_sess_work()
1697 return 0; in qlt_sched_sess_work()
1716 ql_dbg(ql_dbg_tgt, vha, 0xe004, "Sending NOTIFY_ACK (ha=%p)\n", ha); in qlt_send_notify_ack()
1720 ql_dbg(ql_dbg_tgt, vha, 0xe049, in qlt_send_notify_ack()
1759 ql_dbg(ql_dbg_tgt, vha, 0xe005, in qlt_send_notify_ack()
1780 ql_dbg(ql_dbg_tgt, vha, 0xe006, in qlt_build_abts_resp_iocb()
1786 ql_dbg(ql_dbg_tgt, vha, 0xe04a, in qlt_build_abts_resp_iocb()
1793 memset(resp, 0, sizeof(*resp)); in qlt_build_abts_resp_iocb()
1819 resp->fcp_hdr_le.f_ctl[0] = *p++; in qlt_build_abts_resp_iocb()
1830 resp->payload.ba_acct.low_seq_cnt = 0x0000; in qlt_build_abts_resp_iocb()
1831 resp->payload.ba_acct.high_seq_cnt = cpu_to_le16(0xFFFF); in qlt_build_abts_resp_iocb()
1866 ql_dbg(ql_dbg_tgt, vha, 0xe006, in qlt_24xx_send_abts_resp()
1873 ql_dbg(ql_dbg_tgt, vha, 0xe04a, in qlt_24xx_send_abts_resp()
1891 resp->fcp_hdr_le.f_ctl[0] = *p++; in qlt_24xx_send_abts_resp()
1905 resp->payload.ba_acct.low_seq_cnt = 0x0000; in qlt_24xx_send_abts_resp()
1906 resp->payload.ba_acct.high_seq_cnt = cpu_to_le16(0xFFFF); in qlt_24xx_send_abts_resp()
1938 ql_dbg(ql_dbg_tgt, vha, 0xe04b, in qlt_24xx_retry_term_exchange()
1971 tmp |= (0x4 << 9); in qlt_24xx_retry_term_exchange()
1976 tmp |= (0x4 << 9); in qlt_24xx_retry_term_exchange()
1981 ql_dbg(ql_dbg_tgt, vha, 0xe007, in qlt_24xx_retry_term_exchange()
1985 (mcmd && mcmd->flags & QLA24XX_MGMT_ABORT_IO_ATTR_VALID) ? 1 : 0); in qlt_24xx_retry_term_exchange()
2049 h = &tgt->qphints[0]; in qlt_find_qphint()
2051 h = &tgt->qphints[0]; in qlt_find_qphint()
2071 tag = 0; in qlt_do_tmr_work()
2078 if (rc != 0) { in qlt_do_tmr_work()
2098 &mcmd->orig_iocb.imm_ntfy, 0, 0, 0, 0, 0, 0); in qlt_do_tmr_work()
2103 ql_dbg(ql_dbg_tgt_mgt, mcmd->vha, 0xf052, in qlt_do_tmr_work()
2116 struct qla_qpair_hint *h = &vha->vha_tgt.qla_tgt->qphints[0]; in __qlt_24xx_handle_abts()
2119 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf00f, in __qlt_24xx_handle_abts()
2125 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf051, in __qlt_24xx_handle_abts()
2130 memset(mcmd, 0, sizeof(*mcmd)); in __qlt_24xx_handle_abts()
2163 return 0; in __qlt_24xx_handle_abts()
2180 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf053, in qlt_24xx_handle_abts()
2189 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf010, in qlt_24xx_handle_abts()
2197 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf011, in qlt_24xx_handle_abts()
2208 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf012, in qlt_24xx_handle_abts()
2227 if (rc != 0) { in qlt_24xx_handle_abts()
2228 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf054, in qlt_24xx_handle_abts()
2248 ql_dbg(ql_dbg_tgt, ha, 0xe008, in qlt_24xx_send_task_mgmt_ctio()
2255 ql_dbg(ql_dbg_tgt, ha, 0xe04c, in qlt_24xx_send_task_mgmt_ctio()
2277 ctio->u.status1.sense_data[0] = resp_code; in qlt_24xx_send_task_mgmt_ctio()
2305 ql_dbg(ql_dbg_tgt_dif, vha, 0x3066, in qlt_send_resp_ctio()
2312 ql_dbg(ql_dbg_async, vha, 0x3067, in qlt_send_resp_ctio()
2336 if (ctio->u.status1.residual != 0) in qlt_send_resp_ctio()
2341 ctio->u.status1.sense_data[0] = 0x70; in qlt_send_resp_ctio()
2344 ctio->u.status1.sense_data[7] = 0xa; in qlt_send_resp_ctio()
2370 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf013, in qlt_xmit_tm_rsp()
2381 ql_dbg(ql_dbg_async, vha, 0xe100, in qlt_xmit_tm_rsp()
2395 ql_dbg(ql_dbg_disc, vha, 0x2106, in qlt_xmit_tm_rsp()
2403 &mcmd->orig_iocb.imm_ntfy, 0, 0, 0, 0, 0, 0); in qlt_xmit_tm_rsp()
2434 BUG_ON(cmd->sg_cnt == 0); in qlt_pci_map_calc_cnt()
2439 if (unlikely(prm->seg_cnt == 0)) in qlt_pci_map_calc_cnt()
2467 if (unlikely(prm->prot_seg_cnt == 0)) in qlt_pci_map_calc_cnt()
2481 return 0; in qlt_pci_map_calc_cnt()
2484 ql_dbg_qp(ql_dbg_tgt, prm->cmd->qpair, 0xe04d, in qlt_pci_map_calc_cnt()
2486 0, prm->cmd->sg_cnt); in qlt_pci_map_calc_cnt()
2502 cmd->sg_mapped = 0; in qlt_unmap_sg()
2538 return 0; in qlt_check_reserve_free_req()
2549 req->ring_index = 0; in qlt_get_req_pkt()
2562 uint8_t found = 0; in qlt_make_handle()
2584 ql_dbg(ql_dbg_io, qpair->vha, 0x305b, in qlt_make_handle()
2605 memset(pkt, 0, sizeof(*pkt)); in qlt_24xx_build_ctio_pkt()
2643 return 0; in qlt_24xx_build_ctio_pkt()
2656 while (prm->seg_cnt > 0) { in qlt_load_cont_data_segments()
2668 memset(cont_pkt64, 0, sizeof(*cont_pkt64)); in qlt_load_cont_data_segments()
2671 cont_pkt64->sys_define = 0; in qlt_load_cont_data_segments()
2677 for (cnt = 0; in qlt_load_cont_data_segments()
2705 if (prm->seg_cnt == 0) { in qlt_load_data_segments()
2707 cur_dsd->address = 0; in qlt_load_data_segments()
2708 cur_dsd->length = 0; in qlt_load_data_segments()
2715 for (cnt = 0; in qlt_load_data_segments()
2727 return cmd->bufflen > 0; in qlt_has_data()
2735 /* asc 0x10=dif error */ in qlt_print_dif_err()
2736 if (prm->sense_buffer && (prm->sense_buffer[12] == 0x10)) { in qlt_print_dif_err()
2742 ql_dbg(ql_dbg_tgt_dif, vha, 0xe00b, in qlt_print_dif_err()
2743 "BE detected Guard TAG ERR: lba[0x%llx|%lld] len[0x%x] " in qlt_print_dif_err()
2749 ql_dbg(ql_dbg_tgt_dif, vha, 0xe00c, in qlt_print_dif_err()
2750 "BE detected APP TAG ERR: lba[0x%llx|%lld] len[0x%x] " in qlt_print_dif_err()
2756 ql_dbg(ql_dbg_tgt_dif, vha, 0xe00f, in qlt_print_dif_err()
2757 "BE detected REF TAG ERR: lba[0x%llx|%lld] len[0x%x] " in qlt_print_dif_err()
2763 ql_dbg(ql_dbg_tgt_dif, vha, 0xe010, in qlt_print_dif_err()
2770 ql_dump_buffer(ql_dbg_tgt_dif, vha, 0xe011, cmd->cdb, 16); in qlt_print_dif_err()
2788 prm->sense_buffer = &cmd->sense_buffer[0]; in qlt_pre_xmit_response()
2793 prm->residual = 0; in qlt_pre_xmit_response()
2794 prm->add_status_pkt = 0; in qlt_pre_xmit_response()
2796 prm->prot_seg_cnt = 0; in qlt_pre_xmit_response()
2797 prm->tot_dsds = 0; in qlt_pre_xmit_response()
2800 if (qlt_pci_map_calc_cnt(prm) != 0) in qlt_pre_xmit_response()
2808 ql_dbg_qp(ql_dbg_io + ql_dbg_verbose, qpair, 0x305c, in qlt_pre_xmit_response()
2811 se_cmd->t_task_cdb ? se_cmd->t_task_cdb[0] : 0, in qlt_pre_xmit_response()
2816 ql_dbg_qp(ql_dbg_io, qpair, 0x305d, in qlt_pre_xmit_response()
2819 se_cmd->t_task_cdb[0] : 0, cmd->bufflen, prm->rq_result); in qlt_pre_xmit_response()
2831 (prm->rq_result != 0))) { in qlt_pre_xmit_response()
2838 return 0; in qlt_pre_xmit_response()
2845 return 0; in qlt_need_explicit_conf()
2860 if (qlt_need_explicit_conf(prm->cmd, 0)) { in qlt_24xx_init_ctio_to_isp()
2871 if ((prm->rq_result & SS_SCSI_STATUS_BYTE) != 0) { in qlt_24xx_init_ctio_to_isp()
2872 ql_dbg_qp(ql_dbg_tgt, prm->cmd->qpair, 0xe017, in qlt_24xx_init_ctio_to_isp()
2891 for (i = 0; i < prm->sense_buffer_len/4; i++) { in qlt_24xx_init_ctio_to_isp()
2906 ctio->u.status1.sense_length = 0; in qlt_24xx_init_ctio_to_isp()
2907 memset(ctio->u.status1.sense_data, 0, in qlt_24xx_init_ctio_to_isp()
2934 return 0; in qlt_hba_err_chk_enabled()
2949 return 0; in qla_tgt_ref_mask_check()
2951 return 0; in qla_tgt_ref_mask_check()
2962 uint32_t lba = 0xffffffff & se_cmd->t_task_lba; in qla_tgt_set_dif_tags()
2965 uint32_t t32 = 0; in qla_tgt_set_dif_tags()
2972 ctx->app_tag = 0; in qla_tgt_set_dif_tags()
2973 ctx->app_tag_mask[0] = 0x0; in qla_tgt_set_dif_tags()
2974 ctx->app_tag_mask[1] = 0x0; in qla_tgt_set_dif_tags()
2995 ctx->ref_tag_mask[0] = 0xff; in qla_tgt_set_dif_tags()
2996 ctx->ref_tag_mask[1] = 0xff; in qla_tgt_set_dif_tags()
2997 ctx->ref_tag_mask[2] = 0xff; in qla_tgt_set_dif_tags()
2998 ctx->ref_tag_mask[3] = 0xff; in qla_tgt_set_dif_tags()
3012 ctx->ref_tag_mask[0] = 0xff; in qla_tgt_set_dif_tags()
3013 ctx->ref_tag_mask[1] = 0xff; in qla_tgt_set_dif_tags()
3014 ctx->ref_tag_mask[2] = 0xff; in qla_tgt_set_dif_tags()
3015 ctx->ref_tag_mask[3] = 0xff; in qla_tgt_set_dif_tags()
3029 ctx->ref_tag_mask[0] = 0xff; in qla_tgt_set_dif_tags()
3030 ctx->ref_tag_mask[1] = 0xff; in qla_tgt_set_dif_tags()
3031 ctx->ref_tag_mask[2] = 0xff; in qla_tgt_set_dif_tags()
3032 ctx->ref_tag_mask[3] = 0xff; in qla_tgt_set_dif_tags()
3037 ctx->ref_tag_mask[0] = ctx->ref_tag_mask[1] = in qla_tgt_set_dif_tags()
3038 ctx->ref_tag_mask[2] = ctx->ref_tag_mask[3] = 0x00; in qla_tgt_set_dif_tags()
3047 uint32_t transfer_length = 0; in qlt_build_ctio_crc2_pkt()
3055 uint16_t fw_prot_opts = 0; in qlt_build_ctio_crc2_pkt()
3068 memset(pkt, 0, sizeof(*pkt)); in qlt_build_ctio_crc2_pkt()
3070 ql_dbg_qp(ql_dbg_tgt, cmd->qpair, 0xe071, in qlt_build_ctio_crc2_pkt()
3071 "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()
3077 bundling = 0; in qlt_build_ctio_crc2_pkt()
3102 fw_prot_opts |= 0x10; /* Disable Guard tag checking */ in qlt_build_ctio_crc2_pkt()
3194 cur_dsd = &crc_ctx_pkt->u.nobundling.data_dsd[0]; in qlt_build_ctio_crc2_pkt()
3204 cur_dsd = &crc_ctx_pkt->u.bundling.data_dsd[0]; in qlt_build_ctio_crc2_pkt()
3211 crc_ctx_pkt->guard_seed = cpu_to_le16(0); in qlt_build_ctio_crc2_pkt()
3213 memset((uint8_t *)&tc, 0 , sizeof(tc)); in qlt_build_ctio_crc2_pkt()
3262 uint32_t full_req_cnt = 0; in qlt_xmit_response()
3263 unsigned long flags = 0; in qlt_xmit_response()
3269 return 0; in qlt_xmit_response()
3272 ql_dbg_qp(ql_dbg_tgt, qpair, 0xe018, in qlt_xmit_response()
3275 1 : 0, cmd->bufflen, cmd->sg_cnt, cmd->dma_data_direction, in qlt_xmit_response()
3280 if (unlikely(res != 0)) { in qlt_xmit_response()
3297 ql_dbg_qp(ql_dbg_async, qpair, 0xe101, in qlt_xmit_response()
3301 res = 0; in qlt_xmit_response()
3314 if (unlikely(res != 0)) { in qlt_xmit_response()
3329 if (prm.add_status_pkt == 0) { in qlt_xmit_response()
3339 if (qlt_need_explicit_conf(cmd, 0)) { in qlt_xmit_response()
3357 ql_dbg_qp(ql_dbg_tgt, qpair, 0x305e, in qlt_xmit_response()
3358 "Building additional status packet 0x%p.\n", in qlt_xmit_response()
3369 ctio->dseg_count = 0; in qlt_xmit_response()
3401 return 0; in qlt_xmit_response()
3417 unsigned long flags = 0; in qlt_rdy_to_xfer()
3418 int res = 0; in qlt_rdy_to_xfer()
3421 memset(&prm, 0, sizeof(prm)); in qlt_rdy_to_xfer()
3434 cmd->write_data_transferred = 0; in qlt_rdy_to_xfer()
3437 ql_dbg_qp(ql_dbg_async, qpair, 0xe102, in qlt_rdy_to_xfer()
3441 return 0; in qlt_rdy_to_xfer()
3445 if (qlt_pci_map_calc_cnt(&prm) != 0) in qlt_rdy_to_xfer()
3451 if (res != 0) in qlt_rdy_to_xfer()
3458 if (unlikely(res != 0)) { in qlt_rdy_to_xfer()
3500 uint8_t *ap = &sts->actual_dif[0]; in qlt_handle_dif_error()
3501 uint8_t *ep = &sts->expected_dif[0]; in qlt_handle_dif_error()
3509 cmd->a_guard = get_unaligned_be16(ap + 0); in qlt_handle_dif_error()
3513 cmd->e_guard = get_unaligned_be16(ep + 0); in qlt_handle_dif_error()
3517 ql_dbg(ql_dbg_tgt_dif, vha, 0xf075, in qlt_handle_dif_error()
3520 scsi_status = sense_key = asc = ascq = 0; in qlt_handle_dif_error()
3524 ql_dbg(ql_dbg_tgt_dif, vha, 0xe00d, in qlt_handle_dif_error()
3526 cmd->cdb[0], lba, (lba+cmd->num_blks), cmd->num_blks, in qlt_handle_dif_error()
3534 asc = 0x10; in qlt_handle_dif_error()
3535 ascq = 0x2; in qlt_handle_dif_error()
3540 ql_dbg(ql_dbg_tgt_dif, vha, 0xe00e, in qlt_handle_dif_error()
3542 cmd->cdb[0], lba, (lba+cmd->num_blks), cmd->num_blks, in qlt_handle_dif_error()
3550 asc = 0x10; in qlt_handle_dif_error()
3551 ascq = 0x3; in qlt_handle_dif_error()
3557 ql_dbg(ql_dbg_tgt_dif, vha, 0xe012, in qlt_handle_dif_error()
3559 cmd->cdb[0], lba, (lba+cmd->num_blks), cmd->num_blks, in qlt_handle_dif_error()
3567 asc = 0x10; in qlt_handle_dif_error()
3568 ascq = 0x1; in qlt_handle_dif_error()
3604 int ret = 0; in __qlt_send_term_imm_notif()
3606 ql_dbg(ql_dbg_tgt_tmr, vha, 0xe01c, in __qlt_send_term_imm_notif()
3611 ql_dbg(ql_dbg_tgt, vha, 0xe080, in __qlt_send_term_imm_notif()
3669 int ret = 0; in __qlt_send_term_exchange()
3672 ql_dbg(ql_dbg_tgt, vha, 0xe009, "Sending TERM EXCH CTIO (ha=%p)\n", ha); in __qlt_send_term_exchange()
3679 ql_dbg(ql_dbg_tgt, vha, 0xe050, in __qlt_send_term_exchange()
3687 ql_dbg(ql_dbg_tgt, vha, 0xe051, in __qlt_send_term_exchange()
3726 unsigned long flags = 0; in qlt_send_term_exchange()
3738 qlt_alloc_qfull_cmd(vha, atio, 0, 0); in qlt_send_term_exchange()
3744 qlt_alloc_qfull_cmd(vha, atio, 0, 0); in qlt_send_term_exchange()
3781 vha->hw->tgt.num_qfull_cmds_dropped = 0; in qlt_init_term_exchange()
3793 ql_dbg(ql_dbg_tgt, vha, 0xe079, in qlt_chk_exch_leak_thresh_hold()
3813 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf014, in qlt_abort_cmd()
3829 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf016, in qlt_abort_cmd()
3839 qlt_send_term_exchange(cmd->qpair, cmd, &cmd->atio, 0, 1); in qlt_abort_cmd()
3840 return 0; in qlt_abort_cmd()
3848 ql_dbg(ql_dbg_tgt, cmd->vha, 0xe074, in qlt_free_cmd()
3876 int term = 0; in qlt_term_ctio_exchange()
3880 ql_dbg(ql_dbg_tgt_dif, vha, 0xe013, in qlt_term_ctio_exchange()
3881 "Term DIF cmd: lba[0x%llx|%lld] len[0x%x] " in qlt_term_ctio_exchange()
3898 qlt_send_term_exchange(qpair, cmd, &cmd->atio, 1, 0); in qlt_term_ctio_exchange()
3919 ql_dbg(ql_dbg_tgt_mgt, vha, 0x1000a, in qlt_ctio_to_cmd()
3931 ql_dbg(ql_dbg_tgt, vha, 0xe052, in qlt_ctio_to_cmd()
3939 ql_dbg(ql_dbg_async, vha, 0xe053, in qlt_ctio_to_cmd()
3947 ql_dbg(ql_dbg_tgt, vha, 0xe054, in qlt_ctio_to_cmd()
3970 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf01d, in qlt_do_ctio_completion()
3988 cmd->cmd_sent_to_fw = 0; in qlt_do_ctio_completion()
3993 switch (status & 0xFFFF) { in qlt_do_ctio_completion()
3999 ((cmd->ctio_flags >> 9) & 0xf), in qlt_do_ctio_completion()
4009 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf058, in qlt_do_ctio_completion()
4021 (status & 0xFFFF) == CTIO_PORT_LOGGED_OUT; in qlt_do_ctio_completion()
4023 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf059, in qlt_do_ctio_completion()
4035 ql_dbg(ql_dbg_disc, vha, 0x20f8, in qlt_do_ctio_completion()
4046 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf073, in qlt_do_ctio_completion()
4048 "received (state %x, ulp_cmd %p) actual_dif[0x%llx] " in qlt_do_ctio_completion()
4049 "expect_dif[0x%llx]\n", in qlt_do_ctio_completion()
4051 *((u64 *)&crc->actual_dif[0]), in qlt_do_ctio_completion()
4052 *((u64 *)&crc->expected_dif[0])); in qlt_do_ctio_completion()
4062 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf05b, in qlt_do_ctio_completion()
4063 "qla_target(%d): CTIO with EDIF error status 0x%x received (state %x, se_cmd %p\n", in qlt_do_ctio_completion()
4068 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf05b, in qlt_do_ctio_completion()
4069 "qla_target(%d): CTIO with error status 0x%x received (state %x, se_cmd %p\n", in qlt_do_ctio_completion()
4101 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf01e, in qlt_do_ctio_completion()
4105 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf05c, in qlt_do_ctio_completion()
4112 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf01f, "Finishing failed CTIO\n"); in qlt_do_ctio_completion()
4141 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf05d, in qlt_get_fcp_task_attr()
4163 int ret, fcp_task_attr, data_dir, bidi = 0; in __qlt_do_work()
4166 cmd->cmd_in_wq = 0; in __qlt_do_work()
4170 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf082, in __qlt_do_work()
4177 cdb = &atio->u.isp24.fcp_cmnd.cdb[0]; in __qlt_do_work()
4197 if (ret != 0) in __qlt_do_work()
4206 ql_dbg(ql_dbg_io, vha, 0x3060, "Terminating work cmd %p", cmd); in __qlt_do_work()
4213 qlt_send_term_exchange(qpair, NULL, &cmd->atio, 1, 0); in __qlt_do_work()
4241 u64 key = 0; in qlt_clr_qp_table()
4243 ql_log(ql_log_info, vha, 0x706c, in qlt_clr_qp_table()
4252 ha->base_qpair->lun_cnt = 0; in qlt_clr_qp_table()
4253 for (key = 0; key < ha->max_qpairs; key++) in qlt_clr_qp_table()
4255 ha->queue_pair_map[key]->lun_cnt = 0; in qlt_clr_qp_table()
4271 int lcnt = 0, rc; in qlt_assign_qpair()
4276 if (qpair->lun_cnt == 0) { in qlt_assign_qpair()
4284 ql_log(ql_log_info, vha, 0xd037, in qlt_assign_qpair()
4296 if (qp->lun_cnt == 0) { in qlt_assign_qpair()
4304 ql_log(ql_log_info, vha, 0xd038, in qlt_assign_qpair()
4326 ql_log(ql_log_info, vha, 0xd039, in qlt_assign_qpair()
4332 h = &tgt->qphints[0]; in qlt_assign_qpair()
4360 cmd->trc_flags = 0; in qlt_get_tag()
4385 ql_dbg(ql_dbg_io, vha, 0x3061, in qlt_handle_cmd_for_atio()
4401 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf002, in qlt_handle_cmd_for_atio()
4411 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf004, in qlt_handle_cmd_for_atio()
4420 ql_dbg(ql_dbg_io, vha, 0x3062, in qlt_handle_cmd_for_atio()
4446 return 0; in qlt_handle_cmd_for_atio()
4457 struct qla_qpair_hint *h = &vha->vha_tgt.qla_tgt->qphints[0]; in qlt_issue_task_mgmt()
4461 ql_dbg(ql_dbg_tgt_tmr, vha, 0x10009, in qlt_issue_task_mgmt()
4467 memset(mcmd, 0, sizeof(*mcmd)); in qlt_issue_task_mgmt()
4507 return 0; in qlt_issue_task_mgmt()
4533 return qlt_issue_task_mgmt(sess, unpacked_lun, fn, iocb, 0); in qlt_handle_task_mgmt()
4548 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf05f, in __qlt_abort_task()
4553 memset(mcmd, 0, sizeof(*mcmd)); in __qlt_abort_task()
4567 if (rc != 0) { in __qlt_abort_task()
4568 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf060, in __qlt_abort_task()
4575 return 0; in __qlt_abort_task()
4594 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf025, in qlt_abort_task()
4607 ql_dbg(ql_dbg_tgt_mgt, fcport->vha, 0xf093, in qlt_logo_completion_handler()
4651 ql_dbg(ql_dbg_disc, vha, 0x1000c, in qlt_find_sess_invalidate_other()
4667 ql_dbg(ql_dbg_disc, vha, 0xf01b, in qlt_find_sess_invalidate_other()
4682 ql_dbg(ql_dbg_disc, vha, 0x1000d, in qlt_find_sess_invalidate_other()
4701 int count = 0; in abort_cmds_for_s_id()
4738 int res = 0; in qlt_handle_login()
4748 port_id.b.al_pa = iocb->u.isp24.port_id[0]; in qlt_handle_login()
4749 port_id.b.rsvd_1 = 0; in qlt_handle_login()
4762 ql_dbg(ql_dbg_disc, vha, 0xffff, in qlt_handle_login()
4763 "%s %d Term INOT due to WWN=0 lid=%d, NportID %06X ", in qlt_handle_login()
4778 ql_dbg(ql_dbg_disc, vha, 0xffff, in qlt_handle_login()
4787 ql_dbg(ql_dbg_disc, vha, 0xffff, in qlt_handle_login()
4794 ql_dbg(ql_dbg_disc, vha, 0xffff, in qlt_handle_login()
4804 ql_dbg(ql_dbg_disc + ql_dbg_verbose, vha, 0xffff, in qlt_handle_login()
4820 ql_dbg(ql_dbg_disc, vha, 0xffff, in qlt_handle_login()
4827 pla, 0); in qlt_handle_login()
4831 pla, 0); in qlt_handle_login()
4850 ql_dbg(ql_dbg_disc, vha, 0xffff, in qlt_handle_login()
4874 ql_dbg(ql_dbg_disc, vha, 0xffff, in qlt_handle_login()
4884 sess->local = 0; in qlt_handle_login()
4893 if ((wd3_lo & BIT_4) == 0) in qlt_handle_login()
4902 ql_dbg(ql_dbg_disc, vha, 0x20f9, in qlt_handle_login()
4934 ql_dbg(ql_dbg_disc, vha, 0x20f9, in qlt_handle_login()
4959 int res = 0; in qlt_24xx_handle_els()
4968 port_id.b.al_pa = iocb->u.isp24.port_id[0]; in qlt_24xx_handle_els()
4969 port_id.b.rsvd_1 = 0; in qlt_24xx_handle_els()
4973 ql_dbg(ql_dbg_disc, vha, 0xf026, in qlt_24xx_handle_els()
4974 "qla_target(%d): Port ID: %02x:%02x:%02x ELS opcode: 0x%02x lid %d %8phC\n", in qlt_24xx_handle_els()
4976 iocb->u.isp24.port_id[1], iocb->u.isp24.port_id[0], in qlt_24xx_handle_els()
4981 * res = 0 means ack async/later. in qlt_24xx_handle_els()
4996 ql_dbg(ql_dbg_disc, vha, 0xffff, in qlt_24xx_handle_els()
5004 ql_dbg(ql_dbg_disc, vha, 0xffff, in qlt_24xx_handle_els()
5036 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf09b, in qlt_24xx_handle_els()
5042 res = 0; in qlt_24xx_handle_els()
5054 ql_dbg(ql_dbg_disc, vha, 0xffff, in qlt_24xx_handle_els()
5082 ql_dbg(ql_dbg_disc, sess->vha, 0xffff, in qlt_24xx_handle_els()
5087 return 0; in qlt_24xx_handle_els()
5107 ql_log(ql_log_warn, sess->vha, 0xf095, in qlt_24xx_handle_els()
5111 res = 0; in qlt_24xx_handle_els()
5119 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf096, in qlt_24xx_handle_els()
5123 sess->local = 0; in qlt_24xx_handle_els()
5131 if ((wd3_lo & BIT_4) == 0) in qlt_24xx_handle_els()
5143 ql_dbg(ql_dbg_disc, vha, 0x20fa, in qlt_24xx_handle_els()
5148 res = 0; in qlt_24xx_handle_els()
5156 ql_dbg(ql_dbg_disc, vha, 0x20fb, in qlt_24xx_handle_els()
5161 res = 0; in qlt_24xx_handle_els()
5169 loop_id = 0xFFFF; in qlt_24xx_handle_els()
5190 ql_dbg(ql_dbg_disc, vha, 0x20fc, in qlt_24xx_handle_els()
5193 if (res == 0) { in qlt_24xx_handle_els()
5199 res = 0; in qlt_24xx_handle_els()
5204 res = 0; in qlt_24xx_handle_els()
5216 &tgt->link_reinit_iocb, 0, 0, 0, 0, 0, 0); in qlt_24xx_handle_els()
5217 tgt->link_reinit_iocb_pending = 0; in qlt_24xx_handle_els()
5223 ql_dbg(ql_dbg_disc, vha, 0x20fd, in qlt_24xx_handle_els()
5235 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf061, in qlt_24xx_handle_els()
5242 ql_dbg(ql_dbg_disc, vha, 0xf026, in qlt_24xx_handle_els()
5243 "qla_target(%d): Exit ELS opcode: 0x%02x res %d\n", in qlt_24xx_handle_els()
5257 uint32_t add_flags = 0; in qlt_handle_imm_notify()
5267 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf032, in qlt_handle_imm_notify()
5272 if (qlt_reset(vha, iocb, QLA_TGT_ABORT_ALL) == 0) in qlt_handle_imm_notify()
5273 send_notify_ack = 0; in qlt_handle_imm_notify()
5281 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf033, in qlt_handle_imm_notify()
5288 &tgt->link_reinit_iocb, 0, 0, 0, 0, 0, 0); in qlt_handle_imm_notify()
5296 send_notify_ack = 0; in qlt_handle_imm_notify()
5301 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf034, in qlt_handle_imm_notify()
5307 if (qlt_reset(vha, iocb, QLA_TGT_NEXUS_LOSS_SESS) == 0) in qlt_handle_imm_notify()
5308 send_notify_ack = 0; in qlt_handle_imm_notify()
5313 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf035, in qlt_handle_imm_notify()
5315 if (qlt_reset(vha, iocb, QLA_TGT_NEXUS_LOSS) == 0) in qlt_handle_imm_notify()
5316 send_notify_ack = 0; in qlt_handle_imm_notify()
5321 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf036, in qlt_handle_imm_notify()
5324 if (qlt_reset(vha, iocb, QLA_TGT_ABORT_ALL) == 0) in qlt_handle_imm_notify()
5325 send_notify_ack = 0; in qlt_handle_imm_notify()
5330 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf06a, in qlt_handle_imm_notify()
5334 if (qlt_reset(vha, iocb, QLA_TGT_NEXUS_LOSS) == 0) in qlt_handle_imm_notify()
5335 send_notify_ack = 0; in qlt_handle_imm_notify()
5339 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf06b, in qlt_handle_imm_notify()
5346 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf037, in qlt_handle_imm_notify()
5352 if (qlt_abort_task(vha, iocb) == 0) in qlt_handle_imm_notify()
5353 send_notify_ack = 0; in qlt_handle_imm_notify()
5357 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf06c, in qlt_handle_imm_notify()
5363 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf038, in qlt_handle_imm_notify()
5369 if (qlt_24xx_handle_els(vha, iocb) == 0) in qlt_handle_imm_notify()
5370 send_notify_ack = 0; in qlt_handle_imm_notify()
5373 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf06d, in qlt_handle_imm_notify()
5380 qlt_send_notify_ack(ha->base_qpair, iocb, add_flags, 0, 0, 0, in qlt_handle_imm_notify()
5381 0, 0); in qlt_handle_imm_notify()
5406 qlt_send_term_exchange(qpair, NULL, atio, 1, 0); in __qlt_send_busy()
5407 return 0; in __qlt_send_busy()
5413 ql_dbg(ql_dbg_io, vha, 0x3063, in __qlt_send_busy()
5444 if (ctio24->u.status1.residual != 0) in __qlt_send_busy()
5453 return 0; in __qlt_send_busy()
5472 ql_dbg(ql_dbg_io, vha, 0x300a, in qlt_alloc_qfull_cmd()
5484 ql_dbg(ql_dbg_io, vha, 0x3068, in qlt_alloc_qfull_cmd()
5500 ql_dbg(ql_dbg_io, vha, 0x3009, in qlt_alloc_qfull_cmd()
5550 int rc = 0; in qlt_free_qfull_cmds()
5553 return 0; in qlt_free_qfull_cmds()
5561 return 0; in qlt_free_qfull_cmds()
5579 ql_dbg(ql_dbg_io, vha, 0x3006, in qlt_free_qfull_cmds()
5583 ql_dbg(ql_dbg_io, vha, 0x3007, in qlt_free_qfull_cmds()
5587 ql_dbg(ql_dbg_io, vha, 0x3008, in qlt_free_qfull_cmds()
5621 int rc = 0; in qlt_send_busy()
5637 return 0; in qlt_chk_qfull_thresh_hold()
5656 unsigned long flags = 0; in qlt_24xx_atio_pkt()
5659 ql_dbg(ql_dbg_tgt, vha, 0x3064, in qlt_24xx_atio_pkt()
5674 ql_dbg(ql_dbg_io, vha, 0x3065, in qlt_24xx_atio_pkt()
5687 if (likely(atio->u.isp24.fcp_cmnd.task_mgmt_flags == 0)) { in qlt_24xx_atio_pkt()
5690 if (rc != 0) { in qlt_24xx_atio_pkt()
5698 if (unlikely(rc != 0)) { in qlt_24xx_atio_pkt()
5703 ql_dbg(ql_dbg_tgt, vha, 0xe05f, in qlt_24xx_atio_pkt()
5707 ql_dbg(ql_dbg_tgt, vha, 0xe05f, in qlt_24xx_atio_pkt()
5710 atio, 1, 0); in qlt_24xx_atio_pkt()
5713 ql_dbg(ql_dbg_tgt, vha, 0xe060, in qlt_24xx_atio_pkt()
5720 ql_dbg(ql_dbg_tgt, vha, 0xe060, in qlt_24xx_atio_pkt()
5735 if (unlikely(atio->u.isp2x.entry_status != 0)) { in qlt_24xx_atio_pkt()
5736 ql_dbg(ql_dbg_tgt, vha, 0xe05b, in qlt_24xx_atio_pkt()
5743 ql_dbg(ql_dbg_tgt, vha, 0xe02e, "%s", "IMMED_NOTIFY ATIO"); in qlt_24xx_atio_pkt()
5754 ql_dbg(ql_dbg_tgt, vha, 0xe05c, in qlt_24xx_atio_pkt()
5765 * rc = 0 : send terminate & abts respond
5766 * rc != 0: do not send term & abts respond
5772 int rc = 0; in qlt_chk_unresolv_exchg()
5786 qpair->retry_term_cnt = 0; in qlt_chk_unresolv_exchg()
5787 ql_log(ql_log_warn, vha, 0xffff, in qlt_chk_unresolv_exchg()
5790 vha, 0xffff, (uint8_t *)entry, sizeof(*entry)); in qlt_chk_unresolv_exchg()
5802 qpair->retry_term_cnt = 0; in qlt_chk_unresolv_exchg()
5821 ql_dbg(ql_dbg_async, vha, 0xe064, in qlt_handle_abts_completion()
5831 ql_dbg(ql_dbg_tgt, vha, 0xe038, in qlt_handle_abts_completion()
5836 if (le32_to_cpu(entry->error_subcode1) == 0x1E && in qlt_handle_abts_completion()
5837 le32_to_cpu(entry->error_subcode2) == 0) { in qlt_handle_abts_completion()
5845 ql_dbg(ql_dbg_tgt, vha, 0xe063, in qlt_handle_abts_completion()
5865 ql_dbg(ql_dbg_tgt, vha, 0xe05d, in qlt_response_pkt()
5895 ql_dbg(ql_dbg_tgt, vha, 0xe05e, in qlt_response_pkt()
5903 if (rc != 0) in qlt_response_pkt()
5907 if (unlikely(rc != 0)) { in qlt_response_pkt()
5910 ql_dbg(ql_dbg_tgt, vha, 0xe05f, in qlt_response_pkt()
5914 ql_dbg(ql_dbg_tgt, vha, 0xe05f, in qlt_response_pkt()
5917 atio, 1, 0); in qlt_response_pkt()
5920 ql_dbg(ql_dbg_tgt, vha, 0xe060, in qlt_response_pkt()
5927 ql_dbg(ql_dbg_tgt, vha, 0xe060, in qlt_response_pkt()
5959 ql_dbg(ql_dbg_tgt, vha, 0xe035, "%s", "IMMED_NOTIFY\n"); in qlt_response_pkt()
5964 if (tgt->notify_ack_expected > 0) { in qlt_response_pkt()
5967 ql_dbg(ql_dbg_tgt, vha, 0xe036, in qlt_response_pkt()
5974 ql_dbg(ql_dbg_tgt, vha, 0xe061, in qlt_response_pkt()
5980 ql_dbg(ql_dbg_tgt, vha, 0xe062, in qlt_response_pkt()
5987 ql_dbg(ql_dbg_tgt, vha, 0xe037, in qlt_response_pkt()
5993 if (tgt->abts_resp_expected > 0) { in qlt_response_pkt()
5996 ql_dbg(ql_dbg_tgt, vha, 0xe064, in qlt_response_pkt()
6003 ql_dbg(ql_dbg_tgt, vha, 0xe065, in qlt_response_pkt()
6038 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf03a, in qlt_async_event()
6048 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf03b, in qlt_async_event()
6050 "(m[0]=%x, m[1]=%x, m[2]=%x, m[3]=%x)", vha->vp_idx, in qlt_async_event()
6051 mailbox[0], mailbox[1], mailbox[2], mailbox[3]); in qlt_async_event()
6055 0, 0, 0, 0, 0, 0); in qlt_async_event()
6056 tgt->link_reinit_iocb_pending = 0; in qlt_async_event()
6065 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf03c, in qlt_async_event()
6067 "(m[0]=%x, m[1]=%x, m[2]=%x, m[3]=%x)", vha->vp_idx, code, in qlt_async_event()
6068 mailbox[0], mailbox[1], mailbox[2], mailbox[3]); in qlt_async_event()
6072 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf017, in qlt_async_event()
6073 "qla_target(%d): Async event LS_REJECT occurred (m[0]=%x, m[1]=%x, m[2]=%x, m[3]=%x)", in qlt_async_event()
6075 mailbox[0], mailbox[1], mailbox[2], mailbox[3]); in qlt_async_event()
6081 ql_log(ql_log_warn, vha, 0xd03a, in qlt_async_event()
6084 vha->hw->exch_starvation = 0; in qlt_async_event()
6097 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf03d, in qlt_async_event()
6099 "occurred: updating the ports database (m[0]=%x, m[1]=%x, " in qlt_async_event()
6101 mailbox[0], mailbox[1], mailbox[2], mailbox[3]); in qlt_async_event()
6104 if (login_code == 0x4) { in qlt_async_event()
6105 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf03e, in qlt_async_event()
6107 vha->hw->exch_starvation = 0; in qlt_async_event()
6108 } else if (login_code == 0x7) in qlt_async_event()
6109 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf03f, in qlt_async_event()
6124 u8 newfcport = 0; in qlt_get_port_database()
6128 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf06f, in qlt_get_port_database()
6136 rc = qla24xx_gpdb_wait(vha, fcport, 0); in qlt_get_port_database()
6138 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf070, in qlt_get_port_database()
6141 "(loop_id=0x%04x)", vha->vp_idx, rc, loop_id); in qlt_get_port_database()
6172 fcport->deleted = 0; in qlt_get_port_database()
6182 ql_dbg(ql_dbg_disc, vha, 0x20ff, in qlt_get_port_database()
6207 uint16_t loop_id = 0; in qlt_make_local_sess()
6209 if (s_id.domain == 0xFF && s_id.area == 0xFC) { in qlt_make_local_sess()
6214 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf042, in qlt_make_local_sess()
6227 if (rc != 0) { in qlt_make_local_sess()
6230 ql_log(ql_log_info, vha, 0xf071, in qlt_make_local_sess()
6254 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf043, in qlt_make_local_sess()
6276 unsigned long flags = 0, flags2 = 0; in qlt_abort_work()
6304 ql_dbg(ql_dbg_tgt_tmr, vha, 0xf01c, in qlt_abort_work()
6317 if (rc != 0) in qlt_abort_work()
6337 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf000, "Sess work (tgt %p)", tgt); in qlt_sess_work_fn()
6377 return 0; in qlt_add_target()
6380 ql_log(ql_log_warn, base_vha, 0xe070, in qlt_add_target()
6382 return 0; in qlt_add_target()
6385 ql_dbg(ql_dbg_tgt, base_vha, 0xe03b, in qlt_add_target()
6392 ql_dbg(ql_dbg_tgt, base_vha, 0xe066, in qlt_add_target()
6402 ql_log(ql_log_warn, base_vha, 0x0197, in qlt_add_target()
6413 ql_log(ql_log_info, base_vha, 0x0198, in qlt_add_target()
6417 h = &tgt->qphints[0]; in qlt_add_target()
6423 for (i = 0; i < ha->max_qpairs; i++) { in qlt_add_target()
6445 atomic_set(&tgt->tgt_global_resets_count, 0); in qlt_add_target()
6449 ql_dbg(ql_dbg_tgt, base_vha, 0xe067, in qlt_add_target()
6462 return 0; in qlt_add_target()
6469 return 0; in qlt_remove_target()
6473 return 0; in qlt_remove_target()
6479 ql_dbg(ql_dbg_tgt, vha, 0xe03c, "Unregistering target for host %ld(%p)", in qlt_remove_target()
6483 return 0; in qlt_remove_target()
6489 u32 key = 0; in qla_remove_hostmap()
6558 ql_dbg(ql_dbg_tgt, vha, 0xe068, in qlt_lport_register()
6570 if (rc != 0) in qlt_lport_register()
6655 ql_dbg(ql_dbg_tgt, vha, 0xe069, in qlt_enable_vha()
6667 tgt->tgt_stopped = 0; in qlt_enable_vha()
6672 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf021, in qlt_enable_vha()
6699 ql_dbg(ql_dbg_tgt, vha, 0xe06a, in qlt_disable_vha()
6718 ql_dbg(ql_dbg_tgt, vha, 0xe081, in qlt_disable_vha()
6754 u8 fc4_feature = 0; in qlt_rff_id()
6756 * FC-4 Feature bit 0 indicates target functionality to the name server. in qlt_rff_id()
6775 * Returns 0 on success.
6787 for (cnt = 0; cnt < ha->tgt.atio_q_length; cnt++) { in qlt_init_atio_q_entries()
6819 ql_log(ql_log_warn, vha, 0xd03c, in qlt_24xx_process_atio_queue()
6827 ha_locked, 0); in qlt_24xx_process_atio_queue()
6833 for (i = 0; i < cnt; i++) { in qlt_24xx_process_atio_queue()
6836 ha->tgt.atio_ring_index = 0; in qlt_24xx_process_atio_queue()
6861 wrt_reg_dword(ISP_ATIO_Q_IN(vha), 0); in qlt_24xx_config_rings()
6862 wrt_reg_dword(ISP_ATIO_Q_OUT(vha), 0); in qlt_24xx_config_rings()
6869 ql_dbg(ql_dbg_init, vha, 0xf072, in qlt_24xx_config_rings()
6870 "Registering ICB vector 0x%x for atio que.\n", in qlt_24xx_config_rings()
6876 icb->msix_atio = 0; in qlt_24xx_config_rings()
6878 ql_dbg(ql_dbg_init, vha, 0xf072, in qlt_24xx_config_rings()
6907 nv->exchange_count = cpu_to_le16(0xFFFF); in qlt_24xx_config_nvram_stage1()
7013 nv->exchange_count = cpu_to_le16(0xFFFF); in qlt_81xx_config_nvram_stage1()
7156 qlt_24xx_process_atio_queue(vha, 0); in qla83xx_msix_atio_q()
7177 qlt_24xx_process_atio_queue(vha, 0); in qlt_handle_abts_recv_work()
7216 return 0; in qlt_mem_alloc()
7224 return 0; in qlt_mem_alloc()
7239 ha->tgt.atio_dma = 0; in qlt_mem_free()
7244 if (strcasecmp(qlini_mode, QLA2XXX_INI_MODE_STR_EXCLUSIVE) == 0) in qlt_parse_ini_mode()
7246 else if (strcasecmp(qlini_mode, QLA2XXX_INI_MODE_STR_DISABLED) == 0) in qlt_parse_ini_mode()
7248 else if (strcasecmp(qlini_mode, QLA2XXX_INI_MODE_STR_ENABLED) == 0) in qlt_parse_ini_mode()
7250 else if (strcasecmp(qlini_mode, QLA2XXX_INI_MODE_STR_DUAL) == 0) in qlt_parse_ini_mode()
7266 ql_log(ql_log_fatal, NULL, 0xe06b, in qlt_init()
7272 return 0; in qlt_init()
7276 qla_tgt_mgmt_cmd), 0, NULL); in qlt_init()
7278 ql_log(ql_log_fatal, NULL, 0xd04b, in qlt_init()
7285 0, NULL); in qlt_init()
7288 ql_log(ql_log_fatal, NULL, 0xe06d, in qlt_init()
7297 ql_log(ql_log_fatal, NULL, 0xe06e, in qlt_init()
7303 qla_tgt_wq = alloc_workqueue("qla_tgt_wq", 0, 0); in qlt_init()
7305 ql_log(ql_log_fatal, NULL, 0xe06f, in qlt_init()
7313 return (ql2x_ini_mode == QLA2XXX_INI_MODE_DISABLED) ? 1 : 0; in qlt_init()