Lines Matching refs:vhcr

516 	struct mlx4_vhcr_cmd *vhcr = priv->mfunc.vhcr;  in mlx4_slave_cmd()  local
521 vhcr->in_param = cpu_to_be64(in_param); in mlx4_slave_cmd()
522 vhcr->out_param = out_param ? cpu_to_be64(*out_param) : 0; in mlx4_slave_cmd()
523 vhcr->in_modifier = cpu_to_be32(in_modifier); in mlx4_slave_cmd()
524 vhcr->opcode = cpu_to_be16((((u16) op_modifier) << 12) | (op & 0xfff)); in mlx4_slave_cmd()
525 vhcr->token = cpu_to_be16(CMD_POLL_TOKEN); in mlx4_slave_cmd()
526 vhcr->status = 0; in mlx4_slave_cmd()
527 vhcr->flags = !!(priv->cmd.use_events) << 6; in mlx4_slave_cmd()
530 ret = mlx4_master_process_vhcr(dev, dev->caps.function, vhcr); in mlx4_slave_cmd()
535 be64_to_cpu(vhcr->out_param); in mlx4_slave_cmd()
539 vhcr->status = CMD_STAT_BAD_PARAM; in mlx4_slave_cmd()
542 ret = mlx4_status_to_errno(vhcr->status); in mlx4_slave_cmd()
554 be64_to_cpu(vhcr->out_param); in mlx4_slave_cmd()
558 vhcr->status = CMD_STAT_BAD_PARAM; in mlx4_slave_cmd()
561 ret = mlx4_status_to_errno(vhcr->status); in mlx4_slave_cmd()
892 struct mlx4_vhcr *vhcr, in mlx4_MAD_IFC_wrapper() argument
911 slave_port = vhcr->in_modifier; in mlx4_MAD_IFC_wrapper()
915 opcode_modifier = vhcr->op_modifier & ~0x8; /* clear netw view bit */ in mlx4_MAD_IFC_wrapper()
916 network_view = !!(vhcr->op_modifier & 0x8); in mlx4_MAD_IFC_wrapper()
951 vhcr->op, MLX4_CMD_TIME_CLASS_C, MLX4_CMD_NATIVE); in mlx4_MAD_IFC_wrapper()
974 vhcr->in_modifier, in mlx4_MAD_IFC_wrapper()
976 vhcr->op, in mlx4_MAD_IFC_wrapper()
995 vhcr->op, MLX4_CMD_TIME_CLASS_C, MLX4_CMD_NATIVE); in mlx4_MAD_IFC_wrapper()
1021 vhcr->in_modifier, opcode_modifier, in mlx4_MAD_IFC_wrapper()
1022 vhcr->op, MLX4_CMD_TIME_CLASS_C, MLX4_CMD_NATIVE); in mlx4_MAD_IFC_wrapper()
1026 struct mlx4_vhcr *vhcr, in mlx4_CMD_EPERM_wrapper() argument
1035 struct mlx4_vhcr *vhcr, in mlx4_DMA_wrapper() argument
1044 in_param = cmd->has_inbox ? (u64) inbox->dma : vhcr->in_param; in mlx4_DMA_wrapper()
1045 out_param = cmd->has_outbox ? (u64) outbox->dma : vhcr->out_param; in mlx4_DMA_wrapper()
1052 vhcr->in_modifier, vhcr->op_modifier, vhcr->op, in mlx4_DMA_wrapper()
1056 vhcr->out_param = out_param; in mlx4_DMA_wrapper()
1666 struct mlx4_vhcr_cmd *vhcr_cmd = in_vhcr ? in_vhcr : priv->mfunc.vhcr; in mlx4_master_process_vhcr()
1667 struct mlx4_vhcr *vhcr; in mlx4_master_process_vhcr() local
1677 vhcr = kzalloc(sizeof(struct mlx4_vhcr), GFP_KERNEL); in mlx4_master_process_vhcr()
1678 if (!vhcr) in mlx4_master_process_vhcr()
1692 kfree(vhcr); in mlx4_master_process_vhcr()
1698 vhcr->in_param = be64_to_cpu(vhcr_cmd->in_param); in mlx4_master_process_vhcr()
1699 vhcr->out_param = be64_to_cpu(vhcr_cmd->out_param); in mlx4_master_process_vhcr()
1700 vhcr->in_modifier = be32_to_cpu(vhcr_cmd->in_modifier); in mlx4_master_process_vhcr()
1701 vhcr->token = be16_to_cpu(vhcr_cmd->token); in mlx4_master_process_vhcr()
1702 vhcr->op = be16_to_cpu(vhcr_cmd->opcode) & 0xfff; in mlx4_master_process_vhcr()
1703 vhcr->op_modifier = (u8) (be16_to_cpu(vhcr_cmd->opcode) >> 12); in mlx4_master_process_vhcr()
1704 vhcr->e_bit = vhcr_cmd->flags & (1 << 6); in mlx4_master_process_vhcr()
1708 if (vhcr->op == cmd_info[i].opcode) { in mlx4_master_process_vhcr()
1715 vhcr->op, slave); in mlx4_master_process_vhcr()
1722 vhcr->in_param &= INBOX_MASK; in mlx4_master_process_vhcr()
1731 vhcr->in_param, in mlx4_master_process_vhcr()
1744 if (cmd->verify && cmd->verify(dev, slave, vhcr, inbox)) { in mlx4_master_process_vhcr()
1746 vhcr->op, slave, vhcr->in_modifier); in mlx4_master_process_vhcr()
1763 err = cmd->wrapper(dev, slave, vhcr, inbox, outbox, in mlx4_master_process_vhcr()
1766 vhcr_cmd->out_param = cpu_to_be64(vhcr->out_param); in mlx4_master_process_vhcr()
1769 vhcr->in_param; in mlx4_master_process_vhcr()
1771 vhcr->out_param; in mlx4_master_process_vhcr()
1773 cmd->out_is_imm, vhcr->in_modifier, in mlx4_master_process_vhcr()
1774 vhcr->op_modifier, vhcr->op, in mlx4_master_process_vhcr()
1779 vhcr->out_param = out_param; in mlx4_master_process_vhcr()
1780 vhcr_cmd->out_param = cpu_to_be64(vhcr->out_param); in mlx4_master_process_vhcr()
1786 if (vhcr->op == MLX4_CMD_ALLOC_RES && in mlx4_master_process_vhcr()
1787 (vhcr->in_modifier & 0xff) == RES_COUNTER && in mlx4_master_process_vhcr()
1794 vhcr->op, slave, vhcr->errno, err); in mlx4_master_process_vhcr()
1804 vhcr->out_param, in mlx4_master_process_vhcr()
1828 else if (vhcr->e_bit && in mlx4_master_process_vhcr()
1835 kfree(vhcr); in mlx4_master_process_vhcr()
2499 priv->mfunc.vhcr, in mlx4_multi_func_init()
2501 priv->mfunc.vhcr = NULL; in mlx4_multi_func_init()
2530 if (mlx4_is_mfunc(dev) && !priv->mfunc.vhcr) { in mlx4_cmd_init()
2531 priv->mfunc.vhcr = dma_alloc_coherent(&dev->persist->pdev->dev, in mlx4_cmd_init()
2535 if (!priv->mfunc.vhcr) in mlx4_cmd_init()
2618 if (mlx4_is_mfunc(dev) && priv->mfunc.vhcr && in mlx4_cmd_cleanup()
2621 priv->mfunc.vhcr, priv->mfunc.vhcr_dma); in mlx4_cmd_cleanup()
2622 priv->mfunc.vhcr = NULL; in mlx4_cmd_cleanup()