Lines Matching defs:vha

25 	struct scsi_qla_host *vha = sp->vha;
32 vha->qla_stats.output_bytes += scsi_bufflen(cmd);
33 vha->qla_stats.output_requests++;
36 vha->qla_stats.input_bytes += scsi_bufflen(cmd);
37 vha->qla_stats.input_requests++;
88 * @vha: HA context
93 qla2x00_prep_cont_type0_iocb(struct scsi_qla_host *vha)
96 struct req_que *req = vha->req;
116 * @vha: HA context
122 qla2x00_prep_cont_type1_iocb(scsi_qla_host_t *vha, struct req_que *req)
138 put_unaligned_le32(IS_QLAFX00(vha->hw) ? CONTINUE_A64_TYPE_FX00 :
195 scsi_qla_host_t *vha;
211 vha = sp->vha;
228 cont_pkt = qla2x00_prep_cont_type0_iocb(vha);
251 scsi_qla_host_t *vha;
267 vha = sp->vha;
284 cont_pkt = qla2x00_prep_cont_type1_iocb(vha, vha->req);
325 scsi_qla_host_t *vha;
339 vha = sp->vha;
340 ha = vha->hw;
349 if (vha->marker_needed != 0) {
350 if (qla2x00_marker(vha, ha->base_qpair, 0, 0, MK_SYNC_ALL) !=
354 vha->marker_needed = 0;
434 if (vha->flags.process_response_queue &&
452 * @vha: HA context
456 qla2x00_start_iocbs(struct scsi_qla_host *vha, struct req_que *req)
458 struct qla_hw_data *ha = vha->hw;
462 qla82xx_start_iocbs(vha);
495 * @vha: HA context
506 __qla2x00_marker(struct scsi_qla_host *vha, struct qla_qpair *qpair,
512 struct qla_hw_data *ha = vha->hw;
531 mrk24->vp_index = vha->vp_idx;
540 qla2x00_start_iocbs(vha, req);
546 qla2x00_marker(struct scsi_qla_host *vha, struct qla_qpair *qpair,
553 ret = __qla2x00_marker(vha, qpair, loop_id, lun, type);
566 int qla2x00_issue_marker(scsi_qla_host_t *vha, int ha_locked)
569 if (__qla2x00_marker(vha, vha->hw->base_qpair, 0, 0,
573 if (qla2x00_marker(vha, vha->hw->base_qpair, 0, 0,
577 vha->marker_needed = 0;
587 scsi_qla_host_t *vha;
610 vha = sp->vha;
611 ha = vha->hw;
704 scsi_qla_host_t *vha;
721 vha = sp->vha;
749 cont_pkt = qla2x00_prep_cont_type1_iocb(vha, req);
1089 struct scsi_qla_host *vha;
1101 vha = sp->vha;
1104 ql_dbg(ql_dbg_tgt + ql_dbg_verbose, vha, 0xe021,
1108 vha = tc->vha;
1117 ql_dbg(ql_dbg_tgt + ql_dbg_verbose, vha, 0xe021,
1127 ql_dbg(ql_dbg_tgt + ql_dbg_verbose, vha, 0xe022,
1136 vha, 0xe022,
1167 ql_dbg(ql_dbg_tgt + ql_dbg_verbose, vha, 0xe023,
1183 ql_dbg(ql_dbg_tgt, vha, 0xe024,
1195 ql_dbg(ql_dbg_tgt, vha, 0xe024,
1236 ql_dbg(ql_dbg_tgt + ql_dbg_verbose, vha, 0xe025,
1256 ql_dbg(ql_dbg_tgt + ql_dbg_verbose, vha,
1268 ql_dbg(ql_dbg_tgt, vha, 0xe026,
1281 ql_dbg(ql_dbg_tgt, vha, 0xe026,
1319 ql_dbg(ql_dbg_tgt + ql_dbg_verbose, vha, 0xe026,
1335 vha, 0xe027,
1395 scsi_qla_host_t *vha;
1414 vha = sp->vha;
1415 ha = vha->hw;
1424 cmd_pkt->vp_index = sp->vha->vp_idx;
1605 struct scsi_qla_host *vha = sp->vha;
1606 struct qla_hw_data *ha = vha->hw;
1609 req = vha->req;
1615 if (vha->marker_needed != 0) {
1616 if (qla2x00_marker(vha, ha->base_qpair, 0, 0, MK_SYNC_ALL) !=
1619 vha->marker_needed = 0;
1639 req_cnt = qla24xx_calc_iocbs(vha, tot_dsds);
1651 if (qla2x00_check_reg16_for_disconnect(vha, cnt))
1685 cmd_pkt->vp_index = sp->vha->vp_idx;
1751 struct scsi_qla_host *vha = sp->vha;
1752 struct qla_hw_data *ha = vha->hw;
1765 req = vha->req;
1772 if (vha->marker_needed != 0) {
1773 if (qla2x00_marker(vha, ha->base_qpair, 0, 0, MK_SYNC_ALL) !=
1776 vha->marker_needed = 0;
1840 sp->iores.iocb_cnt = qla24xx_calc_iocbs(vha, tot_dsds);
1849 if (qla2x00_check_reg16_for_disconnect(vha, cnt))
1948 struct scsi_qla_host *vha = sp->fcport->vha;
1949 struct qla_hw_data *ha = vha->hw;
1962 if (vha->marker_needed != 0) {
1963 if (__qla2x00_marker(vha, qpair, 0, 0, MK_SYNC_ALL) !=
1968 vha->marker_needed = 0;
1985 req_cnt = qla24xx_calc_iocbs(vha, tot_dsds);
1997 if (qla2x00_check_reg16_for_disconnect(vha, cnt))
2031 cmd_pkt->vp_index = sp->fcport->vha->vp_idx;
2098 struct scsi_qla_host *vha = sp->fcport->vha;
2099 struct qla_hw_data *ha = vha->hw;
2134 if (vha->marker_needed != 0) {
2135 if (__qla2x00_marker(vha, qpair, 0, 0, MK_SYNC_ALL) !=
2140 vha->marker_needed = 0;
2201 sp->iores.iocb_cnt = qla24xx_calc_iocbs(vha, tot_dsds);
2210 if (qla2x00_check_reg16_for_disconnect(vha, cnt))
2273 if (vha->flags.process_response_queue &&
2275 qla24xx_process_response_queue(vha, rsp);
2301 scsi_qla_host_t *vha = qpair->vha;
2302 struct qla_hw_data *ha = vha->hw;
2336 qla_schedule_eeh_work(vha);
2352 ql_log(ql_log_warn, vha, 0x700b,
2385 scsi_qla_host_t *vha = qpair->vha;
2387 if (qla2x00_reset_active(vha))
2394 qla2x00_alloc_iocbs(struct scsi_qla_host *vha, srb_t *sp)
2396 return __qla2x00_alloc_iocbs(vha->hw->base_qpair, sp);
2408 if (sp->vha->flags.nvme_first_burst)
2411 if (sp->vha->flags.nvme2_enabled) {
2425 logio->vp_index = sp->vha->vp_idx;
2449 logio->vp_index = sp->vha->vp_idx;
2455 struct qla_hw_data *ha = sp->vha->hw;
2473 mbx->mb9 = cpu_to_le16(sp->vha->vp_idx);
2496 logio->vp_index = sp->vha->vp_idx;
2502 struct qla_hw_data *ha = sp->vha->hw;
2513 mbx->mb9 = cpu_to_le16(sp->vha->vp_idx);
2523 logio->vp_index = sp->vha->vp_idx;
2529 struct qla_hw_data *ha = sp->vha->hw;
2544 mbx->mb9 = cpu_to_le16(sp->vha->vp_idx);
2553 scsi_qla_host_t *vha = fcport->vha;
2554 struct qla_hw_data *ha = vha->hw;
2556 struct req_que *req = vha->req;
2570 tsk->vp_index = fcport->vha->vp_idx;
2584 if (IS_QLAFX00(sp->vha->hw) && sp->type == SRB_FXIOCB_DCMD)
2596 dma_free_coherent(&sp->vha->hw->pdev->dev, DMA_POOL_SIZE,
2609 struct scsi_qla_host *vha = sp->vha;
2614 ql_dbg(ql_dbg_io, vha, 0x3069,
2622 ql_dbg(ql_dbg_io, vha, 0x3070,
2634 ql_dbg(ql_dbg_io, vha, 0x3071,
2643 struct scsi_qla_host *vha = sp->vha;
2645 ql_dbg(ql_dbg_io, vha, 0x3072,
2654 qla24xx_els_dcmd_iocb(scsi_qla_host_t *vha, int els_opcode,
2660 struct qla_hw_data *ha = vha->hw;
2664 fcport = qla2x00_alloc_fcport(vha, GFP_KERNEL);
2666 ql_log(ql_log_info, vha, 0x70e5, "fcport allocation failed\n");
2671 sp = qla2x00_get_sp(vha, fcport, GFP_KERNEL);
2674 ql_log(ql_log_info, vha, 0x70e6,
2685 ql_dbg(ql_dbg_io, vha, 0x3073, "portid=%02x%02x%02x done\n",
2710 logo_pyld.s_id[0] = vha->d_id.b.al_pa;
2711 logo_pyld.s_id[1] = vha->d_id.b.area;
2712 logo_pyld.s_id[2] = vha->d_id.b.domain;
2714 memcpy(&logo_pyld.wwpn, vha->port_name, WWN_SIZE);
2718 ql_dbg(ql_dbg_disc + ql_dbg_buffer, vha, 0x3075, "LOGO buffer:");
2719 ql_dump_buffer(ql_dbg_disc + ql_dbg_buffer, vha, 0x010a,
2729 ql_dbg(ql_dbg_io, vha, 0x3074,
2743 scsi_qla_host_t *vha = sp->vha;
2753 els_iocb->vp_index = vha->vp_idx;
2762 els_iocb->s_id[1] = vha->d_id.b.al_pa;
2763 els_iocb->s_id[2] = vha->d_id.b.area;
2764 els_iocb->s_id[0] = vha->d_id.b.domain;
2778 ql_dbg(ql_dbg_io + ql_dbg_buffer, vha, 0x3073,
2780 ql_dump_buffer(ql_log_info, vha, 0x0109,
2794 ql_dbg(ql_dbg_io + ql_dbg_buffer, vha, 0x3076,
2796 ql_dump_buffer(ql_log_info, vha, 0x010b,
2801 sp->vha->qla_stats.control_requests++;
2809 struct scsi_qla_host *vha = sp->vha;
2813 ql_dbg(ql_dbg_io + ql_dbg_disc, vha, 0x3069,
2819 ql_dbg(ql_dbg_io, vha, 0x3070,
2835 void qla2x00_els_dcmd2_free(scsi_qla_host_t *vha, struct els_plogi *els_plogi)
2838 dma_free_coherent(&vha->hw->pdev->dev,
2844 dma_free_coherent(&vha->hw->pdev->dev,
2854 struct scsi_qla_host *vha = sp->vha;
2862 ql_dbg(ql_dbg_disc, vha, 0x3072,
2878 qla_handle_els_plogi_done(vha, &ea);
2885 qlt_find_sess_invalidate_other(vha,
2898 ql_dbg(ql_dbg_disc, vha, 0x20ed,
2904 ql_dbg(ql_dbg_disc, vha, 0x20ed,
2910 set_bit(lid, vha->hw->loop_id_map);
2925 ql_dbg(ql_dbg_disc, vha, 0x20ec,
2930 vha->hw->loop_id_map);
2932 qla24xx_post_gnl_work(vha, fcport);
2936 vha->hw->exch_starvation++;
2937 if (vha->hw->exch_starvation > 5) {
2938 ql_log(ql_log_warn, vha, 0xd046,
2940 vha->hw->exch_starvation = 0;
2942 &vha->dpc_flags);
2943 qla2xxx_wake_dpc(vha);
2948 ql_dbg(ql_dbg_disc, vha, 0x20eb,
2960 ql_dbg(ql_dbg_disc, vha, 0x20eb,
2970 e = qla2x00_alloc_work(vha, QLA_EVT_UNMAP);
2974 qla2x00_els_dcmd2_free(vha, &elsio->u.els_plogi);
2979 qla2x00_post_work(vha, e);
2984 qla24xx_els_dcmd2_iocb(scsi_qla_host_t *vha, int els_opcode,
2989 struct qla_hw_data *ha = vha->hw;
2994 sp = qla2x00_get_sp(vha, fcport, GFP_KERNEL);
2996 ql_log(ql_log_info, vha, 0x70e6,
3005 ql_dbg(ql_dbg_io, vha, 0x3073,
3039 ql_dbg(ql_dbg_io, vha, 0x3073, "PLOGI %p %p\n", ptr, resp_ptr);
3049 ql_dbg(ql_dbg_disc + ql_dbg_buffer, vha, 0x3073, "PLOGI buffer:\n");
3050 ql_dump_buffer(ql_dbg_disc + ql_dbg_buffer, vha, 0x0109,
3059 ql_dbg(ql_dbg_disc, vha, 0x3074,
3062 fcport->d_id.b24, vha->d_id.b24);
3076 qla2x00_els_dcmd2_free(vha, &elsio->u.els_plogi);
3095 els_iocb->vp_index = sp->vha->vp_idx;
3122 sp->vha->qla_stats.control_requests++;
3133 scsi_qla_host_t *vha = sp->vha;
3134 struct qla_hw_data *ha = vha->hw;
3177 cont_pkt = qla2x00_prep_cont_type1_iocb(vha,
3178 vha->hw->req_q_map[0]);
3189 sp->vha->qla_stats.control_requests++;
3200 scsi_qla_host_t *vha = sp->vha;
3201 struct qla_hw_data *ha = vha->hw;
3212 ct_iocb->vp_index = sp->vha->vp_idx;
3236 vha, ha->req_q_map[0]);
3255 cont_pkt = qla2x00_prep_cont_type1_iocb(vha,
3290 struct scsi_qla_host *vha = sp->vha;
3291 struct qla_hw_data *ha = vha->hw;
3298 req = vha->req;
3307 if (vha->marker_needed != 0) {
3308 if (qla2x00_marker(vha, ha->base_qpair,
3310 ql_log(ql_log_warn, vha, 0x300c,
3314 vha->marker_needed = 0;
3343 ql_dbg(ql_dbg_io, vha, 0x300d,
3358 ql_log(ql_log_fatal, vha, 0x300e,
3368 ql_log(ql_log_fatal, vha, 0x300f,
3395 ql_log(ql_log_fatal, vha, 0x3010,
3404 ql_log(ql_log_fatal, vha, 0x3011,
3419 ql_log(ql_log_warn, vha, 0x3012,
3444 cmd_pkt->vp_index = sp->vha->vp_idx;
3488 req_cnt = qla24xx_calc_iocbs(vha, tot_dsds);
3515 cmd_pkt->vp_index = sp->vha->vp_idx;
3575 if (vha->flags.process_response_queue &&
3577 qla24xx_process_response_queue(vha, rsp);
3601 scsi_qla_host_t *vha = sp->vha;
3617 abt_iocb->vp_index = vha->vp_idx;
3640 qla24xx_prep_ms_iocb(sp->vha, &sp->u.iocb_cmd.u.ctarg);
3687 cmd_pkt->vp_index = sp->fcport->vha->vp_idx;
3731 logio->vp_index = sp->fcport->vha->vp_idx;
3738 scsi_qla_host_t *vha = sp->vha;
3739 struct qla_hw_data *ha = vha->hw;
3744 if (vha->hw->flags.eeh_busy)
3751 ql_log(ql_log_warn, vha, 0x700c,
3829 qla2x00_start_iocbs(vha, qp->req);
3836 qla25xx_build_bidir_iocb(srb_t *sp, struct scsi_qla_host *vha,
3863 cmd_pkt->timeout = cpu_to_le16(qla2x00_get_async_timeout(vha) + 2);
3865 vha->bidi_stats.transfer_bytes += req_data_len;
3866 vha->bidi_stats.io_count++;
3868 vha->qla_stats.output_bytes += req_data_len;
3869 vha->qla_stats.output_requests++;
3888 cont_pkt = qla2x00_prep_cont_type1_iocb(vha, vha->req);
3910 cont_pkt = qla2x00_prep_cont_type1_iocb(vha, vha->req);
3923 qla2x00_start_bidir(srb_t *sp, struct scsi_qla_host *vha, uint32_t tot_dsds)
3926 struct qla_hw_data *ha = vha->hw;
3940 req = vha->req;
3943 if (vha->marker_needed != 0) {
3944 if (qla2x00_marker(vha, ha->base_qpair,
3947 vha->marker_needed = 0;
3960 req_cnt = qla24xx_calc_iocbs(vha, tot_dsds);
3968 if (qla2x00_check_reg16_for_disconnect(vha, cnt))
3991 /* Set NPORT-ID (of vha)*/
3992 cmd_pkt->nport_handle = cpu_to_le16(vha->self_login_loop_id);
3993 cmd_pkt->port_id[0] = vha->d_id.b.al_pa;
3994 cmd_pkt->port_id[1] = vha->d_id.b.area;
3995 cmd_pkt->port_id[2] = vha->d_id.b.domain;
3997 qla25xx_build_bidir_iocb(sp, vha, cmd_pkt, tot_dsds);
4007 qla2x00_start_iocbs(vha, req);