Lines Matching defs:vha
24 static void qla27xx_process_purex_fpin(struct scsi_qla_host *vha,
26 static struct purex_item *qla24xx_alloc_purex_item(scsi_qla_host_t *vha,
28 static struct purex_item *qla24xx_copy_std_pkt(struct scsi_qla_host *vha,
30 static struct purex_item *qla27xx_copy_fpin_pkt(struct scsi_qla_host *vha,
34 qla27xx_process_purex_fpin(struct scsi_qla_host *vha, struct purex_item *item)
39 ql_dbg(ql_dbg_init + ql_dbg_verbose, vha, 0x508d,
42 ql_dbg(ql_dbg_init + ql_dbg_verbose, vha, 0x508e,
44 ql_dump_buffer(ql_dbg_init + ql_dbg_verbose, vha, 0x508f,
47 fc_host_fpin_rcv(vha->host, pkt_size, (char *)pkt);
59 qla24xx_process_abts(struct scsi_qla_host *vha, struct purex_item *pkt)
63 struct qla_hw_data *ha = vha->hw;
70 ql_dbg(ql_dbg_init, vha, 0x0286, "%s: entered.\n", __func__);
72 ql_log(ql_log_warn, vha, 0x0287,
76 ql_dbg(ql_dbg_init + ql_dbg_verbose, vha, 0x0287,
78 ql_dump_buffer(ql_dbg_init + ql_dbg_verbose, vha, 0x0287,
84 ql_log(ql_log_warn, vha, 0x0287,
95 ql_dbg(ql_dbg_init, vha, 0x0283,
98 ql_dbg(ql_dbg_init + ql_dbg_verbose, vha, 0x0283,
100 ql_dump_buffer(ql_dbg_init + ql_dbg_verbose, vha, 0x0283,
102 rval = qla2x00_issue_iocb(vha, rsp_els, dma, 0);
104 ql_log(ql_log_warn, vha, 0x0288,
107 ql_log(ql_log_warn, vha, 0x0289,
112 ql_dbg(ql_dbg_init, vha, 0x028a,
146 ql_dbg(ql_dbg_init, vha, 0x028b,
149 ql_dbg(ql_dbg_init + ql_dbg_verbose, vha, 0x028b,
151 ql_dump_buffer(ql_dbg_init + ql_dbg_verbose, vha, 0x028b,
153 rval = qla2x00_issue_iocb(vha, abts_rsp, dma, 0);
155 ql_log(ql_log_warn, vha, 0x028c,
158 ql_log(ql_log_warn, vha, 0x028d,
164 ql_dbg(ql_dbg_init, vha, 0x028ea,
183 scsi_qla_host_t *vha;
205 vha = pci_get_drvdata(ha->pdev);
208 if (qla2x00_check_reg16_for_disconnect(vha, hccr))
222 ha->isp_ops->fw_dump(vha);
223 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
235 qla2x00_mbx_completion(vha, mb[0]);
241 qla2x00_async_event(vha, rsp, mb);
244 ql_dbg(ql_dbg_async, vha, 0x5025,
265 qla2x00_check_reg32_for_disconnect(scsi_qla_host_t *vha, uint32_t reg)
268 if (reg == 0xffffffff && !pci_channel_offline(vha->hw->pdev)) {
269 if (!test_and_set_bit(PFLG_DISCONNECTED, &vha->pci_flags) &&
270 !test_bit(PFLG_DRIVER_REMOVING, &vha->pci_flags) &&
271 !test_bit(PFLG_DRIVER_PROBING, &vha->pci_flags)) {
272 qla_schedule_eeh_work(vha);
280 qla2x00_check_reg16_for_disconnect(scsi_qla_host_t *vha, uint16_t reg)
282 return qla2x00_check_reg32_for_disconnect(vha, 0xffff0000 | reg);
297 scsi_qla_host_t *vha;
320 vha = pci_get_drvdata(ha->pdev);
323 if (qla2x00_check_reg32_for_disconnect(vha, stat))
332 ql_log(ql_log_warn, vha, 0x5026,
336 ql_log(ql_log_warn, vha, 0x5027,
348 ha->isp_ops->fw_dump(vha);
349 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
359 qla2x00_mbx_completion(vha, MSW(stat));
370 qla2x00_async_event(vha, rsp, mb);
378 qla2x00_async_event(vha, rsp, mb);
384 qla2x00_async_event(vha, rsp, mb);
387 ql_dbg(ql_dbg_async, vha, 0x5028,
402 * @vha: SCSI driver HA context
406 qla2x00_mbx_completion(scsi_qla_host_t *vha, uint16_t mb0)
411 struct qla_hw_data *ha = vha->hw;
418 ql_dbg(ql_dbg_async, vha, 0x5001, "MBX pointer ERROR.\n");
442 qla81xx_idc_event(scsi_qla_host_t *vha, uint16_t aen, uint16_t descr)
447 struct device_reg_24xx __iomem *reg24 = &vha->hw->iobase->isp24;
448 struct device_reg_82xx __iomem *reg82 = &vha->hw->iobase->isp82;
453 if (IS_QLA81XX(vha->hw) || IS_QLA83XX(vha->hw))
455 else if (IS_QLA8044(vha->hw))
463 ql_dbg(ql_dbg_async, vha, 0x5021,
472 vha->hw->flags.idc_compl_status = 1;
473 if (vha->hw->notify_dcbx_comp && !vha->vp_idx)
474 complete(&vha->hw->dcbx_comp);
481 ql_dbg(ql_dbg_async, vha, 0x5022,
483 vha->host_no, event[aen & 0xff], timeout);
487 rval = qla2x00_post_idc_ack_work(vha, mb);
489 ql_log(ql_log_warn, vha, 0x5023,
493 vha->hw->idc_extend_tmo = descr;
494 ql_dbg(ql_dbg_async, vha, 0x5087,
497 vha->host_no, event[aen & 0xff], vha->hw->idc_extend_tmo);
522 qla83xx_handle_8200_aen(scsi_qla_host_t *vha, uint16_t *mb)
524 struct qla_hw_data *ha = vha->hw;
537 ql_dbg(ql_dbg_async, vha, 0x506b, "AEN Code: mb[0] = 0x%x AEN reason: "
540 ql_dbg(ql_dbg_async, vha, 0x506c, "PH-status2: mb[3] = 0x%x "
547 ql_log(ql_log_warn, vha, 0x5060,
570 ql_log(ql_log_warn, vha, 0x5061, "PegHalt Status-1 "
574 ql_log(ql_log_warn, vha, 0x5062, "PegHalt Status-2 "
577 ql_log(ql_log_warn, vha, 0x5063,
580 ql_log(ql_log_fatal, vha, 0x5064,
583 qla83xx_schedule_work(vha,
586 ql_log(ql_log_fatal, vha, 0x5065,
589 qla83xx_schedule_work(vha,
644 ql_log(ql_log_warn, vha, 0x5066,
651 ql_log(ql_log_warn, vha, 0x5067,
656 ql_log(ql_log_warn, vha, 0x5068,
661 qla83xx_schedule_work(vha, QLA83XX_NIC_CORE_RESET);
665 ql_log(ql_log_warn, vha, 0x5069,
669 qla83xx_schedule_work(vha, QLA83XX_NIC_CORE_RESET);
674 ql_log(ql_log_info, vha, 0x506a,
678 qla83xx_schedule_work(vha, MBA_IDC_AEN);
683 qla2x00_is_a_vp_did(scsi_qla_host_t *vha, uint32_t rscn_entry)
685 struct qla_hw_data *ha = vha->hw;
708 qla2x00_find_fcport_by_loopid(scsi_qla_host_t *vha, uint16_t loop_id)
713 list_for_each_entry_safe(f, tf, &vha->vp_fcports, list)
720 qla2x00_find_fcport_by_wwpn(scsi_qla_host_t *vha, u8 *wwpn, u8 incl_deleted)
725 list_for_each_entry_safe(f, tf, &vha->vp_fcports, list) {
737 qla2x00_find_fcport_by_nportid(scsi_qla_host_t *vha, port_id_t *id,
743 list_for_each_entry_safe(f, tf, &vha->vp_fcports, list) {
756 qla27xx_handle_8200_aen(scsi_qla_host_t *vha, uint16_t *mb)
758 struct qla_hw_data *ha = vha->hw;
761 ql_log(ql_log_warn, vha, 0x02f0,
770 ql_log(ql_log_warn, vha, 0x02f1,
774 ha->isp_ops->fw_dump(vha);
778 ha->isp_ops->mpi_fw_dump(vha, 1);
781 vha->hw->flags.fw_init_done = 0;
782 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
783 qla2xxx_wake_dpc(vha);
788 qla24xx_alloc_purex_item(scsi_qla_host_t *vha, uint16_t size)
797 if (atomic_inc_return(&vha->default_item.in_use) == 1) {
798 item = &vha->default_item;
805 ql_log(ql_log_warn, vha, 0x5092,
812 item->vha = vha;
818 qla24xx_queue_purex_item(scsi_qla_host_t *vha, struct purex_item *pkt,
819 void (*process_item)(struct scsi_qla_host *vha,
822 struct purex_list *list = &vha->purex_list;
831 set_bit(PROCESS_PUREX_IOCB, &vha->dpc_flags);
838 * @vha: SCSI driver HA context
842 *qla24xx_copy_std_pkt(struct scsi_qla_host *vha, void *pkt)
846 item = qla24xx_alloc_purex_item(vha,
858 * @vha: SCSI driver HA context
863 qla27xx_copy_fpin_pkt(struct scsi_qla_host *vha, void **pkt,
881 ql_log(ql_log_info, vha, 0x509a,
885 item = qla24xx_alloc_purex_item(vha, total_bytes);
902 ql_dbg(ql_dbg_async, vha, 0x5084,
913 ql_log(ql_log_warn, vha, 0x507a,
936 ql_log(ql_log_warn, vha, 0x5044,
949 ql_log(ql_log_fatal, vha, 0x508b,
962 * @vha: SCSI driver HA context
967 qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb)
972 struct qla_hw_data *ha = vha->hw;
980 if (!vha->hw->flags.fw_started) {
981 ql_log(ql_log_warn, vha, 0x50ff,
1044 if (!vha->flags.online)
1048 qla2x00_process_completed_request(vha, rsp->req,
1053 ql_dbg(ql_dbg_async, vha, 0x5002,
1056 set_bit(RESET_MARKER_NEEDED, &vha->dpc_flags);
1070 ql_log(ql_log_warn, vha, 0x5003,
1074 ql_log(ql_log_warn, vha, 0x5003,
1080 ha->isp_ops->mpi_fw_dump(vha, 1);
1081 ha->isp_ops->fw_dump(vha);
1087 ql_log(ql_log_fatal, vha, 0x5004,
1090 vha->flags.online = 0;
1091 vha->device_flags |= DFLG_DEV_FAILED;
1096 &vha->dpc_flags);
1098 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
1101 ql_log(ql_log_fatal, vha, 0x5005,
1104 vha->flags.online = 0;
1105 vha->device_flags |= DFLG_DEV_FAILED;
1107 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
1111 ql_log(ql_log_warn, vha, 0x5006,
1114 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
1118 ql_log(ql_log_warn, vha, 0x5007,
1121 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
1125 ql_dbg(ql_dbg_async, vha, 0x5008,
1130 ql_log(ql_log_warn, vha, 0x5090,
1132 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
1138 ql_dbg(ql_dbg_async, vha, 0x5009,
1141 if (atomic_read(&vha->loop_state) != LOOP_DOWN) {
1142 atomic_set(&vha->loop_state, LOOP_DOWN);
1143 atomic_set(&vha->loop_down_timer, LOOP_DOWN_TIME);
1144 qla2x00_mark_all_devices_lost(vha);
1147 if (vha->vp_idx) {
1148 atomic_set(&vha->vp_state, VP_FAILED);
1149 fc_vport_set_state(vha->fc_vport, FC_VPORT_FAILED);
1152 set_bit(REGISTER_FC4_NEEDED, &vha->dpc_flags);
1153 set_bit(REGISTER_FDMI_NEEDED, &vha->dpc_flags);
1155 vha->flags.management_server_logged_in = 0;
1156 qla2x00_post_aen_work(vha, FCH_EVT_LIP, mb[1]);
1165 ql_log(ql_log_info, vha, 0x500a,
1171 ql_log(ql_log_info, vha, 0x11a0,
1175 vha->flags.management_server_logged_in = 0;
1176 qla2x00_post_aen_work(vha, FCH_EVT_LINKUP, ha->link_data_rate);
1189 ql_log(ql_log_info, vha, 0x500b,
1193 if (atomic_read(&vha->loop_state) != LOOP_DOWN) {
1194 atomic_set(&vha->loop_state, LOOP_DOWN);
1195 atomic_set(&vha->loop_down_timer, LOOP_DOWN_TIME);
1201 if (!vha->vp_idx) {
1204 memcpy(vha->port_name, ha->port_name, WWN_SIZE);
1205 fc_host_port_name(vha->host) =
1206 wwn_to_u64(vha->port_name);
1208 vha, 0x00d8, "LOOP DOWN detected,"
1210 wwn_to_u64(vha->port_name));
1213 clear_bit(VP_CONFIG_OK, &vha->vp_flags);
1216 vha->device_flags |= DFLG_NO_CABLE;
1217 qla2x00_mark_all_devices_lost(vha);
1220 if (vha->vp_idx) {
1221 atomic_set(&vha->vp_state, VP_FAILED);
1222 fc_vport_set_state(vha->fc_vport, FC_VPORT_FAILED);
1225 vha->flags.management_server_logged_in = 0;
1227 qla2x00_post_aen_work(vha, FCH_EVT_LINKDOWN, 0);
1231 ql_dbg(ql_dbg_async, vha, 0x500c,
1234 if (atomic_read(&vha->loop_state) != LOOP_DOWN) {
1235 atomic_set(&vha->loop_state, LOOP_DOWN);
1236 atomic_set(&vha->loop_down_timer, LOOP_DOWN_TIME);
1237 qla2x00_mark_all_devices_lost(vha);
1240 if (vha->vp_idx) {
1241 atomic_set(&vha->vp_state, VP_FAILED);
1242 fc_vport_set_state(vha->fc_vport, FC_VPORT_FAILED);
1245 set_bit(RESET_MARKER_NEEDED, &vha->dpc_flags);
1248 vha->flags.management_server_logged_in = 0;
1249 qla2x00_post_aen_work(vha, FCH_EVT_LIPRESET, mb[1]);
1260 ql_dbg(ql_dbg_async, vha, 0x500d,
1263 if (ha->notify_dcbx_comp && !vha->vp_idx)
1267 ql_dbg(ql_dbg_async, vha, 0x500e,
1274 if (atomic_read(&vha->loop_state) != LOOP_DOWN) {
1275 atomic_set(&vha->loop_state, LOOP_DOWN);
1276 if (!atomic_read(&vha->loop_down_timer))
1277 atomic_set(&vha->loop_down_timer,
1280 qla2x00_mark_all_devices_lost(vha);
1283 if (vha->vp_idx) {
1284 atomic_set(&vha->vp_state, VP_FAILED);
1285 fc_vport_set_state(vha->fc_vport, FC_VPORT_FAILED);
1288 if (!(test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags)))
1289 set_bit(RESET_MARKER_NEEDED, &vha->dpc_flags);
1291 set_bit(REGISTER_FC4_NEEDED, &vha->dpc_flags);
1292 set_bit(REGISTER_FDMI_NEEDED, &vha->dpc_flags);
1294 vha->flags.management_server_logged_in = 0;
1301 ql_dbg(ql_dbg_async, vha, 0x500f,
1304 if (atomic_read(&vha->loop_state) != LOOP_DOWN) {
1305 atomic_set(&vha->loop_state, LOOP_DOWN);
1306 if (!atomic_read(&vha->loop_down_timer))
1307 atomic_set(&vha->loop_down_timer,
1309 qla2x00_mark_all_devices_lost(vha);
1312 if (vha->vp_idx) {
1313 atomic_set(&vha->vp_state, VP_FAILED);
1314 fc_vport_set_state(vha->fc_vport, FC_VPORT_FAILED);
1317 set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags);
1318 set_bit(LOCAL_LOOP_UPDATE, &vha->dpc_flags);
1339 (mb[1] != 0xffff)) && vha->vp_idx != (mb[3] & 0xff))
1343 ql_dbg(ql_dbg_async, vha, 0x5010,
1352 set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags);
1353 set_bit(LOCAL_LOOP_UPDATE, &vha->dpc_flags);
1363 set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags);
1364 set_bit(LOCAL_LOOP_UPDATE, &vha->dpc_flags);
1369 fcport = qla2x00_find_fcport_by_loopid(vha, mb[1]);
1374 ql_dbg(ql_dbg_async, vha, 0x508a,
1377 if (qla_ini_mode_enabled(vha)) {
1384 if (atomic_read(&vha->loop_state) != LOOP_DOWN) {
1385 atomic_set(&vha->loop_state, LOOP_DOWN);
1386 atomic_set(&vha->loop_down_timer,
1388 vha->device_flags |= DFLG_NO_CABLE;
1389 qla2x00_mark_all_devices_lost(vha);
1392 if (vha->vp_idx) {
1393 atomic_set(&vha->vp_state, VP_FAILED);
1394 fc_vport_set_state(vha->fc_vport,
1396 qla2x00_mark_all_devices_lost(vha);
1399 vha->flags.management_server_logged_in = 0;
1409 atomic_set(&vha->loop_down_timer, 0);
1410 if (atomic_read(&vha->loop_state) != LOOP_DOWN &&
1412 atomic_read(&vha->loop_state) != LOOP_DEAD) {
1413 ql_dbg(ql_dbg_async, vha, 0x5011,
1419 ql_dbg(ql_dbg_async, vha, 0x5012,
1426 atomic_set(&vha->loop_state, LOOP_UP);
1427 vha->scan.scan_retry = 0;
1429 set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags);
1430 set_bit(LOCAL_LOOP_UPDATE, &vha->dpc_flags);
1431 set_bit(VP_CONFIG_OK, &vha->vp_flags);
1436 if (vha->vp_idx && test_bit(VP_SCR_NEEDED, &vha->vp_flags))
1439 if (ha->flags.npiv_supported && vha->vp_idx != (mb[3] & 0xff))
1442 ql_dbg(ql_dbg_async, vha, 0x5013,
1447 host_pid = (vha->d_id.b.domain << 16) | (vha->d_id.b.area << 8)
1448 | vha->d_id.b.al_pa;
1450 ql_dbg(ql_dbg_async, vha, 0x5014,
1460 if (qla2x00_is_a_vp_did(vha, rscn_entry))
1463 atomic_set(&vha->loop_down_timer, 0);
1464 vha->flags.management_server_logged_in = 0;
1471 qla2x00_handle_rscn(vha, &ea);
1472 qla2x00_post_aen_work(vha, FCH_EVT_RSCN, rscn_entry);
1481 ql_dbg(ql_dbg_async, vha, 0x509b,
1484 ql_log(ql_log_warn, vha, 0x509b,
1490 ql_dbg(ql_dbg_async, vha, 0x5015,
1494 qla24xx_process_response_queue(vha, rsp);
1500 ql_dbg(ql_dbg_async, vha, 0x5016,
1506 ql_dbg(ql_dbg_async, vha, 0x5017,
1511 ql_dbg(ql_dbg_async, vha, 0x5018,
1518 ql_log(ql_log_info, vha, 0x5019,
1524 ql_log(ql_log_info, vha, 0x501a,
1530 ql_log(ql_log_info, vha, 0x501b,
1537 ql_log(ql_log_info, vha, 0x501c,
1542 ql_log(ql_log_warn, vha, 0x501d,
1549 ql_dbg(ql_dbg_async, vha, 0x501e,
1554 ql_dbg(ql_dbg_async, vha, 0x501f,
1559 ql_dbg(ql_dbg_async, vha, 0x5020,
1564 if (IS_QLA8031(vha->hw) || IS_QLA8044(ha)) {
1569 set_bit(ISP_QUIESCE_NEEDED, &vha->dpc_flags);
1573 if (atomic_read(&vha->loop_state) == LOOP_DOWN)
1574 atomic_set(&vha->loop_down_timer,
1576 qla2xxx_wake_dpc(vha);
1581 if (ha->notify_lb_portup_comp && !vha->vp_idx)
1585 if (IS_QLA81XX(vha->hw) || IS_QLA8031(vha->hw) ||
1587 qla81xx_idc_event(vha, mb[0], mb[1]);
1592 qla27xx_handle_8200_aen(vha, mb);
1598 qla83xx_handle_8200_aen(vha, mb);
1600 ql_dbg(ql_dbg_async, vha, 0x5052,
1607 ql_dbg(ql_dbg_async, vha, 0x5052,
1610 memcpy(vha->dport_data, mb, sizeof(vha->dport_data));
1619 ql_dbg(ql_dbg_async, vha, 0x5052,
1630 ql_dbg(ql_dbg_async, vha, 0x5052,
1639 ql_dbg(ql_dbg_async, vha, 0x505e,
1644 ql_dbg(ql_dbg_async, vha, 0x5091,
1646 set_bit(DETECT_SFP_CHANGE, &vha->dpc_flags);
1650 ql_dbg(ql_dbg_async, vha, 0x5091, "Transceiver Removal\n");
1654 ql_dbg(ql_dbg_async, vha, 0x5057,
1659 qlt_async_event(mb[0], vha, mb);
1661 if (!vha->vp_idx && ha->num_vhosts)
1667 * @vha: SCSI driver HA context
1672 qla2x00_process_completed_request(struct scsi_qla_host *vha,
1676 struct qla_hw_data *ha = vha->hw;
1680 ql_log(ql_log_warn, vha, 0x3014,
1684 set_bit(FCOE_CTX_RESET_NEEDED, &vha->dpc_flags);
1686 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
1698 ql_log(ql_log_warn, vha, 0x3016, "Invalid SCSI SRB.\n");
1701 set_bit(FCOE_CTX_RESET_NEEDED, &vha->dpc_flags);
1703 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
1708 qla2x00_get_sp_from_handle(scsi_qla_host_t *vha, const char *func,
1711 struct qla_hw_data *ha = vha->hw;
1718 ql_log(ql_log_warn, vha, 0x5031,
1722 set_bit(FCOE_CTX_RESET_NEEDED, &vha->dpc_flags);
1724 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
1729 ql_log(ql_log_warn, vha, 0x5032,
1735 ql_log(ql_log_warn, vha, 0x5033,
1746 qla2x00_mbx_iocb_entry(scsi_qla_host_t *vha, struct req_que *req,
1757 sp = qla2x00_get_sp_from_handle(vha, func, req, mbx);
1770 ql_dbg(ql_dbg_async, vha, 0x5043,
1779 ql_dump_buffer(ql_dbg_async + ql_dbg_buffer, vha, 0x5029,
1790 ql_dbg(ql_dbg_async, vha, 0x5045,
1819 ql_log(ql_log_warn, vha, 0x5046,
1832 qla24xx_mbx_iocb_entry(scsi_qla_host_t *vha, struct req_que *req,
1836 struct qla_hw_data *ha = vha->hw;
1842 sp = qla2x00_get_sp_from_handle(vha, func, req, pkt);
1849 ql_log(ql_log_warn, vha, 0x509d,
1852 set_bit(FCOE_CTX_RESET_NEEDED, &vha->dpc_flags);
1854 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
1870 qla24xxx_nack_iocb_entry(scsi_qla_host_t *vha, struct req_que *req,
1877 sp = qla2x00_get_sp_from_handle(vha, func, req, pkt);
1888 qla2x00_ct_entry(scsi_qla_host_t *vha, struct req_que *req,
1899 sp = qla2x00_get_sp_from_handle(vha, func, req, pkt);
1925 ql_log(ql_log_warn, vha, 0x5048,
1930 ql_log(ql_log_warn, vha, 0x5049,
1936 ql_dump_buffer(ql_dbg_async + ql_dbg_buffer, vha, 0x5035,
1950 res = qla2x00_chk_ms_status(vha, (ms_iocb_entry_t *)pkt,
1960 qla24xx_els_ct_entry(scsi_qla_host_t *vha, struct req_que *req,
1974 sp = qla2x00_get_sp_from_handle(vha, func, req, pkt);
1990 ql_dbg(ql_dbg_user, vha, 0x5047,
2001 res = qla2x00_chk_ms_status(sp->vha, (ms_iocb_entry_t *)pkt,
2007 ql_dbg(ql_dbg_user, vha, 0x503e,
2034 ql_dbg(ql_dbg_disc, vha, 0x503f,
2055 ql_dbg(ql_dbg_user, vha, 0x503f,
2061 ql_dbg(ql_dbg_user, vha, 0x5040,
2072 ql_dump_buffer(ql_dbg_user + ql_dbg_buffer, vha, 0x5056,
2086 qla24xx_logio_entry(scsi_qla_host_t *vha, struct req_que *req,
2097 sp = qla2x00_get_sp_from_handle(vha, func, req, logio);
2110 ql_log(ql_log_warn, fcport->vha, 0x5034,
2116 ql_dump_buffer(ql_dbg_async + ql_dbg_buffer, vha, 0x504d,
2123 ql_dbg(ql_dbg_async, sp->vha, 0x5036,
2128 vha->hw->exch_starvation = 0;
2185 vha->hw->exch_starvation++;
2186 if (vha->hw->exch_starvation > 5) {
2187 ql_log(ql_log_warn, vha, 0xd046,
2190 vha->hw->exch_starvation = 0;
2192 if (IS_P3P_TYPE(vha->hw))
2193 set_bit(FCOE_CTX_RESET_NEEDED, &vha->dpc_flags);
2195 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
2196 qla2xxx_wake_dpc(vha);
2204 ql_dbg(ql_dbg_async, sp->vha, 0x5037,
2216 qla24xx_tm_iocb_entry(scsi_qla_host_t *vha, struct req_que *req, void *tsk)
2225 sp = qla2x00_get_sp_from_handle(vha, func, req, tsk);
2235 ql_log(ql_log_warn, fcport->vha, 0x5038,
2240 ql_log(ql_log_warn, fcport->vha, 0x5039,
2248 ql_log(ql_log_warn, fcport->vha, 0x503b,
2252 ql_log(ql_log_warn, fcport->vha, 0x503c,
2260 ql_dump_buffer(ql_dbg_async + ql_dbg_buffer, sp->vha, 0x5055,
2266 static void qla24xx_nvme_iocb_entry(scsi_qla_host_t *vha, struct req_que *req,
2285 atomic_dec(&sp->vha->hw->nvme_active_aen_cnt);
2314 ql_dbg(ql_dbg_io, fcport->vha, 0x307a,
2329 ql_log(ql_log_warn, fcport->vha, 0x5100,
2347 ql_dbg(ql_dbg_io, fcport->vha, 0x3079,
2361 ql_log(ql_log_warn, fcport->vha, 0x5060,
2395 static void qla_ctrlvp_completed(scsi_qla_host_t *vha, struct req_que *req,
2402 sp = qla2x00_get_sp_from_handle(vha, func, req, vce);
2407 ql_dbg(ql_dbg_vport, vha, 0x10c4,
2412 ql_dbg(ql_dbg_vport, vha, 0x10c5,
2418 ql_dbg(ql_dbg_vport, vha, 0x10c6,
2427 static void qla2x00_process_response_entry(struct scsi_qla_host *vha,
2438 qla2x00_status_entry(vha, rsp, pkt);
2444 qla2x00_process_completed_request(vha, rsp->req,
2451 qla2x00_process_completed_request(vha, rsp->req,
2458 qla2x00_mbx_iocb_entry(vha, rsp->req, (struct mbx_entry *)pkt);
2461 qla2x00_ct_entry(vha, rsp->req, pkt, CT_IOCB_TYPE);
2465 ql_log(ql_log_warn, vha, 0x504a,
2479 struct scsi_qla_host *vha;
2484 vha = pci_get_drvdata(ha->pdev);
2486 if (!vha->flags.online)
2501 qla2x00_error_entry(vha, rsp, pkt);
2507 qla2x00_process_response_entry(vha, rsp, pkt);
2520 struct scsi_qla_host *vha = sp->vha;
2546 ql_dbg(ql_dbg_io + ql_dbg_buffer, vha, 0x301c,
2548 sp->vha->host_no, cp->device->id, cp->device->lun,
2550 ql_dump_buffer(ql_dbg_io + ql_dbg_buffer, vha, 0x302b,
2570 struct scsi_qla_host *vha = sp->vha;
2589 ql_dbg(ql_dbg_io, vha, 0x3023,
2592 ql_dbg(ql_dbg_io, vha, 0x3024,
2639 ql_log(ql_log_warn, vha, 0x302f,
2690 qla25xx_process_bidir_status_iocb(scsi_qla_host_t *vha, void *pkt,
2693 struct qla_hw_data *ha = vha->hw;
2707 ql_log(ql_log_warn, vha, 0x70af,
2709 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
2715 ql_log(ql_log_warn, vha, 0x70b0,
2719 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
2743 vha->qla_stats.input_bytes +=
2745 vha->qla_stats.input_requests++;
2751 ql_dbg(ql_dbg_user, vha, 0x70b1,
2758 ql_dbg(ql_dbg_user, vha, 0x70b2,
2764 ql_dbg(ql_dbg_user, vha, 0x70b3,
2771 ql_dbg(ql_dbg_user, vha, 0x70b4,
2778 ql_dbg(ql_dbg_user, vha, 0x70b5,
2785 ql_dbg(ql_dbg_user, vha, 0x70b6,
2792 ql_dbg(ql_dbg_user, vha, 0x70b7,
2799 ql_dbg(ql_dbg_user, vha, 0x70b8,
2806 ql_dbg(ql_dbg_user, vha, 0x70b9,
2813 ql_dbg(ql_dbg_user, vha, 0x70ba,
2819 ql_dbg(ql_dbg_user, vha, 0x70bb,
2839 * @vha: SCSI driver HA context
2844 qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt)
2859 struct qla_hw_data *ha = vha->hw;
2883 ql_dbg(ql_dbg_io, vha, 0x3059,
2893 ql_dbg(ql_dbg_io, vha, 0x3075,
2895 __func__, vha->host_no, sts->handle);
2899 ql_dbg(ql_dbg_io, vha, 0x3017,
2903 if (!test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags)) {
2905 set_bit(FCOE_CTX_RESET_NEEDED, &vha->dpc_flags);
2907 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
2908 qla2xxx_wake_dpc(vha);
2916 ql_dbg(ql_dbg_io, vha, 0x3015,
2925 qla24xx_nvme_iocb_entry(vha, req, pkt, sp);
2930 qla25xx_process_bidir_status_iocb(vha, pkt, req, handle);
2936 qla24xx_tm_iocb_entry(vha, req, pkt);
2942 qla2x00_process_completed_request(vha, req, handle);
2950 ql_dbg(ql_dbg_io, vha, 0x3018,
2998 ql_dbg(ql_dbg_io, fcport->vha, 0x3019,
3037 ql_dbg(ql_dbg_io, fcport->vha, 0x301a,
3048 ql_dbg(ql_dbg_io, fcport->vha, 0x301b,
3070 ql_dbg(ql_dbg_io, fcport->vha, 0x301d,
3081 ql_dbg(ql_dbg_io, fcport->vha, 0x301e,
3095 ql_dbg(ql_dbg_io, fcport->vha, 0x301f,
3102 ql_dbg(ql_dbg_io, fcport->vha, 0x3030,
3117 ql_dbg(ql_dbg_io, fcport->vha, 0x3020,
3157 ql_dbg(ql_dbg_disc, fcport->vha, 0x3021,
3191 ql_log(ql_log_info, fcport->vha, 0x3022,
3193 comp_status, scsi_status, res, vha->host_no,
3197 ql_dump_buffer(ql_dbg_tgt + ql_dbg_verbose, vha, 0xe0ee,
3208 ql_dbg(ql_dbg_io, fcport->vha, 0x3022,
3212 comp_status, scsi_status, res, vha->host_no,
3234 struct scsi_qla_host *vha = pci_get_drvdata(ha->pdev);
3248 ql_log(ql_log_warn, vha, 0x3025,
3264 ql_dump_buffer(ql_dbg_io + ql_dbg_buffer, vha, 0x302c,
3282 * @vha: SCSI driver HA context
3288 qla2x00_error_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, sts_entry_t *pkt)
3291 struct qla_hw_data *ha = vha->hw;
3297 ql_dbg(ql_dbg_async, vha, 0x502a,
3322 sp = qla2x00_get_sp_from_handle(vha, func, req, pkt);
3336 ql_log(ql_log_warn, vha, 0x5030,
3343 * @vha: SCSI driver HA context
3347 qla24xx_mbx_completion(scsi_qla_host_t *vha, uint16_t mb0)
3352 struct qla_hw_data *ha = vha->hw;
3359 ql_dbg(ql_dbg_async, vha, 0x504e, "MBX pointer ERROR.\n");
3379 qla24xx_abort_iocb_entry(scsi_qla_host_t *vha, struct req_que *req,
3386 sp = qla2x00_get_sp_from_handle(vha, func, req, pkt);
3395 void qla24xx_nvme_ls4_iocb(struct scsi_qla_host *vha,
3402 sp = qla2x00_get_sp_from_handle(vha, func, req, pkt);
3412 * @vha: SCSI driver HA context
3415 void qla24xx_process_response_queue(struct scsi_qla_host *vha,
3419 struct qla_hw_data *ha = vha->hw;
3443 if (qla2x00_error_entry(vha, rsp, (sts_entry_t *) pkt))
3454 qla2x00_status_entry(vha, rsp, pkt);
3460 qla24xx_report_id_acquisition(vha,
3464 qla24xx_logio_entry(vha, rsp->req,
3468 qla24xx_els_ct_entry(vha, rsp->req, pkt, CT_IOCB_TYPE);
3471 qla24xx_els_ct_entry(vha, rsp->req, pkt, ELS_IOCB_TYPE);
3474 if (qla_ini_mode_enabled(vha)) {
3475 pure_item = qla24xx_copy_std_pkt(vha, pkt);
3478 qla24xx_queue_purex_item(vha, pure_item,
3485 qlt_handle_abts_recv(vha, rsp,
3489 qlt_24xx_process_atio_queue(vha, 1);
3495 qlt_response_pkt_all_vps(vha, rsp, (response_t *)pkt);
3498 qla24xx_nvme_ls4_iocb(vha, (struct pt_ls4_request *)pkt,
3503 qlt_response_pkt_all_vps(vha, rsp,
3506 qla24xxx_nack_iocb_entry(vha, rsp->req,
3515 qla24xx_abort_iocb_entry(vha, rsp->req,
3519 qla24xx_mbx_iocb_entry(vha, rsp->req,
3523 qla_ctrlvp_completed(vha, rsp->req,
3530 pure_item = qla24xx_copy_std_pkt(vha, pkt);
3533 qla24xx_queue_purex_item(vha, pure_item,
3537 if (!vha->hw->flags.scm_enabled) {
3538 ql_log(ql_log_warn, vha, 0x5094,
3542 pure_item = qla27xx_copy_fpin_pkt(vha,
3546 qla24xx_queue_purex_item(vha, pure_item,
3551 ql_log(ql_log_warn, vha, 0x509c,
3558 ql_dbg(ql_dbg_async, vha, 0x5042,
3578 qla2xxx_check_risc_status(scsi_qla_host_t *vha)
3582 struct qla_hw_data *ha = vha->hw;
3619 ql_log(ql_log_info, vha, 0x504c,
3639 scsi_qla_host_t *vha;
3666 vha = pci_get_drvdata(ha->pdev);
3669 if (qla2x00_check_reg32_for_disconnect(vha, stat))
3677 ql_log(ql_log_warn, vha, 0x504b,
3681 qla2xxx_check_risc_status(vha);
3683 ha->isp_ops->fw_dump(vha);
3684 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
3694 qla24xx_mbx_completion(vha, MSW(stat));
3703 qla2x00_async_event(vha, rsp, mb);
3707 qla24xx_process_response_queue(vha, rsp);
3715 qla24xx_process_response_queue(vha, rsp);
3718 ql_dbg(ql_dbg_async, vha, 0x504f,
3732 qlt_24xx_process_atio_queue(vha, 0);
3745 struct scsi_qla_host *vha;
3759 vha = pci_get_drvdata(ha->pdev);
3760 qla24xx_process_response_queue(vha, rsp);
3773 scsi_qla_host_t *vha;
3795 vha = pci_get_drvdata(ha->pdev);
3798 if (qla2x00_check_reg32_for_disconnect(vha, stat))
3806 ql_log(ql_log_info, vha, 0x5050,
3810 qla2xxx_check_risc_status(vha);
3812 ha->isp_ops->fw_dump(vha);
3813 set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
3823 qla24xx_mbx_completion(vha, MSW(stat));
3832 qla2x00_async_event(vha, rsp, mb);
3836 qla24xx_process_response_queue(vha, rsp);
3844 qla24xx_process_response_queue(vha, rsp);
3847 ql_dbg(ql_dbg_async, vha, 0x5051,
3858 qlt_24xx_process_atio_queue(vha, 0);
3935 scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev);
3957 ql_log(ql_log_fatal, vha, 0x00c7,
3963 ql_log(ql_log_info, vha, 0x00c6,
3981 vha->irq_offset = desc.pre_vectors;
3986 ql_log(ql_log_fatal, vha, 0x00c8,
4008 "qla2xxx%lu_%s", vha->host_no, msix_entries[i].name);
4033 "qla2xxx%lu_%s", vha->host_no,
4044 ql_log(ql_log_fatal, vha, 0x00cb,
4047 qla2x00_free_irqs(vha);
4059 ql_dbg(ql_dbg_multiq, vha, 0xc005,
4062 ql_dbg(ql_dbg_init, vha, 0x0055,
4079 scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev);
4094 ql_log(ql_log_warn, vha, 0x0034,
4102 ql_log(ql_log_warn, vha, 0x0035,
4110 ql_dbg(ql_dbg_init, vha, 0x0036,
4118 ql_log(ql_log_info, vha, 0x0037,
4128 ql_dbg(ql_dbg_init, vha, 0x0038,
4132 ql_log(ql_log_warn, vha, 0x0039,
4144 ql_log(ql_log_warn, vha, 0x003a,
4149 ql_dbg(ql_dbg_init, vha, 0x0125,
4169 qla2x00_free_irqs(scsi_qla_host_t *vha)
4171 struct qla_hw_data *ha = vha->hw;
4195 ql_dbg(ql_dbg_init, vha, 0x0042,
4209 scsi_qla_host_t *vha = pci_get_drvdata(ha->pdev);
4213 "qla2xxx%lu_qpair%d", vha->host_no, qpair->id);
4216 ql_log(ql_log_fatal, vha, 0x00e6,