Lines Matching defs:vha
26 struct scsi_qla_host *vha = sp->vha;
33 vha->qla_stats.output_bytes += scsi_bufflen(cmd);
34 vha->qla_stats.output_requests++;
37 vha->qla_stats.input_bytes += scsi_bufflen(cmd);
38 vha->qla_stats.input_requests++;
89 * @vha: HA context
94 qla2x00_prep_cont_type0_iocb(struct scsi_qla_host *vha)
97 struct req_que *req = vha->req;
117 * @vha: HA context
123 qla2x00_prep_cont_type1_iocb(scsi_qla_host_t *vha, struct req_que *req)
139 put_unaligned_le32(IS_QLAFX00(vha->hw) ? CONTINUE_A64_TYPE_FX00 :
198 scsi_qla_host_t *vha;
214 vha = sp->vha;
231 cont_pkt = qla2x00_prep_cont_type0_iocb(vha);
254 scsi_qla_host_t *vha;
270 vha = sp->vha;
287 cont_pkt = qla2x00_prep_cont_type1_iocb(vha, vha->req);
328 scsi_qla_host_t *vha;
342 vha = sp->vha;
343 ha = vha->hw;
352 if (vha->marker_needed != 0) {
353 if (qla2x00_marker(vha, ha->base_qpair, 0, 0, MK_SYNC_ALL) !=
357 vha->marker_needed = 0;
437 if (vha->flags.process_response_queue &&
455 * @vha: HA context
459 qla2x00_start_iocbs(struct scsi_qla_host *vha, struct req_que *req)
461 struct qla_hw_data *ha = vha->hw;
465 qla82xx_start_iocbs(vha);
498 * @vha: HA context
509 __qla2x00_marker(struct scsi_qla_host *vha, struct qla_qpair *qpair,
515 struct qla_hw_data *ha = vha->hw;
535 mrk24->vp_index = vha->vp_idx;
547 qla2x00_start_iocbs(vha, req);
553 qla2x00_marker(struct scsi_qla_host *vha, struct qla_qpair *qpair,
560 ret = __qla2x00_marker(vha, qpair, loop_id, lun, type);
573 int qla2x00_issue_marker(scsi_qla_host_t *vha, int ha_locked)
576 if (__qla2x00_marker(vha, vha->hw->base_qpair, 0, 0,
580 if (qla2x00_marker(vha, vha->hw->base_qpair, 0, 0,
584 vha->marker_needed = 0;
705 scsi_qla_host_t *vha;
722 vha = sp->vha;
750 cont_pkt = qla2x00_prep_cont_type1_iocb(vha, req);
1035 struct scsi_qla_host *vha;
1047 vha = sp->vha;
1050 ql_dbg(ql_dbg_tgt + ql_dbg_verbose, vha, 0xe021,
1054 vha = tc->vha;
1063 ql_dbg(ql_dbg_tgt + ql_dbg_verbose, vha, 0xe021,
1073 ql_dbg(ql_dbg_tgt + ql_dbg_verbose, vha, 0xe022,
1082 vha, 0xe022,
1113 ql_dbg(ql_dbg_tgt + ql_dbg_verbose, vha, 0xe023,
1129 ql_dbg(ql_dbg_tgt, vha, 0xe024,
1141 ql_dbg(ql_dbg_tgt, vha, 0xe024,
1182 ql_dbg(ql_dbg_tgt + ql_dbg_verbose, vha, 0xe025,
1202 ql_dbg(ql_dbg_tgt + ql_dbg_verbose, vha,
1214 ql_dbg(ql_dbg_tgt, vha, 0xe026,
1227 ql_dbg(ql_dbg_tgt, vha, 0xe026,
1265 ql_dbg(ql_dbg_tgt + ql_dbg_verbose, vha, 0xe026,
1281 vha, 0xe027,
1341 scsi_qla_host_t *vha;
1360 vha = sp->vha;
1361 ha = vha->hw;
1370 cmd_pkt->vp_index = sp->vha->vp_idx;
1552 struct scsi_qla_host *vha = sp->vha;
1553 struct qla_hw_data *ha = vha->hw;
1559 req = vha->req;
1566 if (vha->marker_needed != 0) {
1567 if (qla2x00_marker(vha, ha->base_qpair, 0, 0, MK_SYNC_ALL) !=
1570 vha->marker_needed = 0;
1590 req_cnt = qla24xx_calc_iocbs(vha, tot_dsds);
1603 if (qla2x00_check_reg16_for_disconnect(vha, cnt))
1637 cmd_pkt->vp_index = sp->vha->vp_idx;
1671 if (vha->flags.process_response_queue &&
1673 qla24xx_process_response_queue(vha, rsp);
1709 struct scsi_qla_host *vha = sp->vha;
1710 struct qla_hw_data *ha = vha->hw;
1725 req = vha->req;
1732 if (vha->marker_needed != 0) {
1733 if (qla2x00_marker(vha, ha->base_qpair, 0, 0, MK_SYNC_ALL) !=
1736 vha->marker_needed = 0;
1801 sp->iores.iocb_cnt = qla24xx_calc_iocbs(vha, tot_dsds);
1810 if (qla2x00_check_reg16_for_disconnect(vha, cnt))
1875 if (vha->flags.process_response_queue &&
1877 qla24xx_process_response_queue(vha, rsp);
1916 struct scsi_qla_host *vha = sp->fcport->vha;
1917 struct qla_hw_data *ha = vha->hw;
1934 if (vha->marker_needed != 0) {
1935 if (__qla2x00_marker(vha, qpair, 0, 0, MK_SYNC_ALL) !=
1940 vha->marker_needed = 0;
1957 req_cnt = qla24xx_calc_iocbs(vha, tot_dsds);
1970 if (qla2x00_check_reg16_for_disconnect(vha, cnt))
2004 cmd_pkt->vp_index = sp->fcport->vha->vp_idx;
2038 if (vha->flags.process_response_queue &&
2040 qla24xx_process_response_queue(vha, rsp);
2077 struct scsi_qla_host *vha = sp->fcport->vha;
2078 struct qla_hw_data *ha = vha->hw;
2115 if (vha->marker_needed != 0) {
2116 if (__qla2x00_marker(vha, qpair, 0, 0, MK_SYNC_ALL) !=
2121 vha->marker_needed = 0;
2183 sp->iores.iocb_cnt = qla24xx_calc_iocbs(vha, tot_dsds);
2192 if (qla2x00_check_reg16_for_disconnect(vha, cnt))
2256 if (vha->flags.process_response_queue &&
2258 qla24xx_process_response_queue(vha, rsp);
2284 scsi_qla_host_t *vha = qpair->vha;
2285 struct qla_hw_data *ha = vha->hw;
2319 qla_schedule_eeh_work(vha);
2335 ql_log(ql_log_warn, vha, 0x700b,
2368 scsi_qla_host_t *vha = qpair->vha;
2370 if (qla2x00_reset_active(vha))
2377 qla2x00_alloc_iocbs(struct scsi_qla_host *vha, srb_t *sp)
2379 return __qla2x00_alloc_iocbs(vha->hw->base_qpair, sp);
2391 if (sp->vha->flags.nvme_first_burst)
2394 if (sp->vha->flags.nvme2_enabled) {
2411 logio->vp_index = sp->vha->vp_idx;
2441 logio->vp_index = sp->vha->vp_idx;
2447 struct qla_hw_data *ha = sp->vha->hw;
2465 mbx->mb9 = cpu_to_le16(sp->vha->vp_idx);
2488 logio->vp_index = sp->vha->vp_idx;
2494 struct qla_hw_data *ha = sp->vha->hw;
2505 mbx->mb9 = cpu_to_le16(sp->vha->vp_idx);
2515 logio->vp_index = sp->vha->vp_idx;
2521 struct qla_hw_data *ha = sp->vha->hw;
2536 mbx->mb9 = cpu_to_le16(sp->vha->vp_idx);
2545 scsi_qla_host_t *vha = fcport->vha;
2546 struct qla_hw_data *ha = vha->hw;
2562 tsk->vp_index = fcport->vha->vp_idx;
2604 if (IS_QLAFX00(sp->vha->hw) && sp->type == SRB_FXIOCB_DCMD)
2616 dma_free_coherent(&sp->vha->hw->pdev->dev, DMA_POOL_SIZE,
2629 struct scsi_qla_host *vha = sp->vha;
2634 ql_dbg(ql_dbg_io, vha, 0x3069,
2642 ql_dbg(ql_dbg_io, vha, 0x3070,
2654 ql_dbg(ql_dbg_io, vha, 0x3071,
2663 struct scsi_qla_host *vha = sp->vha;
2665 ql_dbg(ql_dbg_io, vha, 0x3072,
2674 qla24xx_els_dcmd_iocb(scsi_qla_host_t *vha, int els_opcode,
2680 struct qla_hw_data *ha = vha->hw;
2684 fcport = qla2x00_alloc_fcport(vha, GFP_KERNEL);
2686 ql_log(ql_log_info, vha, 0x70e5, "fcport allocation failed\n");
2693 sp = qla2x00_get_sp(vha, fcport, GFP_KERNEL);
2696 ql_log(ql_log_info, vha, 0x70e6,
2707 ql_dbg(ql_dbg_io, vha, 0x3073, "portid=%02x%02x%02x done\n",
2733 logo_pyld.s_id[0] = vha->d_id.b.al_pa;
2734 logo_pyld.s_id[1] = vha->d_id.b.area;
2735 logo_pyld.s_id[2] = vha->d_id.b.domain;
2737 memcpy(&logo_pyld.wwpn, vha->port_name, WWN_SIZE);
2741 ql_dbg(ql_dbg_disc + ql_dbg_buffer, vha, 0x3075, "LOGO buffer:");
2742 ql_dump_buffer(ql_dbg_disc + ql_dbg_buffer, vha, 0x010a,
2753 ql_dbg(ql_dbg_io, vha, 0x3074,
2768 scsi_qla_host_t *vha = sp->vha;
2778 els_iocb->vp_index = vha->vp_idx;
2787 els_iocb->s_id[1] = vha->d_id.b.al_pa;
2788 els_iocb->s_id[2] = vha->d_id.b.area;
2789 els_iocb->s_id[0] = vha->d_id.b.domain;
2792 if (vha->hw->flags.edif_enabled)
2806 ql_dbg(ql_dbg_io + ql_dbg_buffer, vha, 0x3073,
2808 ql_dump_buffer(ql_log_info, vha, 0x0109,
2821 ql_dbg(ql_dbg_io + ql_dbg_buffer, vha, 0x3076,
2823 ql_dump_buffer(ql_log_info, vha, 0x010b,
2828 sp->vha->qla_stats.control_requests++;
2836 struct scsi_qla_host *vha = sp->vha;
2840 ql_dbg(ql_dbg_io + ql_dbg_disc, vha, 0x3069,
2846 ql_dbg(ql_dbg_io, vha, 0x3070,
2862 void qla2x00_els_dcmd2_free(scsi_qla_host_t *vha, struct els_plogi *els_plogi)
2865 dma_free_coherent(&vha->hw->pdev->dev,
2871 dma_free_coherent(&vha->hw->pdev->dev,
2881 struct scsi_qla_host *vha = sp->vha;
2889 ql_dbg(ql_dbg_disc, vha, 0x3072,
2896 fcport->chip_reset = vha->hw->base_qpair->chip_reset;
2907 qla_handle_els_plogi_done(vha, &ea);
2914 qlt_find_sess_invalidate_other(vha,
2927 ql_dbg(ql_dbg_disc, vha, 0x20ed,
2933 ql_dbg(ql_dbg_disc, vha, 0x20ed,
2939 set_bit(lid, vha->hw->loop_id_map);
2954 ql_dbg(ql_dbg_disc, vha, 0x20ec,
2959 vha->hw->loop_id_map);
2961 qla24xx_post_gnl_work(vha, fcport);
2965 vha->hw->exch_starvation++;
2966 if (vha->hw->exch_starvation > 5) {
2967 ql_log(ql_log_warn, vha, 0xd046,
2969 vha->hw->exch_starvation = 0;
2971 &vha->dpc_flags);
2972 qla2xxx_wake_dpc(vha);
2977 ql_dbg(ql_dbg_disc, vha, 0x20eb,
2989 ql_dbg(ql_dbg_disc, vha, 0x20eb,
2999 e = qla2x00_alloc_work(vha, QLA_EVT_UNMAP);
3003 qla2x00_els_dcmd2_free(vha, &elsio->u.els_plogi);
3009 qla2x00_post_work(vha, e);
3014 qla24xx_els_dcmd2_iocb(scsi_qla_host_t *vha, int els_opcode,
3019 struct qla_hw_data *ha = vha->hw;
3026 sp = qla2x00_get_sp(vha, fcport, GFP_KERNEL);
3028 ql_log(ql_log_info, vha, 0x70e6,
3037 ql_dbg(ql_dbg_io, vha, 0x3073,
3070 ql_dbg(ql_dbg_io, vha, 0x3073, "PLOGI %p %p\n", ptr, resp_ptr);
3081 if (els_opcode == ELS_DCMD_PLOGI && DBELL_ACTIVE(vha)) {
3087 ql_dbg(ql_dbg_disc + ql_dbg_buffer, vha, 0x3073, "PLOGI buffer:\n");
3088 ql_dump_buffer(ql_dbg_disc + ql_dbg_buffer, vha, 0x0109,
3097 ql_dbg(ql_dbg_disc, vha, 0x3074,
3100 fcport->d_id.b24, vha->d_id.b24);
3114 qla2x00_els_dcmd2_free(vha, &elsio->u.els_plogi);
3122 void qla_els_pt_iocb(struct scsi_qla_host *vha,
3143 els_iocb->s_id[1] = vha->d_id.b.al_pa;
3144 els_iocb->s_id[2] = vha->d_id.b.area;
3145 els_iocb->s_id[0] = vha->d_id.b.domain;
3171 els_iocb->vp_index = sp->vha->vp_idx;
3198 sp->vha->qla_stats.control_requests++;
3209 scsi_qla_host_t *vha = sp->vha;
3210 struct qla_hw_data *ha = vha->hw;
3253 cont_pkt = qla2x00_prep_cont_type1_iocb(vha,
3254 vha->hw->req_q_map[0]);
3265 sp->vha->qla_stats.control_requests++;
3276 scsi_qla_host_t *vha = sp->vha;
3277 struct qla_hw_data *ha = vha->hw;
3288 ct_iocb->vp_index = sp->vha->vp_idx;
3312 vha, ha->req_q_map[0]);
3331 cont_pkt = qla2x00_prep_cont_type1_iocb(vha,
3366 struct scsi_qla_host *vha = sp->vha;
3367 struct qla_hw_data *ha = vha->hw;
3375 req = vha->req;
3384 if (vha->marker_needed != 0) {
3385 if (qla2x00_marker(vha, ha->base_qpair,
3387 ql_log(ql_log_warn, vha, 0x300c,
3391 vha->marker_needed = 0;
3420 ql_dbg(ql_dbg_io, vha, 0x300d,
3435 ql_log(ql_log_fatal, vha, 0x300e,
3445 ql_log(ql_log_fatal, vha, 0x300f,
3475 ql_log(ql_log_fatal, vha, 0x3011,
3490 ql_log(ql_log_warn, vha, 0x3012,
3515 cmd_pkt->vp_index = sp->vha->vp_idx;
3559 req_cnt = qla24xx_calc_iocbs(vha, tot_dsds);
3586 cmd_pkt->vp_index = sp->vha->vp_idx;
3646 if (vha->flags.process_response_queue &&
3648 qla24xx_process_response_queue(vha, rsp);
3672 scsi_qla_host_t *vha = sp->vha;
3689 abt_iocb->vp_index = vha->vp_idx;
3717 qla24xx_prep_ms_iocb(sp->vha, &sp->u.iocb_cmd.u.ctarg);
3750 sp->vha->hw->flags.edif_enabled) {
3751 ql_dbg(ql_dbg_disc, sp->vha, 0x3074,
3771 cmd_pkt->vp_index = sp->fcport->vha->vp_idx;
3825 logio->vp_index = sp->fcport->vha->vp_idx;
3905 scsi_qla_host_t *vha = sp->vha;
3906 struct qla_hw_data *ha = vha->hw;
3911 if (vha->hw->flags.eeh_busy)
3924 ql_log(ql_log_warn, vha, 0x700c,
3948 qla_els_pt_iocb(sp->vha, pkt, &sp->u.bsg_cmd.u.els_arg);
4022 qla2x00_start_iocbs(vha, qp->req);
4031 qla25xx_build_bidir_iocb(srb_t *sp, struct scsi_qla_host *vha,
4058 cmd_pkt->timeout = cpu_to_le16(qla2x00_get_async_timeout(vha) + 2);
4060 vha->bidi_stats.transfer_bytes += req_data_len;
4061 vha->bidi_stats.io_count++;
4063 vha->qla_stats.output_bytes += req_data_len;
4064 vha->qla_stats.output_requests++;
4083 cont_pkt = qla2x00_prep_cont_type1_iocb(vha, vha->req);
4105 cont_pkt = qla2x00_prep_cont_type1_iocb(vha, vha->req);
4118 qla2x00_start_bidir(srb_t *sp, struct scsi_qla_host *vha, uint32_t tot_dsds)
4121 struct qla_hw_data *ha = vha->hw;
4135 req = vha->req;
4138 if (vha->marker_needed != 0) {
4139 if (qla2x00_marker(vha, ha->base_qpair,
4142 vha->marker_needed = 0;
4155 req_cnt = qla24xx_calc_iocbs(vha, tot_dsds);
4163 if (qla2x00_check_reg16_for_disconnect(vha, cnt))
4186 /* Set NPORT-ID (of vha)*/
4187 cmd_pkt->nport_handle = cpu_to_le16(vha->self_login_loop_id);
4188 cmd_pkt->port_id[0] = vha->d_id.b.al_pa;
4189 cmd_pkt->port_id[1] = vha->d_id.b.area;
4190 cmd_pkt->port_id[2] = vha->d_id.b.domain;
4192 qla25xx_build_bidir_iocb(sp, vha, cmd_pkt, tot_dsds);
4202 qla2x00_start_iocbs(vha, req);
4229 struct scsi_qla_host *vha = sp->fcport->vha;
4230 struct qla_hw_data *ha = vha->hw;
4250 if (vha->marker_needed != 0) {
4251 if (__qla2x00_marker(vha, qpair, 0, 0, MK_SYNC_ALL) != QLA_SUCCESS) {
4255 vha->marker_needed = 0;
4275 req_cnt = qla24xx_calc_iocbs(vha, tot_dsds);
4286 ql_dbg(ql_dbg_io, vha, 0x3028,
4300 ql_log(ql_log_fatal, vha, 0x3029,
4310 ql_log(ql_log_fatal, vha, 0x302a,
4326 if (qla2x00_check_reg16_for_disconnect(vha, cnt))
4344 ql_log(ql_log_fatal, vha, 0x3031,
4361 ql_log(ql_log_warn, vha, 0x3033,
4392 cmd_pkt->vp_index = sp->vha->vp_idx;
4446 if (vha->flags.process_response_queue &&
4448 qla24xx_process_response_queue(vha, rsp);