Lines Matching full:mb

189 	uint16_t	mb[8];  in qla2100_intr_handler()  local
233 mb[0] = RD_MAILBOX_REG(ha, reg, 0); in qla2100_intr_handler()
234 if (mb[0] > 0x3fff && mb[0] < 0x8000) { in qla2100_intr_handler()
235 qla2x00_mbx_completion(vha, mb[0]); in qla2100_intr_handler()
237 } else if (mb[0] > 0x7fff && mb[0] < 0xc000) { in qla2100_intr_handler()
238 mb[1] = RD_MAILBOX_REG(ha, reg, 1); in qla2100_intr_handler()
239 mb[2] = RD_MAILBOX_REG(ha, reg, 2); in qla2100_intr_handler()
240 mb[3] = RD_MAILBOX_REG(ha, reg, 3); in qla2100_intr_handler()
241 qla2x00_async_event(vha, rsp, mb); in qla2100_intr_handler()
246 mb[0]); in qla2100_intr_handler()
308 uint16_t mb[8]; in qla2300_intr_handler() local
371 mb[0] = MSW(stat); in qla2300_intr_handler()
372 mb[1] = RD_MAILBOX_REG(ha, reg, 1); in qla2300_intr_handler()
373 mb[2] = RD_MAILBOX_REG(ha, reg, 2); in qla2300_intr_handler()
374 mb[3] = RD_MAILBOX_REG(ha, reg, 3); in qla2300_intr_handler()
375 qla2x00_async_event(vha, rsp, mb); in qla2300_intr_handler()
381 mb[0] = MBA_CMPLT_1_16BIT; in qla2300_intr_handler()
382 mb[1] = MSW(stat); in qla2300_intr_handler()
383 qla2x00_async_event(vha, rsp, mb); in qla2300_intr_handler()
386 mb[0] = MBA_SCSI_COMPLETION; in qla2300_intr_handler()
387 mb[1] = MSW(stat); in qla2300_intr_handler()
388 mb[2] = RD_MAILBOX_REG(ha, reg, 2); in qla2300_intr_handler()
389 qla2x00_async_event(vha, rsp, mb); in qla2300_intr_handler()
455 uint16_t cnt, timeout, mb[QLA_IDC_ACK_REGS]; in qla81xx_idc_event() local
466 mb[cnt] = rd_reg_word(wptr); in qla81xx_idc_event()
471 event[aen & 0xff], mb[0], mb[1], mb[2], mb[3], in qla81xx_idc_event()
472 mb[4], mb[5], mb[6]); in qla81xx_idc_event()
476 if (mb[1] >> 15) { in qla81xx_idc_event()
492 rval = qla2x00_post_idc_ack_work(vha, mb); in qla81xx_idc_event()
527 qla83xx_handle_8200_aen(scsi_qla_host_t *vha, uint16_t *mb) in qla83xx_handle_8200_aen() argument
533 * mb[0] = AEN code in qla83xx_handle_8200_aen()
534 * mb[1] = AEN Reason code in qla83xx_handle_8200_aen()
535 * mb[2] = LSW of Peg-Halt Status-1 Register in qla83xx_handle_8200_aen()
536 * mb[6] = MSW of Peg-Halt Status-1 Register in qla83xx_handle_8200_aen()
537 * mb[3] = LSW of Peg-Halt Status-2 register in qla83xx_handle_8200_aen()
538 * mb[7] = MSW of Peg-Halt Status-2 register in qla83xx_handle_8200_aen()
539 * mb[4] = IDC Device-State Register value in qla83xx_handle_8200_aen()
540 * mb[5] = IDC Driver-Presence Register value in qla83xx_handle_8200_aen()
542 ql_dbg(ql_dbg_async, vha, 0x506b, "AEN Code: mb[0] = 0x%x AEN reason: " in qla83xx_handle_8200_aen()
543 "mb[1] = 0x%x PH-status1: mb[2] = 0x%x PH-status1: mb[6] = 0x%x.\n", in qla83xx_handle_8200_aen()
544 mb[0], mb[1], mb[2], mb[6]); in qla83xx_handle_8200_aen()
545 ql_dbg(ql_dbg_async, vha, 0x506c, "PH-status2: mb[3] = 0x%x " in qla83xx_handle_8200_aen()
546 "PH-status2: mb[7] = 0x%x Device-State: mb[4] = 0x%x " in qla83xx_handle_8200_aen()
547 "Drv-Presence: mb[5] = 0x%x.\n", mb[3], mb[7], mb[4], mb[5]); in qla83xx_handle_8200_aen()
549 if (mb[1] & (IDC_PEG_HALT_STATUS_CHANGE | IDC_NIC_FW_REPORTED_FAILURE | in qla83xx_handle_8200_aen()
555 if (mb[1] & IDC_PEG_HALT_STATUS_CHANGE) { in qla83xx_handle_8200_aen()
561 * (LSW = mb[2], MSW = mb[6]) in qla83xx_handle_8200_aen()
569 * (LSW = mb[3], MSW = mb[7]) in qla83xx_handle_8200_aen()
571 protocol_engine_id = (mb[2] & 0xff); in qla83xx_handle_8200_aen()
572 fw_err_code = (((mb[2] & 0xff00) >> 8) | in qla83xx_handle_8200_aen()
573 ((mb[6] & 0x1fff) << 8)); in qla83xx_handle_8200_aen()
574 err_level = ((mb[6] & 0xe000) >> 13); in qla83xx_handle_8200_aen()
580 "Register: 0x%x%x.\n", mb[7], mb[3]); in qla83xx_handle_8200_aen()
599 if (mb[1] & IDC_NIC_FW_REPORTED_FAILURE) { in qla83xx_handle_8200_aen()
609 * (LSW = mb[2], MSW = mb[6]) in qla83xx_handle_8200_aen()
637 peg_fw_state = (mb[2] & 0x00ff); in qla83xx_handle_8200_aen()
638 nw_interface_link_up = ((mb[2] & 0x0100) >> 8); in qla83xx_handle_8200_aen()
639 nw_interface_signal_detect = ((mb[2] & 0x0200) >> 9); in qla83xx_handle_8200_aen()
640 sfp_status = ((mb[2] & 0x0c00) >> 10); in qla83xx_handle_8200_aen()
641 htbt_counter = ((mb[2] & 0x7000) >> 12); in qla83xx_handle_8200_aen()
642 htbt_monitor_enable = ((mb[2] & 0x8000) >> 15); in qla83xx_handle_8200_aen()
643 sfp_additional_info = (mb[6] & 0x0003); in qla83xx_handle_8200_aen()
644 sfp_multirate = ((mb[6] & 0x0004) >> 2); in qla83xx_handle_8200_aen()
645 sfp_tx_fault = ((mb[6] & 0x0008) >> 3); in qla83xx_handle_8200_aen()
646 link_speed = ((mb[6] & 0x0070) >> 4); in qla83xx_handle_8200_aen()
647 dcbx_status = ((mb[6] & 0x7000) >> 12); in qla83xx_handle_8200_aen()
669 if (mb[1] & IDC_HEARTBEAT_FAILURE) { in qla83xx_handle_8200_aen()
678 if (mb[1] & IDC_DEVICE_STATE_CHANGE) { in qla83xx_handle_8200_aen()
680 "IDC Device-State changed = 0x%x.\n", mb[4]); in qla83xx_handle_8200_aen()
761 qla27xx_handle_8200_aen(scsi_qla_host_t *vha, uint16_t *mb) in qla27xx_handle_8200_aen() argument
769 mb[1] & BIT_8 ? "" : " not", in qla27xx_handle_8200_aen()
770 mb[0], mb[1], mb[2], mb[3]); in qla27xx_handle_8200_aen()
772 if ((mb[1] & BIT_8) == 0) in qla27xx_handle_8200_aen()
969 * @mb: Mailbox registers (0 - 3)
972 qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb) in qla2x00_async_event() argument
992 switch (mb[0]) { in qla2x00_async_event()
994 handles[0] = make_handle(mb[2], mb[1]); in qla2x00_async_event()
998 handles[0] = mb[1]; in qla2x00_async_event()
1000 mb[0] = MBA_SCSI_COMPLETION; in qla2x00_async_event()
1003 handles[0] = mb[1]; in qla2x00_async_event()
1004 handles[1] = mb[2]; in qla2x00_async_event()
1006 mb[0] = MBA_SCSI_COMPLETION; in qla2x00_async_event()
1009 handles[0] = mb[1]; in qla2x00_async_event()
1010 handles[1] = mb[2]; in qla2x00_async_event()
1011 handles[2] = mb[3]; in qla2x00_async_event()
1013 mb[0] = MBA_SCSI_COMPLETION; in qla2x00_async_event()
1016 handles[0] = mb[1]; in qla2x00_async_event()
1017 handles[1] = mb[2]; in qla2x00_async_event()
1018 handles[2] = mb[3]; in qla2x00_async_event()
1021 mb[0] = MBA_SCSI_COMPLETION; in qla2x00_async_event()
1024 handles[0] = mb[1]; in qla2x00_async_event()
1025 handles[1] = mb[2]; in qla2x00_async_event()
1026 handles[2] = mb[3]; in qla2x00_async_event()
1030 mb[0] = MBA_SCSI_COMPLETION; in qla2x00_async_event()
1033 handles[0] = make_handle(mb[2], mb[1]); in qla2x00_async_event()
1037 mb[0] = MBA_SCSI_COMPLETION; in qla2x00_async_event()
1043 switch (mb[0]) { in qla2x00_async_event()
1073 mb[1], mb[2], mb[3], m[0], m[1], m[2], m[3]); in qla2x00_async_event()
1077 mb[1], mb[2], mb[3]); in qla2x00_async_event()
1087 if (mb[1] == 0 && mb[2] == 0) { in qla2x00_async_event()
1101 } else if (mb[1] == 0) { in qla2x00_async_event()
1113 "ISP Request Transfer Error (%x).\n", mb[1]); in qla2x00_async_event()
1120 "ISP Response Transfer Error (%x).\n", mb[1]); in qla2x00_async_event()
1127 "Asynchronous WAKEUP_THRES (%x).\n", mb[1]); in qla2x00_async_event()
1132 "LOOP INIT ERROR (%x).\n", mb[1]); in qla2x00_async_event()
1140 "LIP occurred (%x).\n", mb[1]); in qla2x00_async_event()
1157 qla2x00_post_aen_work(vha, FCH_EVT_LIP, mb[1]); in qla2x00_async_event()
1164 ha->link_data_rate = mb[1]; in qla2x00_async_event()
1171 if (mb[2] & BIT_0) in qla2x00_async_event()
1192 mb[1], mb[2], mb[3], mbx); in qla2x00_async_event()
1235 "LIP reset occurred (%x).\n", mb[1]); in qla2x00_async_event()
1252 qla2x00_post_aen_work(vha, FCH_EVT_LIPRESET, mb[1]); in qla2x00_async_event()
1265 mb[1], mb[2], mb[3]); in qla2x00_async_event()
1305 "Configuration change detected: value=%x.\n", mb[1]); in qla2x00_async_event()
1329 * mb[1] = N_Port handle of changed port in qla2x00_async_event()
1331 * mb[2] = New login state in qla2x00_async_event()
1333 * mb[3] = LSB is vp_idx, 0xff = all vps in qla2x00_async_event()
1341 ((mb[1] == 0xffff && (mb[3] & 0xff) != 0xff) || in qla2x00_async_event()
1342 (mb[1] != 0xffff)) && vha->vp_idx != (mb[3] & 0xff)) in qla2x00_async_event()
1345 if (mb[2] == 0x7) { in qla2x00_async_event()
1348 mb[1] == 0xffff ? "unavailable" : "logout", in qla2x00_async_event()
1349 mb[1], mb[2], mb[3]); in qla2x00_async_event()
1351 if (mb[1] == 0xffff) in qla2x00_async_event()
1354 if (mb[1] == NPH_SNS_LID(ha)) { in qla2x00_async_event()
1365 if (mb[1] == handle_cnt) { in qla2x00_async_event()
1372 fcport = qla2x00_find_fcport_by_loopid(vha, mb[1]); in qla2x00_async_event()
1418 mb[1], mb[2], mb[3]); in qla2x00_async_event()
1424 mb[1], mb[2], mb[3]); in qla2x00_async_event()
1442 if (ha->flags.npiv_supported && vha->vp_idx != (mb[3] & 0xff)) in qla2x00_async_event()
1447 mb[1], mb[2], mb[3]); in qla2x00_async_event()
1449 rscn_entry = ((mb[1] & 0xff) << 16) | mb[2]; in qla2x00_async_event()
1460 rscn_entry = ((mb[1] & 0x3ff) << 16) | mb[2]; in qla2x00_async_event()
1480 mb[1] != QLA_CON_PRIMITIVE_RECEIVED) in qla2x00_async_event()
1483 if (mb[2] == QLA_CONGESTION_ARB_WARNING) { in qla2x00_async_event()
1485 "Congestion Warning %04x %04x.\n", mb[1], mb[2]); in qla2x00_async_event()
1486 } else if (mb[2] == QLA_CONGESTION_ARB_ALARM) { in qla2x00_async_event()
1488 "Congestion Alarm %04x %04x.\n", mb[1], mb[2]); in qla2x00_async_event()
1505 mb[1], mb[2], mb[3]); in qla2x00_async_event()
1510 "Trace Notification -- %04x %04x.\n", mb[1], mb[2]); in qla2x00_async_event()
1516 mb[1], mb[2], mb[3]); in qla2x00_async_event()
1519 switch (mb[1]) { in qla2x00_async_event()
1523 mb[2], mb[3]); in qla2x00_async_event()
1526 ha->cs84xx->op_fw_version = mb[3] << 16 | mb[2]; in qla2x00_async_event()
1532 ha->cs84xx->diag_fw_version = mb[3] << 16 | mb[2]; in qla2x00_async_event()
1538 ha->cs84xx->diag_fw_version = mb[3] << 16 | mb[2]; in qla2x00_async_event()
1547 mb[1], mb[2], mb[3]); in qla2x00_async_event()
1554 mb[1], mb[2], mb[3]); in qla2x00_async_event()
1559 mb[1], mb[2], mb[3]); in qla2x00_async_event()
1564 mb[1], mb[2], mb[3]); in qla2x00_async_event()
1568 mb[4] = rd_reg_word(&reg24->mailbox4); in qla2x00_async_event()
1569 if (((mb[2] & 0x7fff) == MBC_PORT_RESET || in qla2x00_async_event()
1570 (mb[2] & 0x7fff) == MBC_SET_PORT_CONFIG) && in qla2x00_async_event()
1571 (mb[4] & INTERNAL_LOOPBACK_MASK) != 0) { in qla2x00_async_event()
1590 qla81xx_idc_event(vha, mb[0], mb[1]); in qla2x00_async_event()
1595 qla27xx_handle_8200_aen(vha, mb); in qla2x00_async_event()
1597 mb[4] = rd_reg_word(&reg24->mailbox4); in qla2x00_async_event()
1598 mb[5] = rd_reg_word(&reg24->mailbox5); in qla2x00_async_event()
1599 mb[6] = rd_reg_word(&reg24->mailbox6); in qla2x00_async_event()
1600 mb[7] = rd_reg_word(&reg24->mailbox7); in qla2x00_async_event()
1601 qla83xx_handle_8200_aen(vha, mb); in qla2x00_async_event()
1605 mb[0], mb[1], mb[2], mb[3]); in qla2x00_async_event()
1612 mb[0], mb[1], mb[2], mb[3]); in qla2x00_async_event()
1613 memcpy(vha->dport_data, mb, sizeof(vha->dport_data)); in qla2x00_async_event()
1619 uint result = mb[1] >> 0 & 0x3; in qla2x00_async_event()
1620 uint type = mb[1] >> 6 & 0x3; in qla2x00_async_event()
1621 uint sw = mb[1] >> 15 & 0x1; in qla2x00_async_event()
1631 uint reason = mb[2] >> 0 & 0xf; in qla2x00_async_event()
1632 uint phase = mb[2] >> 12 & 0xf; in qla2x00_async_event()
1643 "TEMPERATURE ALERT: %04x %04x %04x\n", mb[1], mb[2], mb[3]); in qla2x00_async_event()
1644 if (mb[1] == 0x12) in qla2x00_async_event()
1650 "Transceiver Insertion: %04x\n", mb[1]); in qla2x00_async_event()
1661 mb[0], mb[1], mb[2], mb[3]); in qla2x00_async_event()
1664 qlt_async_event(mb[0], vha, mb); in qla2x00_async_event()
1667 qla2x00_alert_all_vps(rsp, mb); in qla2x00_async_event()
1864 sz = min(ARRAY_SIZE(pkt->mb), ARRAY_SIZE(sp->u.iocb_cmd.u.mbx.in_mb)); in qla24xx_mbx_iocb_entry()
1867 si->u.mbx.in_mb[i] = pkt->mb[i]; in qla24xx_mbx_iocb_entry()
3651 uint16_t mb[8]; in qla24xx_intr_handler() local
3704 mb[0] = MSW(stat); in qla24xx_intr_handler()
3705 mb[1] = rd_reg_word(&reg->mailbox1); in qla24xx_intr_handler()
3706 mb[2] = rd_reg_word(&reg->mailbox2); in qla24xx_intr_handler()
3707 mb[3] = rd_reg_word(&reg->mailbox3); in qla24xx_intr_handler()
3708 qla2x00_async_event(vha, rsp, mb); in qla24xx_intr_handler()
3785 uint16_t mb[8]; in qla24xx_msix_default() local
3833 mb[0] = MSW(stat); in qla24xx_msix_default()
3834 mb[1] = rd_reg_word(&reg->mailbox1); in qla24xx_msix_default()
3835 mb[2] = rd_reg_word(&reg->mailbox2); in qla24xx_msix_default()
3836 mb[3] = rd_reg_word(&reg->mailbox3); in qla24xx_msix_default()
3837 qla2x00_async_event(vha, rsp, mb); in qla24xx_msix_default()