Lines Matching +full:0 +full:xf006
37 "Enables Sequence level error recovery (aka FC Tape). Default is 0 - no SLER. 1 - Enable SLER.");
51 static int ql_dm_tgt_ex_pct = 0;
74 FCP_TMF_CMPL = 0,
86 #define FCP_PTA_SIMPLE 0 /* simple task attribute */
92 #define FCP_PRI_RESVD_MASK 0x80 /* reserved bits in priority field */
174 if (unlikely(vha->marker_needed != 0)) { in qlt_issue_marker()
178 ql_dbg(ql_dbg_tgt, vha, 0xe03d, in qlt_issue_marker()
203 ql_dbg(ql_dbg_tgt_mgt + ql_dbg_verbose, vha, 0xf005, in qlt_find_host_by_d_id()
255 ql_dbg(ql_dbg_async, vha, 0x502c, in qlt_queue_unknown_atio()
279 qlt_send_term_exchange(vha->hw->base_qpair, NULL, atio, ha_locked, 0); in qlt_queue_unknown_atio()
290 uint8_t queued = 0; in qlt_try_to_dequeue_unknown_atios()
294 ql_dbg(ql_dbg_async, vha, 0x502e, in qlt_try_to_dequeue_unknown_atios()
298 &u->atio, ha_locked, 0); in qlt_try_to_dequeue_unknown_atios()
304 ql_dbg(ql_dbg_async + ql_dbg_verbose, vha, 0x502f, in qlt_try_to_dequeue_unknown_atios()
308 ql_dbg(ql_dbg_async + ql_dbg_verbose, vha, 0x503a, in qlt_try_to_dequeue_unknown_atios()
312 &u->atio, ha_locked, 0); in qlt_try_to_dequeue_unknown_atios()
314 ql_dbg(ql_dbg_async + ql_dbg_verbose, vha, 0x503d, in qlt_try_to_dequeue_unknown_atios()
337 qlt_try_to_dequeue_unknown_atios(vha, 0); in qlt_unknown_atio_work_fn()
343 ql_dbg(ql_dbg_tgt, vha, 0xe072, in qlt_24xx_atio_pkt_all_vps()
354 ql_dbg(ql_dbg_tgt, vha, 0xe03e, in qlt_24xx_atio_pkt_all_vps()
380 if ((entry->u.isp24.vp_index != 0xFF) && in qlt_24xx_atio_pkt_all_vps()
381 (entry->u.isp24.nport_handle != cpu_to_le16(0xFFFF))) { in qlt_24xx_atio_pkt_all_vps()
385 ql_dbg(ql_dbg_tgt, vha, 0xe03f, in qlt_24xx_atio_pkt_all_vps()
411 ql_dbg(ql_dbg_tgt, vha, 0xe00a, in qlt_24xx_atio_pkt_all_vps()
428 ql_dbg(ql_dbg_tgt, vha, 0xe040, in qlt_24xx_atio_pkt_all_vps()
442 ql_dbg(ql_dbg_tgt, vha, 0xe073, in qlt_response_pkt_all_vps()
452 ql_dbg(ql_dbg_tgt, vha, 0xe041, in qlt_response_pkt_all_vps()
470 ql_dbg(ql_dbg_tgt, vha, 0xe042, in qlt_response_pkt_all_vps()
485 if (0xFF != entry->u.isp24.vp_index) { in qlt_response_pkt_all_vps()
489 ql_dbg(ql_dbg_tgt, vha, 0xe043, in qlt_response_pkt_all_vps()
509 ql_dbg(ql_dbg_tgt, vha, 0xe044, in qlt_response_pkt_all_vps()
526 ql_dbg(ql_dbg_tgt, vha, 0xe045, in qlt_response_pkt_all_vps()
565 ql_dbg(ql_dbg_disc, vha, 0x20f2, in qla2x00_async_nack_sp_done()
579 sp->fcport->send_els_logo = 0; in qla2x00_async_nack_sp_done()
584 sp->fcport->deleted = 0; in qla2x00_async_nack_sp_done()
585 sp->fcport->send_els_logo = 0; in qla2x00_async_nack_sp_done()
596 sp->fcport->login_retry = 0; in qla2x00_async_nack_sp_done()
599 sp->fcport->deleted = 0; in qla2x00_async_nack_sp_done()
630 fcport->deleted = 0; in qla24xx_async_notify_ack()
652 ql_dbg(ql_dbg_disc, vha, 0x20f4, in qla24xx_async_notify_ack()
679 t = qlt_create_sess(vha, e->u.nack.fcport, 0); in qla24xx_do_nack_work()
682 ql_log(ql_log_info, vha, 0xd034, in qla24xx_do_nack_work()
745 ql_dbg(ql_dbg_disc, vha, 0x2107, in qlt_fc_port_added()
752 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf04c, in qlt_fc_port_added()
757 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf007, in qlt_fc_port_added()
766 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf04d, in qlt_fc_port_added()
770 sess->local = 0; in qlt_fc_port_added()
792 ql_dbg(ql_dbg_disc + ql_dbg_verbose, vha, 0x210d, in qlt_plogi_ack_find_add()
804 ql_dbg(ql_dbg_async, vha, 0x5088, in qlt_plogi_ack_find_add()
831 ql_dbg(ql_dbg_disc, vha, 0x5089, in qlt_plogi_ack_unref()
835 iocb->u.isp24.port_id[0], in qlt_plogi_ack_unref()
841 port_id.b.al_pa = iocb->u.isp24.port_id[0]; in qlt_plogi_ack_unref()
842 port_id.b.rsvd_1 = 0; in qlt_plogi_ack_unref()
872 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf097, in qlt_plogi_ack_link()
877 iocb->u.isp24.port_id[1], iocb->u.isp24.port_id[0], in qlt_plogi_ack_link()
906 * triggered by a command, otherwise, to 0
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()
977 sess->send_els_logo = 0; in qlt_free_session_done()
989 ql_log(ql_log_warn, vha, 0xf085, in qlt_free_session_done()
999 ql_log(ql_log_warn, vha, 0xf085, in qlt_free_session_done()
1022 u16 cnt = 0; in qlt_free_session_done()
1026 ql_dbg(ql_dbg_disc, vha, 0xf086, in qlt_free_session_done()
1037 ql_dbg(ql_dbg_disc, vha, 0xf087, in qlt_free_session_done()
1042 sess->logo_ack_needed = 0; in qlt_free_session_done()
1064 sess->login_succ = 0; in qlt_free_session_done()
1070 sess->conflict->login_pause = 0; in qlt_free_session_done()
1085 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf099, in qlt_free_session_done()
1095 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf09a, in qlt_free_session_done()
1110 sess->explicit_logout = 0; in qlt_free_session_done()
1112 sess->free_pending = 0; in qlt_free_session_done()
1116 ql_dbg(ql_dbg_disc, vha, 0xf001, in qlt_free_session_done()
1120 if (tgt && (tgt->sess_count == 0)) in qlt_free_session_done()
1139 if (vha->fcport_count == 0) in qlt_free_session_done()
1149 ql_dbg(ql_dbg_disc, sess->vha, 0x210a, in qlt_unreg_sess()
1183 int res = 0; in qlt_reset()
1188 if (loop_id == 0xFFFF) { in qlt_reset()
1200 ql_dbg(ql_dbg_tgt, vha, 0xe000, in qlt_reset()
1207 ql_dbg(ql_dbg_tgt, vha, 0xe047, in qlt_reset()
1212 return qlt_issue_task_mgmt(sess, 0, mcmd, iocb, QLA24XX_MGMT_SEND_NACK); in qlt_reset()
1218 sess->logout_on_delete = 0; in qla24xx_chk_fcp_state()
1219 sess->logo_ack_needed = 0; in qla24xx_chk_fcp_state()
1236 if (tgt && tgt->tgt_stop && tgt->sess_count == 0) in qlt_schedule_sess_for_deletion()
1239 if (sess->vha->fcport_count == 0) in qlt_schedule_sess_for_deletion()
1254 ql_dbg(ql_dbg_disc, sess->vha, 0xffff, in qlt_schedule_sess_for_deletion()
1271 sess->prli_pend_timer = 0; in qlt_schedule_sess_for_deletion()
1276 ql_dbg(ql_dbg_disc, sess->vha, 0xe001, in qlt_schedule_sess_for_deletion()
1308 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf044, in qla24xx_get_loop_id()
1317 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf045, in qla24xx_get_loop_id()
1326 for (i = 0; i < entries; i++) { in qla24xx_get_loop_id()
1331 res = 0; in qla24xx_get_loop_id()
1361 ql_dbg(ql_dbg_disc, vha, 0x20f6, in qlt_create_sess()
1378 sess->keep_nport_handle = 0; in qlt_create_sess()
1379 sess->logout_completed = 0; in qlt_create_sess()
1382 &fcport->port_name[0], sess) < 0) { in qlt_create_sess()
1383 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf015, in qlt_create_sess()
1394 ql_dbg(ql_dbg_disc, vha, 0x20f7, in qlt_create_sess()
1408 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf006, in qlt_create_sess()
1413 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf04b, in qlt_create_sess()
1450 if (max_gen - sess->generation < 0) { in qlt_fc_port_deleted()
1452 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf092, in qlt_fc_port_deleted()
1460 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf008, "qla_tgt_fc_port_deleted %p", sess); in qlt_fc_port_deleted()
1477 ql_dbg(ql_dbg_tgt, tgt->vha, 0xe002, in test_tgt_sess_count()
1480 res = (tgt->sess_count == 0); in test_tgt_sess_count()
1497 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf04e, in qlt_stop_phase1()
1504 ql_dbg(ql_dbg_tgt_mgt, vha, 0xe003, "Stopping target for host %ld(%p)\n", in qlt_stop_phase1()
1516 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf009, in qlt_stop_phase1()
1526 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf00a, in qlt_stop_phase1()
1540 return 0; in qlt_stop_phase1()
1550 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf04f, in qlt_stop_phase2()
1556 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf00b, in qlt_stop_phase2()
1563 tgt->tgt_stop = 0; in qlt_stop_phase2()
1567 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf00c, "Stop of tgt %p finished\n", in qlt_stop_phase2()
1586 u64 key = 0; in qlt_release()
1597 for (i = 0; i < vha->hw->max_qpairs + 1; i++) { in qlt_release()
1626 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf00d, in qlt_release()
1641 ql_dbg(ql_dbg_tgt_mgt, tgt->vha, 0xf050, in qlt_sched_sess_work()
1643 "work, command will be refused", 0); in qlt_sched_sess_work()
1647 ql_dbg(ql_dbg_tgt_mgt, tgt->vha, 0xf00e, in qlt_sched_sess_work()
1661 return 0; in qlt_sched_sess_work()
1680 ql_dbg(ql_dbg_tgt, vha, 0xe004, "Sending NOTIFY_ACK (ha=%p)\n", ha); in qlt_send_notify_ack()
1684 ql_dbg(ql_dbg_tgt, vha, 0xe049, in qlt_send_notify_ack()
1717 ql_dbg(ql_dbg_tgt, vha, 0xe005, in qlt_send_notify_ack()
1738 ql_dbg(ql_dbg_tgt, vha, 0xe006, in qlt_build_abts_resp_iocb()
1744 ql_dbg(ql_dbg_tgt, vha, 0xe04a, in qlt_build_abts_resp_iocb()
1751 memset(resp, 0, sizeof(*resp)); in qlt_build_abts_resp_iocb()
1777 resp->fcp_hdr_le.f_ctl[0] = *p++; in qlt_build_abts_resp_iocb()
1788 resp->payload.ba_acct.low_seq_cnt = 0x0000; in qlt_build_abts_resp_iocb()
1789 resp->payload.ba_acct.high_seq_cnt = cpu_to_le16(0xFFFF); in qlt_build_abts_resp_iocb()
1824 ql_dbg(ql_dbg_tgt, vha, 0xe006, in qlt_24xx_send_abts_resp()
1831 ql_dbg(ql_dbg_tgt, vha, 0xe04a, in qlt_24xx_send_abts_resp()
1849 resp->fcp_hdr_le.f_ctl[0] = *p++; in qlt_24xx_send_abts_resp()
1863 resp->payload.ba_acct.low_seq_cnt = 0x0000; in qlt_24xx_send_abts_resp()
1864 resp->payload.ba_acct.high_seq_cnt = cpu_to_le16(0xFFFF); in qlt_24xx_send_abts_resp()
1896 ql_dbg(ql_dbg_tgt, vha, 0xe04b, in qlt_24xx_retry_term_exchange()
1929 tmp |= (0x4 << 9); in qlt_24xx_retry_term_exchange()
1934 tmp |= (0x4 << 9); in qlt_24xx_retry_term_exchange()
1939 ql_dbg(ql_dbg_tgt, vha, 0xe007, in qlt_24xx_retry_term_exchange()
1943 (mcmd && mcmd->flags & QLA24XX_MGMT_ABORT_IO_ATTR_VALID) ? 1 : 0); in qlt_24xx_retry_term_exchange()
2018 h = &tgt->qphints[0]; in qlt_find_qphint()
2020 h = &tgt->qphints[0]; in qlt_find_qphint()
2040 tag = 0; in qlt_do_tmr_work()
2047 if (rc != 0) { in qlt_do_tmr_work()
2067 &mcmd->orig_iocb.imm_ntfy, 0, 0, 0, 0, 0, 0); in qlt_do_tmr_work()
2072 ql_dbg(ql_dbg_tgt_mgt, mcmd->vha, 0xf052, in qlt_do_tmr_work()
2085 struct qla_qpair_hint *h = &vha->vha_tgt.qla_tgt->qphints[0]; in __qlt_24xx_handle_abts()
2087 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf00f, in __qlt_24xx_handle_abts()
2093 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf051, in __qlt_24xx_handle_abts()
2098 memset(mcmd, 0, sizeof(*mcmd)); in __qlt_24xx_handle_abts()
2129 return 0; in __qlt_24xx_handle_abts()
2146 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf053, in qlt_24xx_handle_abts()
2155 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf010, in qlt_24xx_handle_abts()
2163 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf011, in qlt_24xx_handle_abts()
2174 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf012, in qlt_24xx_handle_abts()
2193 if (rc != 0) { in qlt_24xx_handle_abts()
2194 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf054, in qlt_24xx_handle_abts()
2214 ql_dbg(ql_dbg_tgt, ha, 0xe008, in qlt_24xx_send_task_mgmt_ctio()
2221 ql_dbg(ql_dbg_tgt, ha, 0xe04c, in qlt_24xx_send_task_mgmt_ctio()
2243 ctio->u.status1.sense_data[0] = resp_code; in qlt_24xx_send_task_mgmt_ctio()
2271 ql_dbg(ql_dbg_tgt_dif, vha, 0x3066, in qlt_send_resp_ctio()
2278 ql_dbg(ql_dbg_async, vha, 0x3067, in qlt_send_resp_ctio()
2302 if (ctio->u.status1.residual != 0) in qlt_send_resp_ctio()
2307 ctio->u.status1.sense_data[0] = 0x70; in qlt_send_resp_ctio()
2310 ctio->u.status1.sense_data[7] = 0xa; in qlt_send_resp_ctio()
2336 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf013, in qlt_xmit_tm_rsp()
2347 ql_dbg(ql_dbg_async, vha, 0xe100, in qlt_xmit_tm_rsp()
2361 ql_dbg(ql_dbg_disc, vha, 0x2106, in qlt_xmit_tm_rsp()
2369 &mcmd->orig_iocb.imm_ntfy, 0, 0, 0, 0, 0, 0); in qlt_xmit_tm_rsp()
2400 BUG_ON(cmd->sg_cnt == 0); in qlt_pci_map_calc_cnt()
2405 if (unlikely(prm->seg_cnt == 0)) in qlt_pci_map_calc_cnt()
2433 if (unlikely(prm->prot_seg_cnt == 0)) in qlt_pci_map_calc_cnt()
2447 return 0; in qlt_pci_map_calc_cnt()
2450 ql_dbg_qp(ql_dbg_tgt, prm->cmd->qpair, 0xe04d, in qlt_pci_map_calc_cnt()
2452 0, prm->cmd->sg_cnt); in qlt_pci_map_calc_cnt()
2468 cmd->sg_mapped = 0; in qlt_unmap_sg()
2504 return 0; in qlt_check_reserve_free_req()
2515 req->ring_index = 0; in qlt_get_req_pkt()
2528 uint8_t found = 0; in qlt_make_handle()
2550 ql_dbg(ql_dbg_io, qpair->vha, 0x305b, in qlt_make_handle()
2570 memset(pkt, 0, sizeof(*pkt)); in qlt_24xx_build_ctio_pkt()
2599 return 0; in qlt_24xx_build_ctio_pkt()
2612 while (prm->seg_cnt > 0) { in qlt_load_cont_data_segments()
2624 memset(cont_pkt64, 0, sizeof(*cont_pkt64)); in qlt_load_cont_data_segments()
2627 cont_pkt64->sys_define = 0; in qlt_load_cont_data_segments()
2633 for (cnt = 0; in qlt_load_cont_data_segments()
2661 if (prm->seg_cnt == 0) { in qlt_load_data_segments()
2663 cur_dsd->address = 0; in qlt_load_data_segments()
2664 cur_dsd->length = 0; in qlt_load_data_segments()
2671 for (cnt = 0; in qlt_load_data_segments()
2683 return cmd->bufflen > 0; in qlt_has_data()
2691 /* asc 0x10=dif error */ in qlt_print_dif_err()
2692 if (prm->sense_buffer && (prm->sense_buffer[12] == 0x10)) { in qlt_print_dif_err()
2698 ql_dbg(ql_dbg_tgt_dif, vha, 0xe00b, in qlt_print_dif_err()
2699 "BE detected Guard TAG ERR: lba[0x%llx|%lld] len[0x%x] " in qlt_print_dif_err()
2705 ql_dbg(ql_dbg_tgt_dif, vha, 0xe00c, in qlt_print_dif_err()
2706 "BE detected APP TAG ERR: lba[0x%llx|%lld] len[0x%x] " in qlt_print_dif_err()
2712 ql_dbg(ql_dbg_tgt_dif, vha, 0xe00f, in qlt_print_dif_err()
2713 "BE detected REF TAG ERR: lba[0x%llx|%lld] len[0x%x] " in qlt_print_dif_err()
2719 ql_dbg(ql_dbg_tgt_dif, vha, 0xe010, in qlt_print_dif_err()
2726 ql_dump_buffer(ql_dbg_tgt_dif, vha, 0xe011, cmd->cdb, 16); in qlt_print_dif_err()
2744 prm->sense_buffer = &cmd->sense_buffer[0]; in qlt_pre_xmit_response()
2749 prm->residual = 0; in qlt_pre_xmit_response()
2750 prm->add_status_pkt = 0; in qlt_pre_xmit_response()
2752 prm->prot_seg_cnt = 0; in qlt_pre_xmit_response()
2753 prm->tot_dsds = 0; in qlt_pre_xmit_response()
2756 if (qlt_pci_map_calc_cnt(prm) != 0) in qlt_pre_xmit_response()
2764 ql_dbg_qp(ql_dbg_io + ql_dbg_verbose, qpair, 0x305c, in qlt_pre_xmit_response()
2767 se_cmd->t_task_cdb ? se_cmd->t_task_cdb[0] : 0, in qlt_pre_xmit_response()
2772 ql_dbg_qp(ql_dbg_io, qpair, 0x305d, in qlt_pre_xmit_response()
2775 se_cmd->t_task_cdb[0] : 0, cmd->bufflen, prm->rq_result); in qlt_pre_xmit_response()
2787 (prm->rq_result != 0))) { in qlt_pre_xmit_response()
2794 return 0; in qlt_pre_xmit_response()
2801 return 0; in qlt_need_explicit_conf()
2816 if (qlt_need_explicit_conf(prm->cmd, 0)) { in qlt_24xx_init_ctio_to_isp()
2827 if ((prm->rq_result & SS_SCSI_STATUS_BYTE) != 0) { in qlt_24xx_init_ctio_to_isp()
2828 ql_dbg_qp(ql_dbg_tgt, prm->cmd->qpair, 0xe017, in qlt_24xx_init_ctio_to_isp()
2847 for (i = 0; i < prm->sense_buffer_len/4; i++) { in qlt_24xx_init_ctio_to_isp()
2862 ctio->u.status1.sense_length = 0; in qlt_24xx_init_ctio_to_isp()
2863 memset(ctio->u.status1.sense_data, 0, in qlt_24xx_init_ctio_to_isp()
2890 return 0; in qlt_hba_err_chk_enabled()
2905 return 0; in qla_tgt_ref_mask_check()
2907 return 0; in qla_tgt_ref_mask_check()
2918 uint32_t lba = 0xffffffff & se_cmd->t_task_lba; in qla_tgt_set_dif_tags()
2921 uint32_t t32 = 0; in qla_tgt_set_dif_tags()
2928 ctx->app_tag = 0; in qla_tgt_set_dif_tags()
2929 ctx->app_tag_mask[0] = 0x0; in qla_tgt_set_dif_tags()
2930 ctx->app_tag_mask[1] = 0x0; in qla_tgt_set_dif_tags()
2951 ctx->ref_tag_mask[0] = 0xff; in qla_tgt_set_dif_tags()
2952 ctx->ref_tag_mask[1] = 0xff; in qla_tgt_set_dif_tags()
2953 ctx->ref_tag_mask[2] = 0xff; in qla_tgt_set_dif_tags()
2954 ctx->ref_tag_mask[3] = 0xff; in qla_tgt_set_dif_tags()
2968 ctx->ref_tag_mask[0] = 0xff; in qla_tgt_set_dif_tags()
2969 ctx->ref_tag_mask[1] = 0xff; in qla_tgt_set_dif_tags()
2970 ctx->ref_tag_mask[2] = 0xff; in qla_tgt_set_dif_tags()
2971 ctx->ref_tag_mask[3] = 0xff; in qla_tgt_set_dif_tags()
2985 ctx->ref_tag_mask[0] = 0xff; in qla_tgt_set_dif_tags()
2986 ctx->ref_tag_mask[1] = 0xff; in qla_tgt_set_dif_tags()
2987 ctx->ref_tag_mask[2] = 0xff; in qla_tgt_set_dif_tags()
2988 ctx->ref_tag_mask[3] = 0xff; in qla_tgt_set_dif_tags()
2993 ctx->ref_tag_mask[0] = ctx->ref_tag_mask[1] = in qla_tgt_set_dif_tags()
2994 ctx->ref_tag_mask[2] = ctx->ref_tag_mask[3] = 0x00; in qla_tgt_set_dif_tags()
3003 uint32_t transfer_length = 0; in qlt_build_ctio_crc2_pkt()
3011 uint16_t fw_prot_opts = 0; in qlt_build_ctio_crc2_pkt()
3024 memset(pkt, 0, sizeof(*pkt)); in qlt_build_ctio_crc2_pkt()
3026 ql_dbg_qp(ql_dbg_tgt, cmd->qpair, 0xe071, in qlt_build_ctio_crc2_pkt()
3027 "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()
3033 bundling = 0; in qlt_build_ctio_crc2_pkt()
3058 fw_prot_opts |= 0x10; /* Disable Guard tag checking */ in qlt_build_ctio_crc2_pkt()
3150 cur_dsd = &crc_ctx_pkt->u.nobundling.data_dsd[0]; in qlt_build_ctio_crc2_pkt()
3160 cur_dsd = &crc_ctx_pkt->u.bundling.data_dsd[0]; in qlt_build_ctio_crc2_pkt()
3167 crc_ctx_pkt->guard_seed = cpu_to_le16(0); in qlt_build_ctio_crc2_pkt()
3169 memset((uint8_t *)&tc, 0 , sizeof(tc)); in qlt_build_ctio_crc2_pkt()
3218 uint32_t full_req_cnt = 0; in qlt_xmit_response()
3219 unsigned long flags = 0; in qlt_xmit_response()
3225 res = 0; in qlt_xmit_response()
3229 ql_dbg_qp(ql_dbg_tgt, qpair, 0xe018, in qlt_xmit_response()
3232 1 : 0, cmd->bufflen, cmd->sg_cnt, cmd->dma_data_direction, in qlt_xmit_response()
3237 if (unlikely(res != 0)) in qlt_xmit_response()
3253 ql_dbg_qp(ql_dbg_async, qpair, 0xe101, in qlt_xmit_response()
3258 res = 0; in qlt_xmit_response()
3271 if (unlikely(res != 0)) { in qlt_xmit_response()
3286 if (prm.add_status_pkt == 0) { in qlt_xmit_response()
3294 if (qlt_need_explicit_conf(cmd, 0)) { in qlt_xmit_response()
3312 ql_dbg_qp(ql_dbg_tgt, qpair, 0x305e, in qlt_xmit_response()
3313 "Building additional status packet 0x%p.\n", in qlt_xmit_response()
3324 ctio->dseg_count = 0; in qlt_xmit_response()
3356 return 0; in qlt_xmit_response()
3374 unsigned long flags = 0; in qlt_rdy_to_xfer()
3375 int res = 0; in qlt_rdy_to_xfer()
3378 memset(&prm, 0, sizeof(prm)); in qlt_rdy_to_xfer()
3385 if (qlt_pci_map_calc_cnt(&prm) != 0) in qlt_rdy_to_xfer()
3395 cmd->write_data_transferred = 0; in qlt_rdy_to_xfer()
3398 ql_dbg_qp(ql_dbg_async, qpair, 0xe102, in qlt_rdy_to_xfer()
3402 return 0; in qlt_rdy_to_xfer()
3408 if (res != 0) in qlt_rdy_to_xfer()
3415 if (unlikely(res != 0)) { in qlt_rdy_to_xfer()
3457 uint8_t *ap = &sts->actual_dif[0]; in qlt_handle_dif_error()
3458 uint8_t *ep = &sts->expected_dif[0]; in qlt_handle_dif_error()
3466 cmd->a_guard = get_unaligned_be16(ap + 0); in qlt_handle_dif_error()
3470 cmd->e_guard = get_unaligned_be16(ep + 0); in qlt_handle_dif_error()
3474 ql_dbg(ql_dbg_tgt_dif, vha, 0xf075, in qlt_handle_dif_error()
3477 scsi_status = sense_key = asc = ascq = 0; in qlt_handle_dif_error()
3481 ql_dbg(ql_dbg_tgt_dif, vha, 0xe00d, in qlt_handle_dif_error()
3483 cmd->cdb[0], lba, (lba+cmd->num_blks), cmd->num_blks, in qlt_handle_dif_error()
3491 asc = 0x10; in qlt_handle_dif_error()
3492 ascq = 0x2; in qlt_handle_dif_error()
3497 ql_dbg(ql_dbg_tgt_dif, vha, 0xe00e, in qlt_handle_dif_error()
3499 cmd->cdb[0], lba, (lba+cmd->num_blks), cmd->num_blks, in qlt_handle_dif_error()
3507 asc = 0x10; in qlt_handle_dif_error()
3508 ascq = 0x3; in qlt_handle_dif_error()
3514 ql_dbg(ql_dbg_tgt_dif, vha, 0xe012, in qlt_handle_dif_error()
3516 cmd->cdb[0], lba, (lba+cmd->num_blks), cmd->num_blks, in qlt_handle_dif_error()
3524 asc = 0x10; in qlt_handle_dif_error()
3525 ascq = 0x1; in qlt_handle_dif_error()
3561 int ret = 0; in __qlt_send_term_imm_notif()
3563 ql_dbg(ql_dbg_tgt_tmr, vha, 0xe01c, in __qlt_send_term_imm_notif()
3568 ql_dbg(ql_dbg_tgt, vha, 0xe080, in __qlt_send_term_imm_notif()
3626 int ret = 0; in __qlt_send_term_exchange()
3629 ql_dbg(ql_dbg_tgt, vha, 0xe009, "Sending TERM EXCH CTIO (ha=%p)\n", ha); in __qlt_send_term_exchange()
3636 ql_dbg(ql_dbg_tgt, vha, 0xe050, in __qlt_send_term_exchange()
3644 ql_dbg(ql_dbg_tgt, vha, 0xe051, in __qlt_send_term_exchange()
3683 unsigned long flags = 0; in qlt_send_term_exchange()
3695 qlt_alloc_qfull_cmd(vha, atio, 0, 0); in qlt_send_term_exchange()
3701 qlt_alloc_qfull_cmd(vha, atio, 0, 0); in qlt_send_term_exchange()
3738 vha->hw->tgt.num_qfull_cmds_dropped = 0; in qlt_init_term_exchange()
3750 ql_dbg(ql_dbg_tgt, vha, 0xe079, in qlt_chk_exch_leak_thresh_hold()
3770 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf014, in qlt_abort_cmd()
3783 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf016, in qlt_abort_cmd()
3793 qlt_send_term_exchange(cmd->qpair, cmd, &cmd->atio, 0, 1); in qlt_abort_cmd()
3794 return 0; in qlt_abort_cmd()
3802 ql_dbg(ql_dbg_tgt, cmd->vha, 0xe074, in qlt_free_cmd()
3835 int term = 0; in qlt_term_ctio_exchange()
3839 ql_dbg(ql_dbg_tgt_dif, vha, 0xe013, in qlt_term_ctio_exchange()
3840 "Term DIF cmd: lba[0x%llx|%lld] len[0x%x] " in qlt_term_ctio_exchange()
3857 qlt_send_term_exchange(qpair, cmd, &cmd->atio, 1, 0); in qlt_term_ctio_exchange()
3878 ql_dbg(ql_dbg_tgt_mgt, vha, 0x1000a, in qlt_ctio_to_cmd()
3890 ql_dbg(ql_dbg_tgt, vha, 0xe052, in qlt_ctio_to_cmd()
3898 ql_dbg(ql_dbg_async, vha, 0xe053, in qlt_ctio_to_cmd()
3906 ql_dbg(ql_dbg_tgt, vha, 0xe054, in qlt_ctio_to_cmd()
3929 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf01d, in qlt_do_ctio_completion()
3941 cmd->cmd_sent_to_fw = 0; in qlt_do_ctio_completion()
3946 switch (status & 0xFFFF) { in qlt_do_ctio_completion()
3952 ((cmd->ctio_flags >> 9) & 0xf), in qlt_do_ctio_completion()
3962 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf058, in qlt_do_ctio_completion()
3974 (status & 0xFFFF) == CTIO_PORT_LOGGED_OUT; in qlt_do_ctio_completion()
3976 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf059, in qlt_do_ctio_completion()
3988 ql_dbg(ql_dbg_disc, vha, 0x20f8, in qlt_do_ctio_completion()
3999 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf073, in qlt_do_ctio_completion()
4001 "received (state %x, ulp_cmd %p) actual_dif[0x%llx] " in qlt_do_ctio_completion()
4002 "expect_dif[0x%llx]\n", in qlt_do_ctio_completion()
4004 *((u64 *)&crc->actual_dif[0]), in qlt_do_ctio_completion()
4005 *((u64 *)&crc->expected_dif[0])); in qlt_do_ctio_completion()
4011 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf05b, in qlt_do_ctio_completion()
4012 "qla_target(%d): CTIO with error status 0x%x received (state %x, se_cmd %p\n", in qlt_do_ctio_completion()
4044 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf01e, in qlt_do_ctio_completion()
4048 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf05c, in qlt_do_ctio_completion()
4055 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf01f, "Finishing failed CTIO\n"); in qlt_do_ctio_completion()
4084 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf05d, in qlt_get_fcp_task_attr()
4106 int ret, fcp_task_attr, data_dir, bidi = 0; in __qlt_do_work()
4109 cmd->cmd_in_wq = 0; in __qlt_do_work()
4113 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf082, in __qlt_do_work()
4120 cdb = &atio->u.isp24.fcp_cmnd.cdb[0]; in __qlt_do_work()
4140 if (ret != 0) in __qlt_do_work()
4149 ql_dbg(ql_dbg_io, vha, 0x3060, "Terminating work cmd %p", cmd); in __qlt_do_work()
4156 qlt_send_term_exchange(qpair, NULL, &cmd->atio, 1, 0); in __qlt_do_work()
4184 u64 key = 0; in qlt_clr_qp_table()
4186 ql_log(ql_log_info, vha, 0x706c, in qlt_clr_qp_table()
4195 ha->base_qpair->lun_cnt = 0; in qlt_clr_qp_table()
4196 for (key = 0; key < ha->max_qpairs; key++) in qlt_clr_qp_table()
4198 ha->queue_pair_map[key]->lun_cnt = 0; in qlt_clr_qp_table()
4214 int lcnt = 0, rc; in qlt_assign_qpair()
4219 if (qpair->lun_cnt == 0) { in qlt_assign_qpair()
4227 ql_log(ql_log_info, vha, 0xd037, in qlt_assign_qpair()
4239 if (qp->lun_cnt == 0) { in qlt_assign_qpair()
4247 ql_log(ql_log_info, vha, 0xd038, in qlt_assign_qpair()
4269 ql_log(ql_log_info, vha, 0xd039, in qlt_assign_qpair()
4275 h = &tgt->qphints[0]; in qlt_assign_qpair()
4302 cmd->trc_flags = 0; in qlt_get_tag()
4326 ql_dbg(ql_dbg_io, vha, 0x3061, in qlt_handle_cmd_for_atio()
4342 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf002, in qlt_handle_cmd_for_atio()
4352 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf004, in qlt_handle_cmd_for_atio()
4361 ql_dbg(ql_dbg_io, vha, 0x3062, in qlt_handle_cmd_for_atio()
4388 return 0; in qlt_handle_cmd_for_atio()
4399 struct qla_qpair_hint *h = &vha->vha_tgt.qla_tgt->qphints[0]; in qlt_issue_task_mgmt()
4403 ql_dbg(ql_dbg_tgt_tmr, vha, 0x10009, in qlt_issue_task_mgmt()
4409 memset(mcmd, 0, sizeof(*mcmd)); in qlt_issue_task_mgmt()
4449 return 0; in qlt_issue_task_mgmt()
4475 return qlt_issue_task_mgmt(sess, unpacked_lun, fn, iocb, 0); in qlt_handle_task_mgmt()
4490 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf05f, in __qlt_abort_task()
4495 memset(mcmd, 0, sizeof(*mcmd)); in __qlt_abort_task()
4509 if (rc != 0) { in __qlt_abort_task()
4510 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf060, in __qlt_abort_task()
4517 return 0; in __qlt_abort_task()
4536 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf025, in qlt_abort_task()
4549 ql_dbg(ql_dbg_tgt_mgt, fcport->vha, 0xf093, in qlt_logo_completion_handler()
4593 ql_dbg(ql_dbg_disc, vha, 0x1000c, in qlt_find_sess_invalidate_other()
4609 ql_dbg(ql_dbg_disc, vha, 0xf01b, in qlt_find_sess_invalidate_other()
4624 ql_dbg(ql_dbg_disc, vha, 0x1000d, in qlt_find_sess_invalidate_other()
4643 int count = 0; in abort_cmds_for_s_id()
4689 int res = 0; in qlt_handle_login()
4699 port_id.b.al_pa = iocb->u.isp24.port_id[0]; in qlt_handle_login()
4700 port_id.b.rsvd_1 = 0; in qlt_handle_login()
4713 ql_dbg(ql_dbg_disc, vha, 0xffff, in qlt_handle_login()
4714 "%s %d Term INOT due to WWN=0 lid=%d, NportID %06X ", in qlt_handle_login()
4727 ql_dbg(ql_dbg_disc + ql_dbg_verbose, vha, 0xffff, in qlt_handle_login()
4743 ql_dbg(ql_dbg_disc, vha, 0xffff, in qlt_handle_login()
4750 pla, 0); in qlt_handle_login()
4754 pla, 0); in qlt_handle_login()
4773 ql_dbg(ql_dbg_disc, vha, 0xffff, in qlt_handle_login()
4793 sess->local = 0; in qlt_handle_login()
4802 if ((wd3_lo & BIT_4) == 0) in qlt_handle_login()
4811 ql_dbg(ql_dbg_disc, vha, 0x20f9, in qlt_handle_login()
4843 ql_dbg(ql_dbg_disc, vha, 0x20f9, in qlt_handle_login()
4868 int res = 0; in qlt_24xx_handle_els()
4877 port_id.b.al_pa = iocb->u.isp24.port_id[0]; in qlt_24xx_handle_els()
4878 port_id.b.rsvd_1 = 0; in qlt_24xx_handle_els()
4882 ql_dbg(ql_dbg_disc, vha, 0xf026, in qlt_24xx_handle_els()
4883 "qla_target(%d): Port ID: %02x:%02x:%02x ELS opcode: 0x%02x lid %d %8phC\n", in qlt_24xx_handle_els()
4885 iocb->u.isp24.port_id[1], iocb->u.isp24.port_id[0], in qlt_24xx_handle_els()
4890 * res = 0 means ack async/later. in qlt_24xx_handle_els()
4903 ql_dbg(ql_dbg_disc, vha, 0xffff, in qlt_24xx_handle_els()
4935 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf09b, in qlt_24xx_handle_els()
4941 res = 0; in qlt_24xx_handle_els()
4971 ql_dbg(ql_dbg_disc, sess->vha, 0xffff, in qlt_24xx_handle_els()
4976 return 0; in qlt_24xx_handle_els()
4996 ql_log(ql_log_warn, sess->vha, 0xf095, in qlt_24xx_handle_els()
5000 res = 0; in qlt_24xx_handle_els()
5008 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf096, in qlt_24xx_handle_els()
5012 sess->local = 0; in qlt_24xx_handle_els()
5020 if ((wd3_lo & BIT_4) == 0) in qlt_24xx_handle_els()
5032 ql_dbg(ql_dbg_disc, vha, 0x20fa, in qlt_24xx_handle_els()
5037 res = 0; in qlt_24xx_handle_els()
5045 ql_dbg(ql_dbg_disc, vha, 0x20fb, in qlt_24xx_handle_els()
5050 res = 0; in qlt_24xx_handle_els()
5058 loop_id = 0xFFFF; in qlt_24xx_handle_els()
5079 ql_dbg(ql_dbg_disc, vha, 0x20fc, in qlt_24xx_handle_els()
5082 if (res == 0) { in qlt_24xx_handle_els()
5088 res = 0; in qlt_24xx_handle_els()
5093 res = 0; in qlt_24xx_handle_els()
5105 &tgt->link_reinit_iocb, 0, 0, 0, 0, 0, 0); in qlt_24xx_handle_els()
5106 tgt->link_reinit_iocb_pending = 0; in qlt_24xx_handle_els()
5112 ql_dbg(ql_dbg_disc, vha, 0x20fd, in qlt_24xx_handle_els()
5124 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf061, in qlt_24xx_handle_els()
5131 ql_dbg(ql_dbg_disc, vha, 0xf026, in qlt_24xx_handle_els()
5132 "qla_target(%d): Exit ELS opcode: 0x%02x res %d\n", in qlt_24xx_handle_els()
5145 uint32_t add_flags = 0; in qlt_handle_imm_notify()
5155 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf032, in qlt_handle_imm_notify()
5160 if (qlt_reset(vha, iocb, QLA_TGT_ABORT_ALL) == 0) in qlt_handle_imm_notify()
5161 send_notify_ack = 0; in qlt_handle_imm_notify()
5169 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf033, in qlt_handle_imm_notify()
5176 &tgt->link_reinit_iocb, 0, 0, 0, 0, 0, 0); in qlt_handle_imm_notify()
5184 send_notify_ack = 0; in qlt_handle_imm_notify()
5189 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf034, in qlt_handle_imm_notify()
5195 if (qlt_reset(vha, iocb, QLA_TGT_NEXUS_LOSS_SESS) == 0) in qlt_handle_imm_notify()
5196 send_notify_ack = 0; in qlt_handle_imm_notify()
5201 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf035, in qlt_handle_imm_notify()
5203 if (qlt_reset(vha, iocb, QLA_TGT_NEXUS_LOSS) == 0) in qlt_handle_imm_notify()
5204 send_notify_ack = 0; in qlt_handle_imm_notify()
5209 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf036, in qlt_handle_imm_notify()
5212 if (qlt_reset(vha, iocb, QLA_TGT_ABORT_ALL) == 0) in qlt_handle_imm_notify()
5213 send_notify_ack = 0; in qlt_handle_imm_notify()
5218 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf06a, in qlt_handle_imm_notify()
5222 if (qlt_reset(vha, iocb, QLA_TGT_NEXUS_LOSS) == 0) in qlt_handle_imm_notify()
5223 send_notify_ack = 0; in qlt_handle_imm_notify()
5227 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf06b, in qlt_handle_imm_notify()
5234 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf037, in qlt_handle_imm_notify()
5240 if (qlt_abort_task(vha, iocb) == 0) in qlt_handle_imm_notify()
5241 send_notify_ack = 0; in qlt_handle_imm_notify()
5245 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf06c, in qlt_handle_imm_notify()
5251 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf038, in qlt_handle_imm_notify()
5257 if (qlt_24xx_handle_els(vha, iocb) == 0) in qlt_handle_imm_notify()
5258 send_notify_ack = 0; in qlt_handle_imm_notify()
5261 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf06d, in qlt_handle_imm_notify()
5268 qlt_send_notify_ack(ha->base_qpair, iocb, add_flags, 0, 0, 0, in qlt_handle_imm_notify()
5269 0, 0); in qlt_handle_imm_notify()
5294 qlt_send_term_exchange(qpair, NULL, atio, 1, 0); in __qlt_send_busy()
5295 return 0; in __qlt_send_busy()
5301 ql_dbg(ql_dbg_io, vha, 0x3063, in __qlt_send_busy()
5332 if (ctio24->u.status1.residual != 0) in __qlt_send_busy()
5341 return 0; in __qlt_send_busy()
5360 ql_dbg(ql_dbg_io, vha, 0x300a, in qlt_alloc_qfull_cmd()
5372 ql_dbg(ql_dbg_io, vha, 0x3068, in qlt_alloc_qfull_cmd()
5388 ql_dbg(ql_dbg_io, vha, 0x3009, in qlt_alloc_qfull_cmd()
5438 int rc = 0; in qlt_free_qfull_cmds()
5441 return 0; in qlt_free_qfull_cmds()
5449 return 0; in qlt_free_qfull_cmds()
5467 ql_dbg(ql_dbg_io, vha, 0x3006, in qlt_free_qfull_cmds()
5471 ql_dbg(ql_dbg_io, vha, 0x3007, in qlt_free_qfull_cmds()
5475 ql_dbg(ql_dbg_io, vha, 0x3008, in qlt_free_qfull_cmds()
5510 int rc = 0; in qlt_send_busy()
5526 return 0; in qlt_chk_qfull_thresh_hold()
5545 unsigned long flags = 0; in qlt_24xx_atio_pkt()
5548 ql_dbg(ql_dbg_tgt, vha, 0x3064, in qlt_24xx_atio_pkt()
5563 ql_dbg(ql_dbg_io, vha, 0x3065, in qlt_24xx_atio_pkt()
5576 if (likely(atio->u.isp24.fcp_cmnd.task_mgmt_flags == 0)) { in qlt_24xx_atio_pkt()
5579 if (rc != 0) { in qlt_24xx_atio_pkt()
5587 if (unlikely(rc != 0)) { in qlt_24xx_atio_pkt()
5592 ql_dbg(ql_dbg_tgt, vha, 0xe05f, in qlt_24xx_atio_pkt()
5596 ql_dbg(ql_dbg_tgt, vha, 0xe05f, in qlt_24xx_atio_pkt()
5599 atio, 1, 0); in qlt_24xx_atio_pkt()
5602 ql_dbg(ql_dbg_tgt, vha, 0xe060, in qlt_24xx_atio_pkt()
5609 ql_dbg(ql_dbg_tgt, vha, 0xe060, in qlt_24xx_atio_pkt()
5624 if (unlikely(atio->u.isp2x.entry_status != 0)) { in qlt_24xx_atio_pkt()
5625 ql_dbg(ql_dbg_tgt, vha, 0xe05b, in qlt_24xx_atio_pkt()
5632 ql_dbg(ql_dbg_tgt, vha, 0xe02e, "%s", "IMMED_NOTIFY ATIO"); in qlt_24xx_atio_pkt()
5643 ql_dbg(ql_dbg_tgt, vha, 0xe05c, in qlt_24xx_atio_pkt()
5654 * rc = 0 : send terminate & abts respond
5655 * rc != 0: do not send term & abts respond
5661 int rc = 0; in qlt_chk_unresolv_exchg()
5675 qpair->retry_term_cnt = 0; in qlt_chk_unresolv_exchg()
5676 ql_log(ql_log_warn, vha, 0xffff, in qlt_chk_unresolv_exchg()
5679 vha, 0xffff, (uint8_t *)entry, sizeof(*entry)); in qlt_chk_unresolv_exchg()
5691 qpair->retry_term_cnt = 0; in qlt_chk_unresolv_exchg()
5710 ql_dbg(ql_dbg_async, vha, 0xe064, in qlt_handle_abts_completion()
5720 ql_dbg(ql_dbg_tgt, vha, 0xe038, in qlt_handle_abts_completion()
5725 if (le32_to_cpu(entry->error_subcode1) == 0x1E && in qlt_handle_abts_completion()
5726 le32_to_cpu(entry->error_subcode2) == 0) { in qlt_handle_abts_completion()
5734 ql_dbg(ql_dbg_tgt, vha, 0xe063, in qlt_handle_abts_completion()
5754 ql_dbg(ql_dbg_tgt, vha, 0xe05d, in qlt_response_pkt()
5784 ql_dbg(ql_dbg_tgt, vha, 0xe05e, in qlt_response_pkt()
5792 if (rc != 0) in qlt_response_pkt()
5796 if (unlikely(rc != 0)) { in qlt_response_pkt()
5799 ql_dbg(ql_dbg_tgt, vha, 0xe05f, in qlt_response_pkt()
5803 ql_dbg(ql_dbg_tgt, vha, 0xe05f, in qlt_response_pkt()
5806 atio, 1, 0); in qlt_response_pkt()
5809 ql_dbg(ql_dbg_tgt, vha, 0xe060, in qlt_response_pkt()
5816 ql_dbg(ql_dbg_tgt, vha, 0xe060, in qlt_response_pkt()
5848 ql_dbg(ql_dbg_tgt, vha, 0xe035, "%s", "IMMED_NOTIFY\n"); in qlt_response_pkt()
5853 if (tgt->notify_ack_expected > 0) { in qlt_response_pkt()
5856 ql_dbg(ql_dbg_tgt, vha, 0xe036, in qlt_response_pkt()
5863 ql_dbg(ql_dbg_tgt, vha, 0xe061, in qlt_response_pkt()
5869 ql_dbg(ql_dbg_tgt, vha, 0xe062, in qlt_response_pkt()
5876 ql_dbg(ql_dbg_tgt, vha, 0xe037, in qlt_response_pkt()
5882 if (tgt->abts_resp_expected > 0) { in qlt_response_pkt()
5885 ql_dbg(ql_dbg_tgt, vha, 0xe064, in qlt_response_pkt()
5892 ql_dbg(ql_dbg_tgt, vha, 0xe065, in qlt_response_pkt()
5927 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf03a, in qlt_async_event()
5937 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf03b, in qlt_async_event()
5939 "(m[0]=%x, m[1]=%x, m[2]=%x, m[3]=%x)", vha->vp_idx, in qlt_async_event()
5940 mailbox[0], mailbox[1], mailbox[2], mailbox[3]); in qlt_async_event()
5944 0, 0, 0, 0, 0, 0); in qlt_async_event()
5945 tgt->link_reinit_iocb_pending = 0; in qlt_async_event()
5954 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf03c, in qlt_async_event()
5956 "(m[0]=%x, m[1]=%x, m[2]=%x, m[3]=%x)", vha->vp_idx, code, in qlt_async_event()
5957 mailbox[0], mailbox[1], mailbox[2], mailbox[3]); in qlt_async_event()
5961 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf017, in qlt_async_event()
5962 "qla_target(%d): Async event LS_REJECT occurred (m[0]=%x, m[1]=%x, m[2]=%x, m[3]=%x)", in qlt_async_event()
5964 mailbox[0], mailbox[1], mailbox[2], mailbox[3]); in qlt_async_event()
5970 ql_log(ql_log_warn, vha, 0xd03a, in qlt_async_event()
5973 vha->hw->exch_starvation = 0; in qlt_async_event()
5986 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf03d, in qlt_async_event()
5988 "occurred: updating the ports database (m[0]=%x, m[1]=%x, " in qlt_async_event()
5990 mailbox[0], mailbox[1], mailbox[2], mailbox[3]); in qlt_async_event()
5993 if (login_code == 0x4) { in qlt_async_event()
5994 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf03e, in qlt_async_event()
5996 vha->hw->exch_starvation = 0; in qlt_async_event()
5997 } else if (login_code == 0x7) in qlt_async_event()
5998 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf03f, in qlt_async_event()
6013 u8 newfcport = 0; in qlt_get_port_database()
6017 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf06f, in qlt_get_port_database()
6025 rc = qla24xx_gpdb_wait(vha, fcport, 0); in qlt_get_port_database()
6027 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf070, in qlt_get_port_database()
6030 "(loop_id=0x%04x)", vha->vp_idx, rc, loop_id); in qlt_get_port_database()
6061 fcport->deleted = 0; in qlt_get_port_database()
6071 ql_dbg(ql_dbg_disc, vha, 0x20ff, in qlt_get_port_database()
6096 uint16_t loop_id = 0; in qlt_make_local_sess()
6098 if (s_id.domain == 0xFF && s_id.area == 0xFC) { in qlt_make_local_sess()
6103 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf042, in qlt_make_local_sess()
6116 if (rc != 0) { in qlt_make_local_sess()
6119 ql_log(ql_log_info, vha, 0xf071, in qlt_make_local_sess()
6143 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf043, in qlt_make_local_sess()
6165 unsigned long flags = 0, flags2 = 0; in qlt_abort_work()
6193 ql_dbg(ql_dbg_tgt_tmr, vha, 0xf01c, in qlt_abort_work()
6206 if (rc != 0) in qlt_abort_work()
6256 ql_dbg(ql_dbg_tgt_tmr, vha, 0xf020, in qlt_tmr_work()
6268 rc = qlt_issue_task_mgmt(sess, unpacked_lun, fn, iocb, 0); in qlt_tmr_work()
6273 if (rc != 0) in qlt_tmr_work()
6280 qlt_send_term_exchange(ha->base_qpair, NULL, &prm->tm_iocb2, 1, 0); in qlt_tmr_work()
6289 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf000, "Sess work (tgt %p)", tgt); in qlt_sess_work_fn()
6332 return 0; in qlt_add_target()
6335 ql_log(ql_log_warn, base_vha, 0xe070, in qlt_add_target()
6337 return 0; in qlt_add_target()
6340 ql_dbg(ql_dbg_tgt, base_vha, 0xe03b, in qlt_add_target()
6347 ql_dbg(ql_dbg_tgt, base_vha, 0xe066, in qlt_add_target()
6357 ql_log(ql_log_warn, base_vha, 0x0197, in qlt_add_target()
6369 ql_log(ql_log_info, base_vha, 0x0198, in qlt_add_target()
6373 h = &tgt->qphints[0]; in qlt_add_target()
6379 for (i = 0; i < ha->max_qpairs; i++) { in qlt_add_target()
6402 atomic_set(&tgt->tgt_global_resets_count, 0); in qlt_add_target()
6406 ql_dbg(ql_dbg_tgt, base_vha, 0xe067, in qlt_add_target()
6419 return 0; in qlt_add_target()
6426 return 0; in qlt_remove_target()
6430 return 0; in qlt_remove_target()
6436 ql_dbg(ql_dbg_tgt, vha, 0xe03c, "Unregistering target for host %ld(%p)", in qlt_remove_target()
6440 return 0; in qlt_remove_target()
6446 u32 key = 0; in qlt_remove_target_resources()
6515 ql_dbg(ql_dbg_tgt, vha, 0xe068, in qlt_lport_register()
6527 if (rc != 0) in qlt_lport_register()
6612 ql_dbg(ql_dbg_tgt, vha, 0xe069, in qlt_enable_vha()
6624 tgt->tgt_stopped = 0; in qlt_enable_vha()
6629 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf021, in qlt_enable_vha()
6656 ql_dbg(ql_dbg_tgt, vha, 0xe06a, in qlt_disable_vha()
6675 ql_dbg(ql_dbg_tgt, vha, 0xe081, in qlt_disable_vha()
6708 u8 fc4_feature = 0; in qlt_rff_id()
6710 * FC-4 Feature bit 0 indicates target functionality to the name server. in qlt_rff_id()
6729 * Returns 0 on success.
6741 for (cnt = 0; cnt < ha->tgt.atio_q_length; cnt++) { in qlt_init_atio_q_entries()
6773 ql_log(ql_log_warn, vha, 0xd03c, in qlt_24xx_process_atio_queue()
6781 ha_locked, 0); in qlt_24xx_process_atio_queue()
6787 for (i = 0; i < cnt; i++) { in qlt_24xx_process_atio_queue()
6790 ha->tgt.atio_ring_index = 0; in qlt_24xx_process_atio_queue()
6815 wrt_reg_dword(ISP_ATIO_Q_IN(vha), 0); in qlt_24xx_config_rings()
6816 wrt_reg_dword(ISP_ATIO_Q_OUT(vha), 0); in qlt_24xx_config_rings()
6823 icb->msix_atio = 0; in qlt_24xx_config_rings()
6829 ql_dbg(ql_dbg_init, vha, 0xf072, in qlt_24xx_config_rings()
6830 "Registering ICB vector 0x%x for atio que.\n", in qlt_24xx_config_rings()
6836 icb->msix_atio = 0; in qlt_24xx_config_rings()
6838 ql_dbg(ql_dbg_init, vha, 0xf072, in qlt_24xx_config_rings()
6867 nv->exchange_count = cpu_to_le16(0xFFFF); in qlt_24xx_config_nvram_stage1()
6973 nv->exchange_count = cpu_to_le16(0xFFFF); in qlt_81xx_config_nvram_stage1()
7084 if ((ql2xenablemsix == 0) || IS_QLA83XX(ha) || IS_QLA27XX(ha) || in qlt_probe_one_stage1()
7104 ql_log(ql_log_info, base_vha, 0xd03d, in qlt_probe_one_stage1()
7124 qlt_24xx_process_atio_queue(vha, 0); in qla83xx_msix_atio_q()
7145 qlt_24xx_process_atio_queue(vha, 0); in qlt_handle_abts_recv_work()
7184 return 0; in qlt_mem_alloc()
7199 return 0; in qlt_mem_alloc()
7214 ha->tgt.atio_dma = 0; in qlt_mem_free()
7239 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf018, in qlt_update_vp_map()
7244 ql_log(ql_log_info, vha, 0xd03e, in qlt_update_vp_map()
7249 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf019, in qlt_update_vp_map()
7257 ql_dbg(ql_dbg_tgt_mgt, vha, 0xf01a, in qlt_update_vp_map()
7262 vha->d_id.b24 = 0; in qlt_update_vp_map()
7282 if (strcasecmp(qlini_mode, QLA2XXX_INI_MODE_STR_EXCLUSIVE) == 0) in qlt_parse_ini_mode()
7284 else if (strcasecmp(qlini_mode, QLA2XXX_INI_MODE_STR_DISABLED) == 0) in qlt_parse_ini_mode()
7286 else if (strcasecmp(qlini_mode, QLA2XXX_INI_MODE_STR_ENABLED) == 0) in qlt_parse_ini_mode()
7288 else if (strcasecmp(qlini_mode, QLA2XXX_INI_MODE_STR_DUAL) == 0) in qlt_parse_ini_mode()
7304 ql_log(ql_log_fatal, NULL, 0xe06b, in qlt_init()
7310 return 0; in qlt_init()
7314 qla_tgt_mgmt_cmd), 0, NULL); in qlt_init()
7316 ql_log(ql_log_fatal, NULL, 0xd04b, in qlt_init()
7323 0, NULL); in qlt_init()
7326 ql_log(ql_log_fatal, NULL, 0xe06d, in qlt_init()
7335 ql_log(ql_log_fatal, NULL, 0xe06e, in qlt_init()
7341 qla_tgt_wq = alloc_workqueue("qla_tgt_wq", 0, 0); in qlt_init()
7343 ql_log(ql_log_fatal, NULL, 0xe06f, in qlt_init()
7351 return (ql2x_ini_mode == QLA2XXX_INI_MODE_DISABLED) ? 1 : 0; in qlt_init()