Lines Matching refs:vha

28 	ql_dbg(ql_dbg_user, sp->vha, 0x7009,
42 struct qla_hw_data *ha = sp->vha->hw;
87 qla24xx_fcp_prio_cfg_valid(scsi_qla_host_t *vha,
103 ql_dbg(ql_dbg_user, vha, 0x7051,
110 ql_dbg(ql_dbg_user, vha, 0x7052,
127 ql_dbg(ql_dbg_user, vha, 0x7053,
132 ql_dbg(ql_dbg_user, vha, 0x7054,
146 scsi_qla_host_t *vha = shost_priv(host);
147 struct qla_hw_data *ha = vha->hw;
171 qla24xx_update_all_fcp_prio(vha);
186 qla24xx_update_all_fcp_prio(vha);
224 ql_log(ql_log_warn, vha, 0x7050,
240 if (!qla24xx_fcp_prio_cfg_valid(vha, ha->fcp_prio_cfg, 1)) {
254 qla24xx_update_all_fcp_prio(vha);
275 scsi_qla_host_t *vha;
292 vha = shost_priv(host);
293 ha = vha->hw;
297 vha = shost_priv(host);
298 ha = vha->hw;
302 return qla_edif_process_els(vha, bsg_job);
305 if (!vha->flags.online) {
306 ql_log(ql_log_warn, vha, 0x7005, "Host not online.\n");
313 ql_dbg(ql_dbg_user, vha, 0x7001,
322 ql_dbg(ql_dbg_user, vha, 0x7002,
337 ql_dbg(ql_dbg_user, vha, 0x7003,
349 fcport = qla2x00_alloc_fcport(vha, GFP_KERNEL);
357 fcport->vha = vha;
390 ql_log(ql_log_warn, vha, 0x7008,
400 sp = qla2x00_get_sp(vha, fcport, GFP_KERNEL);
416 ql_dbg(ql_dbg_user, vha, 0x700a,
424 ql_log(ql_log_warn, vha, 0x700e,
466 scsi_qla_host_t *vha = shost_priv(host);
467 struct qla_hw_data *ha = vha->hw;
478 ql_log(ql_log_warn, vha, 0x700f,
487 ql_log(ql_log_warn, vha, 0x7010,
495 ql_log(ql_log_warn, vha, 0x7011,
503 if (!vha->flags.online) {
504 ql_log(ql_log_warn, vha, 0x7012,
518 loop_id = vha->mgmt_svr_loop_id;
521 ql_dbg(ql_dbg_user, vha, 0x7013,
532 fcport = qla2x00_alloc_fcport(vha, GFP_KERNEL);
534 ql_log(ql_log_warn, vha, 0x7014,
541 fcport->vha = vha;
548 sp = qla2x00_get_sp(vha, fcport, GFP_KERNEL);
550 ql_log(ql_log_warn, vha, 0x7015,
563 ql_dbg(ql_dbg_user, vha, 0x7016,
572 ql_log(ql_log_warn, vha, 0x7017,
593 qla81xx_reset_loopback_mode(scsi_qla_host_t *vha, uint16_t *config,
599 struct qla_hw_data *ha = vha->hw;
610 ql_dbg(ql_dbg_user, vha, 0x70bf, "new_config[0]=%02x\n",
617 ret = qla81xx_set_port_config(vha, new_config);
619 ql_log(ql_log_warn, vha, 0x7025,
630 ql_dbg(ql_dbg_user, vha, 0x7026,
637 ql_dbg(ql_dbg_user, vha, 0x7027,
643 ql_dbg(ql_dbg_user, vha, 0x70c5,
649 ql_dbg(ql_dbg_user, vha, 0x70c6,
664 qla81xx_set_loopback_mode(scsi_qla_host_t *vha, uint16_t *config,
670 struct qla_hw_data *ha = vha->hw;
679 ql_dbg(ql_dbg_user, vha, 0x70be,
685 ret = qla81xx_set_port_config(vha, new_config);
687 ql_log(ql_log_warn, vha, 0x7021,
708 ql_dbg(ql_dbg_user, vha, 0x7022,
710 ret = qla81xx_reset_loopback_mode(vha, new_config, 0, 0);
716 qla2xxx_dump_fw(vha);
717 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
722 ql_dbg(ql_dbg_user, vha, 0x70c3,
727 ql_dbg(ql_dbg_user, vha, 0x7023,
744 scsi_qla_host_t *vha = shost_priv(host);
745 struct qla_hw_data *ha = vha->hw;
760 if (!vha->flags.online) {
761 ql_log(ql_log_warn, vha, 0x7019, "Host is not online.\n");
772 ql_log(ql_log_warn, vha, 0x701a,
782 ql_log(ql_log_warn, vha, 0x701b,
790 ql_log(ql_log_warn, vha, 0x701c,
803 ql_log(ql_log_warn, vha, 0x701d,
812 ql_log(ql_log_warn, vha, 0x7004,
830 if (atomic_read(&vha->loop_state) == LOOP_READY &&
837 ql_dbg(ql_dbg_user, vha, 0x701e,
840 rval = qla2x00_echo_test(vha, &elreq, response);
846 if (qla81xx_get_port_config(vha, config)) {
847 ql_log(ql_log_warn, vha, 0x701f,
854 ql_dbg(ql_dbg_user, vha, 0x70c4,
861 ql_dbg(ql_dbg_user, vha, 0x70c0,
866 rval = qla81xx_set_loopback_mode(vha,
869 rval = qla81xx_reset_loopback_mode(vha,
872 rval = qla81xx_set_loopback_mode(vha, config,
881 ql_dbg(ql_dbg_user, vha, 0x7028,
885 rval = qla2x00_loopback_test(vha, &elreq, response);
889 ql_log(ql_log_warn, vha, 0x7029,
891 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
892 qla2xxx_wake_dpc(vha);
893 qla2x00_wait_for_chip_reset(vha);
896 if (qla81xx_restart_mpi_firmware(vha) !=
898 ql_log(ql_log_warn, vha, 0x702a,
913 ret = qla81xx_reset_loopback_mode(vha,
921 qla2xxx_dump_fw(vha);
923 &vha->dpc_flags);
930 ql_dbg(ql_dbg_user, vha, 0x702b,
933 rval = qla2x00_loopback_test(vha, &elreq, response);
938 ql_log(ql_log_warn, vha, 0x702c,
945 ql_dbg(ql_dbg_user, vha, 0x702d,
987 scsi_qla_host_t *vha = shost_priv(host);
988 struct qla_hw_data *ha = vha->hw;
993 ql_dbg(ql_dbg_user, vha, 0x702f, "Not 84xx, exiting.\n");
999 rval = qla84xx_reset_chip(vha, flag == A84_ISSUE_RESET_DIAG_FW);
1002 ql_log(ql_log_warn, vha, 0x7030,
1007 ql_dbg(ql_dbg_user, vha, 0x7031,
1023 scsi_qla_host_t *vha = shost_priv(host);
1024 struct qla_hw_data *ha = vha->hw;
1036 ql_dbg(ql_dbg_user, vha, 0x7032,
1044 ql_log(ql_log_warn, vha, 0x7033,
1050 ql_log(ql_log_warn, vha, 0x7034,
1062 ql_log(ql_log_warn, vha, 0x7035,
1073 ql_log(ql_log_warn, vha, 0x7036,
1097 rval = qla2x00_issue_iocb_timeout(vha, mn, mn_dma, 0, 120);
1100 ql_log(ql_log_warn, vha, 0x7037,
1105 ql_dbg(ql_dbg_user, vha, 0x7038,
1133 scsi_qla_host_t *vha = shost_priv(host);
1134 struct qla_hw_data *ha = vha->hw;
1145 ql_log(ql_log_warn, vha, 0x703a,
1152 ql_log(ql_log_warn, vha, 0x703c,
1167 ql_log(ql_log_warn, vha, 0x703d,
1176 ql_log(ql_log_warn, vha, 0x703e,
1189 ql_log(ql_log_warn, vha, 0x703f,
1218 ql_log(ql_log_warn, vha, 0x7040,
1227 ql_log(ql_log_warn, vha, 0x7041,
1239 ql_log(ql_log_warn, vha, 0x7042,
1277 rval = qla2x00_issue_iocb(vha, mn, mn_dma, 0);
1280 ql_log(ql_log_warn, vha, 0x7043,
1286 ql_dbg(ql_dbg_user, vha, 0x7044,
1329 scsi_qla_host_t *vha = shost_priv(host);
1337 if (!IS_IIDMA_CAPABLE(vha->hw)) {
1338 ql_log(ql_log_info, vha, 0x7046, "iiDMA not supported.\n");
1344 ql_log(ql_log_warn, vha, 0x7048,
1349 list_for_each_entry(fcport, &vha->vp_fcports, list) {
1362 ql_log(ql_log_warn, vha, 0x7049,
1368 ql_log(ql_log_warn, vha, 0x704a,
1374 ql_log(ql_log_warn, vha, 0x704b,
1380 rval = qla2x00_set_idma_speed(vha, fcport->loop_id,
1383 rval = qla2x00_get_idma_speed(vha, fcport->loop_id,
1387 ql_log(ql_log_warn, vha, 0x704c,
1413 qla2x00_optrom_setup(struct bsg_job *bsg_job, scsi_qla_host_t *vha,
1419 struct qla_hw_data *ha = vha->hw;
1426 ql_log(ql_log_warn, vha, 0x7055,
1432 ql_log(ql_log_info, vha, 0x7056,
1438 ql_dbg(ql_dbg_user, vha, 0x7057, "is_update=%d.\n", is_update);
1450 ql_log(ql_log_warn, vha, 0x7058,
1471 ql_log(ql_log_warn, vha, 0x7059,
1487 scsi_qla_host_t *vha = shost_priv(host);
1488 struct qla_hw_data *ha = vha->hw;
1495 rval = qla2x00_optrom_setup(bsg_job, vha, 0);
1501 ha->isp_ops->read_optrom(vha, ha->optrom_buffer,
1524 scsi_qla_host_t *vha = shost_priv(host);
1525 struct qla_hw_data *ha = vha->hw;
1529 rval = qla2x00_optrom_setup(bsg_job, vha, 1);
1542 rval = ha->isp_ops->write_optrom(vha, ha->optrom_buffer,
1565 scsi_qla_host_t *vha = shost_priv(host);
1566 struct qla_hw_data *ha = vha->hw;
1588 rval = qla2x00_write_sfp(vha, sfp_dma, sfp,
1618 scsi_qla_host_t *vha = shost_priv(host);
1619 struct qla_hw_data *ha = vha->hw;
1635 rval = qla2x00_read_sfp(vha, sfp_dma, sfp,
1669 scsi_qla_host_t *vha = shost_priv(host);
1670 struct qla_hw_data *ha = vha->hw;
1687 rval = qla2x00_write_sfp(vha, sfp_dma, sfp,
1716 scsi_qla_host_t *vha = shost_priv(host);
1717 struct qla_hw_data *ha = vha->hw;
1734 rval = qla2x00_write_sfp(vha, sfp_dma, sfp,
1762 scsi_qla_host_t *vha = shost_priv(host);
1763 struct qla_hw_data *ha = vha->hw;
1779 rval = qla2x00_read_sfp(vha, sfp_dma, sfp,
1812 scsi_qla_host_t *vha = shost_priv(host);
1813 struct qla_hw_data *ha = vha->hw;
1825 ql_log(ql_log_warn, vha, 0x70a0,
1831 if (test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags) ||
1832 test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) ||
1833 test_bit(ISP_ABORT_RETRY, &vha->dpc_flags)) {
1839 if (!vha->flags.online) {
1840 ql_log(ql_log_warn, vha, 0x70a1,
1847 if (vha->device_flags & DFLG_NO_CABLE) {
1848 ql_log(ql_log_warn, vha, 0x70a2,
1856 ql_log(ql_log_warn, vha, 0x70a3,
1864 ql_log(ql_log_warn, vha, 0x70a4,
1871 if (vha->self_login_loop_id == 0) {
1873 vha->bidir_fcport.vha = vha;
1874 vha->bidir_fcport.d_id.b.al_pa = vha->d_id.b.al_pa;
1875 vha->bidir_fcport.d_id.b.area = vha->d_id.b.area;
1876 vha->bidir_fcport.d_id.b.domain = vha->d_id.b.domain;
1877 vha->bidir_fcport.loop_id = vha->loop_id;
1879 if (qla2x00_fabric_login(vha, &(vha->bidir_fcport), &nextlid)) {
1880 ql_log(ql_log_warn, vha, 0x70a7,
1882 vha->bidir_fcport.d_id.b24);
1887 vha->self_login_loop_id = nextlid - 1;
1893 vha->bidir_fcport.loop_id = vha->self_login_loop_id;
1916 ql_dbg(ql_dbg_user, vha, 0x70a9,
1931 ql_log(ql_log_warn, vha, 0x70aa,
1937 sp = qla2x00_get_sp(vha, &(vha->bidir_fcport), GFP_KERNEL);
1939 ql_dbg(ql_dbg_user, vha, 0x70ac,
1954 rval = qla2x00_start_bidir(sp, vha, tot_dsds);
1990 scsi_qla_host_t *vha = shost_priv(host);
1991 struct qla_hw_data *ha = vha->hw;
2004 ql_dump_buffer(ql_dbg_user + ql_dbg_verbose , vha, 0x70cf,
2007 if (!vha->flags.online) {
2008 ql_log(ql_log_warn, vha, 0x70d0,
2019 ql_log(ql_log_warn, vha, 0x70c7,
2031 ql_log(ql_log_warn, vha, 0x70c8,
2038 ql_dbg(ql_dbg_user, vha, 0x70c9,
2048 fcport = qla2x00_alloc_fcport(vha, GFP_KERNEL);
2050 ql_log(ql_log_warn, vha, 0x70ca,
2057 sp = qla2x00_get_sp(vha, fcport, GFP_KERNEL);
2059 ql_log(ql_log_warn, vha, 0x70cb,
2066 fcport->vha = vha;
2076 ql_dbg(ql_dbg_user, vha, 0x70cc,
2082 ql_log(ql_log_warn, vha, 0x70cd,
2113 scsi_qla_host_t *vha = shost_priv(host);
2124 rval = qla2x00_write_serdes_word(vha, sr.addr, sr.val);
2128 rval = qla2x00_read_serdes_word(vha, sr.addr, &sr.val);
2134 ql_dbg(ql_dbg_user, vha, 0x708c,
2155 scsi_qla_host_t *vha = shost_priv(host);
2166 rval = qla8044_write_serdes_word(vha, sr.addr, sr.val);
2170 rval = qla8044_read_serdes_word(vha, sr.addr, &sr.val);
2176 ql_dbg(ql_dbg_user, vha, 0x7020,
2197 scsi_qla_host_t *vha = shost_priv(host);
2198 struct qla_hw_data *ha = vha->hw;
2229 scsi_qla_host_t *vha = shost_priv(host);
2230 struct qla_hw_data *ha = vha->hw;
2275 scsi_qla_host_t *vha = shost_priv(host);
2276 struct qla_hw_data *ha = vha->hw;
2287 if (vha->flags.bbcr_enable)
2293 rval = qla2x00_get_adapter_id(vha, &loop_id, &al_pa,
2302 state = (vha->bbcr >> 12) & 0x1;
2309 bbcr.negotiated_bbscn = (vha->bbcr >> 8) & 0xf;
2312 bbcr.configured_bbscn = vha->bbcr & 0xf;
2335 scsi_qla_host_t *vha = shost_priv(host);
2336 struct qla_hw_data *ha = vha->hw;
2344 if (test_bit(UNLOADING, &vha->dpc_flags))
2350 if (qla2x00_reset_active(vha))
2359 ql_log(ql_log_warn, vha, 0x70e2,
2367 ql_dump_buffer(ql_dbg_user + ql_dbg_verbose, vha, 0x70e5,
2393 scsi_qla_host_t *vha = shost_priv(host);
2397 if (!IS_QLA83XX(vha->hw) && !IS_QLA27XX(vha->hw) &&
2398 !IS_QLA28XX(vha->hw))
2403 ql_log(ql_log_warn, vha, 0x70db,
2412 vha, dd->buf, sizeof(dd->buf), dd->options);
2437 scsi_qla_host_t *vha = shost_priv(host);
2444 if (!IS_DPORT_CAPABLE(vha->hw))
2458 vha->dport_status & DPORT_DIAG_IN_PROGRESS) {
2465 if (vha->dport_status & DPORT_DIAG_CHIP_RESET_IN_PROGRESS &&
2468 vha->dport_status &= ~DPORT_DIAG_CHIP_RESET_IN_PROGRESS;
2472 if (vha->dport_status & DPORT_DIAG_CHIP_RESET_IN_PROGRESS &&
2479 rval = qla26xx_dport_diagnostics_v2(vha, dd, mcp);
2488 vha->dport_status |= DPORT_DIAG_IN_PROGRESS;
2490 dd->mbx1 = le16_to_cpu(vha->dport_data[1]);
2491 dd->mbx2 = le16_to_cpu(vha->dport_data[2]);
2518 scsi_qla_host_t *vha = shost_priv(fc_bsg_to_shost(bsg_job));
2520 struct qla_hw_data *ha = vha->hw;
2524 qla27xx_get_active_image(vha, &active_regions);
2531 qla28xx_get_aux_images(vha, &active_regions);
2539 ql_dbg(ql_dbg_user, vha, 0x70e1,
2541 __func__, vha->host_no, regions.global_image,
2561 scsi_qla_host_t *vha = shost_priv(fc_bsg_to_shost(bsg_job));
2568 if (!vha->flags.online) {
2569 ql_log(ql_log_warn, vha, 0x0000, "Host is not online.\n");
2576 ql_log(ql_log_warn, vha, 0x0000, "req_data_len invalid.\n");
2582 ql_log(ql_log_warn, vha, 0x0000, "req_data memory allocation failure.\n");
2593 ret = qla2xxx_stop_stats(vha->host, req_data->stat_type);
2596 ret = qla2xxx_start_stats(vha->host, req_data->stat_type);
2599 ret = qla2xxx_reset_stats(vha->host, req_data->stat_type);
2602 ql_log(ql_log_warn, vha, 0x0000, "Invalid action.\n");
2630 scsi_qla_host_t *vha = shost_priv(fc_bsg_to_shost(bsg_job));
2646 ql_log(ql_log_warn, vha, 0x0000, "req_data_len invalid.\n");
2652 ql_log(ql_log_warn, vha, 0x0000, "req_data memory allocation failure.\n");
2665 tgt_num = qla2x00_get_num_tgts(vha);
2721 qla2xxx_find_rport(scsi_qla_host_t *vha, uint32_t tgt_num)
2725 list_for_each_entry(fcport, &vha->vp_fcports, list) {
2735 scsi_qla_host_t *vha = shost_priv(fc_bsg_to_shost(bsg_job));
2744 if (!vha->flags.online) {
2745 ql_log(ql_log_warn, vha, 0x0000, "Host is not online.\n");
2752 ql_log(ql_log_warn, vha, 0x0000, "req_data_len invalid.\n");
2758 ql_log(ql_log_warn, vha, 0x0000, "req_data memory allocation failure.\n");
2793 rport = qla2xxx_find_rport(vha, req_data->tgt_id);
2795 ql_log(ql_log_warn, vha, 0x0000, "target %d not found.\n", req_data->tgt_id);
2824 scsi_qla_host_t *vha = shost_priv(fc_bsg_to_shost(bsg_job));
2834 ql_log(ql_log_warn, vha, 0x0000, "req_data_len invalid.\n");
2840 ql_log(ql_log_warn, vha, 0x0000, "req_data memory allocation failure.\n");
2850 ret = qla2xxx_enable_port(vha->host);
2853 ret = qla2xxx_disable_port(vha->host);
2856 ql_log(ql_log_warn, vha, 0x0000, "Invalid action.\n");
2880 qla2x00_process_vendor_specific(struct scsi_qla_host *vha, struct bsg_job *bsg_job)
2884 ql_dbg(ql_dbg_edif, vha, 0x911b, "%s FC_BSG_HST_VENDOR cmd[0]=0x%x\n",
2992 scsi_qla_host_t *vha;
3002 vha = shost_priv(host);
3005 vha = shost_priv(host);
3013 if (vha->hw->flags.port_isolated) {
3019 if (qla2x00_chip_is_down(vha)) {
3020 ql_dbg(ql_dbg_user, vha, 0x709f,
3027 if (test_bit(PFLG_DRIVER_REMOVING, &vha->pci_flags)) {
3033 ql_dbg(ql_dbg_user + ql_dbg_verbose, vha, 0x7000,
3046 ret = qla2x00_process_vendor_specific(vha, bsg_job);
3052 ql_log(ql_log_warn, vha, 0x705a, "Unsupported BSG request.\n");
3056 ql_dbg(ql_dbg_user + ql_dbg_verbose, vha, 0x7000,
3066 scsi_qla_host_t *vha = shost_priv(fc_bsg_to_shost(bsg_job));
3067 struct qla_hw_data *ha = vha->hw;
3073 ql_log(ql_log_info, vha, 0x708b, "%s CMD timeout. bsg ptr %p.\n",
3077 ql_log(ql_log_info, vha, 0x9007,
3079 qla_pci_set_eeh_busy(vha);
3101 ql_log(ql_log_warn, vha, 0x7089,
3105 ql_dbg(ql_dbg_user, vha, 0x708a,
3116 ql_log(ql_log_info, vha, 0x708b, "SRB not found to abort.\n");
3130 scsi_qla_host_t *vha = shost_priv(fc_bsg_to_shost(bsg_job));
3138 ql_log(ql_log_warn, vha, 0xf0a3, "req_data_len invalid.\n");
3143 ql_log(ql_log_warn, vha, 0xf0a4,
3151 ret = qla_mailbox_passthru(vha, req_data->mbx_in, req_data->mbx_out);