Lines Matching refs:hw
76 csio_mb_hello(struct csio_hw *hw, struct csio_mb *mbp, uint32_t tmo, in csio_mb_hello() argument
82 CSIO_INIT_MBP(mbp, cmdp, tmo, hw, cbfn, 1); in csio_mb_hello()
108 csio_mb_process_hello_rsp(struct csio_hw *hw, struct csio_mb *mbp, in csio_mb_process_hello_rsp() argument
118 hw->fwrev = ntohl(rsp->fwrev); in csio_mb_process_hello_rsp()
140 csio_mb_bye(struct csio_hw *hw, struct csio_mb *mbp, uint32_t tmo, in csio_mb_bye() argument
145 CSIO_INIT_MBP(mbp, cmdp, tmo, hw, cbfn, 1); in csio_mb_bye()
162 csio_mb_reset(struct csio_hw *hw, struct csio_mb *mbp, uint32_t tmo, in csio_mb_reset() argument
168 CSIO_INIT_MBP(mbp, cmdp, tmo, hw, cbfn, 1); in csio_mb_reset()
193 csio_mb_params(struct csio_hw *hw, struct csio_mb *mbp, uint32_t tmo, in csio_mb_params() argument
203 CSIO_INIT_MBP(mbp, cmdp, tmo, hw, cbfn, 1); in csio_mb_params()
240 csio_mb_process_read_params_rsp(struct csio_hw *hw, struct csio_mb *mbp, in csio_mb_process_read_params_rsp() argument
264 csio_mb_ldst(struct csio_hw *hw, struct csio_mb *mbp, uint32_t tmo, int reg) in csio_mb_ldst() argument
267 CSIO_INIT_MBP(mbp, ldst_cmd, tmo, hw, NULL, 1); in csio_mb_ldst()
281 (FW_LDST_CMD_LC_F | FW_LDST_CMD_FN_V(hw->pfn)); in csio_mb_ldst()
300 csio_mb_caps_config(struct csio_hw *hw, struct csio_mb *mbp, uint32_t tmo, in csio_mb_caps_config() argument
307 CSIO_INIT_MBP(mbp, cmdp, tmo, hw, cbfn, wr ? 0 : 1); in csio_mb_caps_config()
346 csio_mb_port(struct csio_hw *hw, struct csio_mb *mbp, uint32_t tmo, in csio_mb_port() argument
353 CSIO_INIT_MBP(mbp, cmdp, tmo, hw, cbfn, 1); in csio_mb_port()
392 csio_mb_process_read_port_rsp(struct csio_hw *hw, struct csio_mb *mbp, in csio_mb_process_read_port_rsp() argument
412 csio_mb_initialize(struct csio_hw *hw, struct csio_mb *mbp, uint32_t tmo, in csio_mb_initialize() argument
417 CSIO_INIT_MBP(mbp, cmdp, tmo, hw, cbfn, 1); in csio_mb_initialize()
439 csio_mb_iq_alloc(struct csio_hw *hw, struct csio_mb *mbp, void *priv, in csio_mb_iq_alloc() argument
484 csio_mb_iq_write(struct csio_hw *hw, struct csio_mb *mbp, void *priv, in csio_mb_iq_write() argument
567 csio_mb_iq_alloc_write(struct csio_hw *hw, struct csio_mb *mbp, void *priv, in csio_mb_iq_alloc_write() argument
571 csio_mb_iq_alloc(hw, mbp, priv, mb_tmo, iq_params, cbfn); in csio_mb_iq_alloc_write()
572 csio_mb_iq_write(hw, mbp, priv, mb_tmo, true, iq_params, cbfn); in csio_mb_iq_alloc_write()
586 csio_mb_iq_alloc_write_rsp(struct csio_hw *hw, struct csio_mb *mbp, in csio_mb_iq_alloc_write_rsp() argument
618 csio_mb_iq_free(struct csio_hw *hw, struct csio_mb *mbp, void *priv, in csio_mb_iq_free() argument
654 csio_mb_eq_ofld_alloc(struct csio_hw *hw, struct csio_mb *mbp, void *priv, in csio_mb_eq_ofld_alloc() argument
690 csio_mb_eq_ofld_write(struct csio_hw *hw, struct csio_mb *mbp, void *priv, in csio_mb_eq_ofld_write() argument
751 csio_mb_eq_ofld_alloc_write(struct csio_hw *hw, struct csio_mb *mbp, in csio_mb_eq_ofld_alloc_write() argument
756 csio_mb_eq_ofld_alloc(hw, mbp, priv, mb_tmo, eq_ofld_params, cbfn); in csio_mb_eq_ofld_alloc_write()
757 csio_mb_eq_ofld_write(hw, mbp, priv, mb_tmo, true, in csio_mb_eq_ofld_alloc_write()
772 csio_mb_eq_ofld_alloc_write_rsp(struct csio_hw *hw, in csio_mb_eq_ofld_alloc_write_rsp() argument
804 csio_mb_eq_ofld_free(struct csio_hw *hw, struct csio_mb *mbp, void *priv, in csio_mb_eq_ofld_free() argument
869 csio_fcoe_read_res_info_init_mb(struct csio_hw *hw, struct csio_mb *mbp, in csio_fcoe_read_res_info_init_mb() argument
876 CSIO_INIT_MBP(mbp, cmdp, mb_tmo, hw, cbfn, 1); in csio_fcoe_read_res_info_init_mb()
1023 csio_fcoe_read_portparams_init_mb(struct csio_hw *hw, struct csio_mb *mbp, in csio_fcoe_read_portparams_init_mb() argument
1031 CSIO_INIT_MBP(mbp, cmdp, mb_tmo, hw, cbfn, 1); in csio_fcoe_read_portparams_init_mb()
1047 csio_mb_process_portparams_rsp(struct csio_hw *hw, in csio_mb_process_portparams_rsp() argument
1106 csio_mb_intr_enable(struct csio_hw *hw) in csio_mb_intr_enable() argument
1108 csio_wr_reg32(hw, MBMSGRDYINTEN_F, MYPF_REG(CIM_PF_HOST_INT_ENABLE_A)); in csio_mb_intr_enable()
1109 csio_rd_reg32(hw, MYPF_REG(CIM_PF_HOST_INT_ENABLE_A)); in csio_mb_intr_enable()
1119 csio_mb_intr_disable(struct csio_hw *hw) in csio_mb_intr_disable() argument
1121 csio_wr_reg32(hw, MBMSGRDYINTEN_V(0), in csio_mb_intr_disable()
1123 csio_rd_reg32(hw, MYPF_REG(CIM_PF_HOST_INT_ENABLE_A)); in csio_mb_intr_disable()
1127 csio_mb_dump_fw_dbg(struct csio_hw *hw, __be64 *cmd) in csio_mb_dump_fw_dbg() argument
1132 csio_info(hw, "FW print message:\n"); in csio_mb_dump_fw_dbg()
1133 csio_info(hw, "\tdebug->dprtstridx = %d\n", in csio_mb_dump_fw_dbg()
1135 csio_info(hw, "\tdebug->dprtstrparam0 = 0x%x\n", in csio_mb_dump_fw_dbg()
1137 csio_info(hw, "\tdebug->dprtstrparam1 = 0x%x\n", in csio_mb_dump_fw_dbg()
1139 csio_info(hw, "\tdebug->dprtstrparam2 = 0x%x\n", in csio_mb_dump_fw_dbg()
1141 csio_info(hw, "\tdebug->dprtstrparam3 = 0x%x\n", in csio_mb_dump_fw_dbg()
1145 csio_fatal(hw, "FW assertion at %.16s:%u, val0 %#x, val1 %#x\n", in csio_mb_dump_fw_dbg()
1154 csio_mb_debug_cmd_handler(struct csio_hw *hw) in csio_mb_debug_cmd_handler() argument
1158 uint32_t ctl_reg = PF_REG(hw->pfn, CIM_PF_MAILBOX_CTRL_A); in csio_mb_debug_cmd_handler()
1159 uint32_t data_reg = PF_REG(hw->pfn, CIM_PF_MAILBOX_DATA_A); in csio_mb_debug_cmd_handler()
1164 cmd[i / 8] = cpu_to_be64(csio_rd_reg64(hw, data_reg + i)); in csio_mb_debug_cmd_handler()
1166 csio_mb_dump_fw_dbg(hw, cmd); in csio_mb_debug_cmd_handler()
1169 csio_wr_reg32(hw, MBMSGVALID_F | MBINTREQ_F | in csio_mb_debug_cmd_handler()
1172 csio_rd_reg32(hw, ctl_reg); in csio_mb_debug_cmd_handler()
1184 csio_mb_issue(struct csio_hw *hw, struct csio_mb *mbp) in csio_mb_issue() argument
1191 struct csio_mbm *mbm = &hw->mbm; in csio_mb_issue()
1192 uint32_t ctl_reg = PF_REG(hw->pfn, CIM_PF_MAILBOX_CTRL_A); in csio_mb_issue()
1193 uint32_t data_reg = PF_REG(hw->pfn, CIM_PF_MAILBOX_DATA_A); in csio_mb_issue()
1202 csio_err(hw, "Invalid tmo: 0x%x\n", mbp->tmo); in csio_mb_issue()
1205 } else if (!csio_is_host_intr_enabled(hw) || in csio_mb_issue()
1206 !csio_is_hw_intr_enabled(hw)) { in csio_mb_issue()
1207 csio_err(hw, "Cannot issue mailbox in interrupt mode 0x%x\n", in csio_mb_issue()
1216 csio_dbg(hw, "Couldnt own Mailbox %x op:0x%x\n", in csio_mb_issue()
1217 hw->pfn, *((uint8_t *)mbp->mb)); in csio_mb_issue()
1229 owner = MBOWNER_G(csio_rd_reg32(hw, ctl_reg)); in csio_mb_issue()
1234 owner = MBOWNER_G(csio_rd_reg32(hw, ctl_reg)); in csio_mb_issue()
1243 csio_dbg(hw, in csio_mb_issue()
1246 hw->pfn, *((uint8_t *)mbp->mb), owner); in csio_mb_issue()
1250 csio_err(hw, in csio_mb_issue()
1253 hw->pfn, *((uint8_t *)mbp->mb), in csio_mb_issue()
1255 csio_err(hw, in csio_mb_issue()
1266 csio_wr_reg64(hw, be64_to_cpu(*cmd), data_reg + i); in csio_mb_issue()
1270 CSIO_DUMP_MB(hw, hw->pfn, data_reg); in csio_mb_issue()
1276 csio_wr_reg32(hw, MBMSGVALID_F | MBINTREQ_F | in csio_mb_issue()
1279 csio_wr_reg32(hw, MBMSGVALID_F | MBOWNER_V(CSIO_MBOWNER_FW), in csio_mb_issue()
1283 csio_rd_reg32(hw, ctl_reg); in csio_mb_issue()
1298 ctl = csio_rd_reg32(hw, ctl_reg); in csio_mb_issue()
1302 csio_wr_reg32(hw, 0, ctl_reg); in csio_mb_issue()
1306 CSIO_DUMP_MB(hw, hw->pfn, data_reg); in csio_mb_issue()
1308 hdr = cpu_to_be64(csio_rd_reg64(hw, data_reg)); in csio_mb_issue()
1313 csio_mb_debug_cmd_handler(hw); in csio_mb_issue()
1320 (hw, data_reg + i)); in csio_mb_issue()
1321 csio_wr_reg32(hw, 0, ctl_reg); in csio_mb_issue()
1333 csio_err(hw, "Mailbox %x op:0x%x timed out!\n", in csio_mb_issue()
1334 hw->pfn, *((uint8_t *)cmd)); in csio_mb_issue()
1350 csio_mb_completions(struct csio_hw *hw, struct list_head *cbfn_q) in csio_mb_completions() argument
1353 struct csio_mbm *mbm = &hw->mbm; in csio_mb_completions()
1367 mbp->mb_cbfn(hw, mbp); in csio_mb_completions()
1372 csio_mb_portmod_changed(struct csio_hw *hw, uint8_t port_id) in csio_mb_portmod_changed() argument
1378 struct csio_pport *port = &hw->pport[port_id]; in csio_mb_portmod_changed()
1381 csio_info(hw, "Port:%d - port module unplugged\n", port_id); in csio_mb_portmod_changed()
1383 csio_info(hw, "Port:%d - %s port module inserted\n", port_id, in csio_mb_portmod_changed()
1386 csio_info(hw, in csio_mb_portmod_changed()
1390 csio_info(hw, in csio_mb_portmod_changed()
1394 csio_info(hw, "Port:%d - transceiver module error\n", port_id); in csio_mb_portmod_changed()
1396 csio_info(hw, "Port:%d - unknown module type %d inserted\n", in csio_mb_portmod_changed()
1401 csio_mb_fwevt_handler(struct csio_hw *hw, __be64 *cmd) in csio_mb_fwevt_handler() argument
1417 csio_err(hw, "Unhandled FW_PORT_CMD action: %u\n", in csio_mb_fwevt_handler()
1425 hw->pport[port_id].link_status = in csio_mb_fwevt_handler()
1427 hw->pport[port_id].link_speed = in csio_mb_fwevt_handler()
1430 csio_info(hw, "Port:%x - LINK %s\n", port_id, in csio_mb_fwevt_handler()
1433 if (mod_type != hw->pport[port_id].mod_type) { in csio_mb_fwevt_handler()
1434 hw->pport[port_id].mod_type = mod_type; in csio_mb_fwevt_handler()
1435 csio_mb_portmod_changed(hw, port_id); in csio_mb_fwevt_handler()
1438 csio_mb_dump_fw_dbg(hw, cmd); in csio_mb_fwevt_handler()
1440 csio_dbg(hw, "Gen MB can't handle op:0x%x on evtq.\n", opcode); in csio_mb_fwevt_handler()
1455 csio_mb_isr_handler(struct csio_hw *hw) in csio_mb_isr_handler() argument
1457 struct csio_mbm *mbm = &hw->mbm; in csio_mb_isr_handler()
1462 uint32_t ctl_reg = PF_REG(hw->pfn, CIM_PF_MAILBOX_CTRL_A); in csio_mb_isr_handler()
1463 uint32_t data_reg = PF_REG(hw->pfn, CIM_PF_MAILBOX_DATA_A); in csio_mb_isr_handler()
1468 pl_cause = csio_rd_reg32(hw, MYPF_REG(PL_PF_INT_CAUSE_A)); in csio_mb_isr_handler()
1469 cim_cause = csio_rd_reg32(hw, MYPF_REG(CIM_PF_HOST_INT_CAUSE_A)); in csio_mb_isr_handler()
1472 CSIO_INC_STATS(hw, n_mbint_unexp); in csio_mb_isr_handler()
1482 csio_wr_reg32(hw, MBMSGRDYINT_F, MYPF_REG(CIM_PF_HOST_INT_CAUSE_A)); in csio_mb_isr_handler()
1483 csio_wr_reg32(hw, PFCIM_F, MYPF_REG(PL_PF_INT_CAUSE_A)); in csio_mb_isr_handler()
1485 ctl = csio_rd_reg32(hw, ctl_reg); in csio_mb_isr_handler()
1489 CSIO_DUMP_MB(hw, hw->pfn, data_reg); in csio_mb_isr_handler()
1492 csio_warn(hw, in csio_mb_isr_handler()
1495 csio_wr_reg32(hw, 0, ctl_reg); in csio_mb_isr_handler()
1497 csio_rd_reg32(hw, ctl_reg); in csio_mb_isr_handler()
1501 hdr = cpu_to_be64(csio_rd_reg64(hw, data_reg)); in csio_mb_isr_handler()
1506 csio_mb_debug_cmd_handler(hw); in csio_mb_isr_handler()
1521 (hw, data_reg + i)); in csio_mb_isr_handler()
1523 csio_wr_reg32(hw, 0, ctl_reg); in csio_mb_isr_handler()
1525 csio_rd_reg32(hw, ctl_reg); in csio_mb_isr_handler()
1537 if (csio_enqueue_evt(hw, CSIO_EVT_MBX, mbp, sizeof(mbp))) in csio_mb_isr_handler()
1538 CSIO_INC_STATS(hw, n_evt_drop); in csio_mb_isr_handler()
1547 csio_dbg(hw, "Host not owner, no mailbox interrupt\n"); in csio_mb_isr_handler()
1548 CSIO_INC_STATS(hw, n_int_stray); in csio_mb_isr_handler()
1559 csio_mb_tmo_handler(struct csio_hw *hw) in csio_mb_tmo_handler() argument
1561 struct csio_mbm *mbm = &hw->mbm; in csio_mb_tmo_handler()
1576 csio_dbg(hw, "Mailbox num:%x op:0x%x timed out\n", hw->pfn, in csio_mb_tmo_handler()
1594 csio_mb_cancel_all(struct csio_hw *hw, struct list_head *cbfn_q) in csio_mb_cancel_all() argument
1597 struct csio_mbm *mbm = &hw->mbm; in csio_mb_cancel_all()
1629 csio_dbg(hw, "Cancelling pending mailbox num %x op:%x\n", in csio_mb_cancel_all()
1630 hw->pfn, FW_CMD_OP_G(ntohl(hdr->hi))); in csio_mb_cancel_all()
1646 csio_mbm_init(struct csio_mbm *mbm, struct csio_hw *hw, in csio_mbm_init() argument
1653 timer->data = (unsigned long)hw; in csio_mbm_init()