Lines Matching refs:vhcr

521 	struct mlx4_vhcr_cmd *vhcr = priv->mfunc.vhcr;  in mlx4_slave_cmd()  local
526 vhcr->in_param = cpu_to_be64(in_param); in mlx4_slave_cmd()
527 vhcr->out_param = out_param ? cpu_to_be64(*out_param) : 0; in mlx4_slave_cmd()
528 vhcr->in_modifier = cpu_to_be32(in_modifier); in mlx4_slave_cmd()
529 vhcr->opcode = cpu_to_be16((((u16) op_modifier) << 12) | (op & 0xfff)); in mlx4_slave_cmd()
530 vhcr->token = cpu_to_be16(CMD_POLL_TOKEN); in mlx4_slave_cmd()
531 vhcr->status = 0; in mlx4_slave_cmd()
532 vhcr->flags = !!(priv->cmd.use_events) << 6; in mlx4_slave_cmd()
535 ret = mlx4_master_process_vhcr(dev, dev->caps.function, vhcr); in mlx4_slave_cmd()
540 be64_to_cpu(vhcr->out_param); in mlx4_slave_cmd()
544 vhcr->status = CMD_STAT_BAD_PARAM; in mlx4_slave_cmd()
547 ret = mlx4_status_to_errno(vhcr->status); in mlx4_slave_cmd()
559 be64_to_cpu(vhcr->out_param); in mlx4_slave_cmd()
563 vhcr->status = CMD_STAT_BAD_PARAM; in mlx4_slave_cmd()
566 ret = mlx4_status_to_errno(vhcr->status); in mlx4_slave_cmd()
878 struct mlx4_vhcr *vhcr, in mlx4_MAD_IFC_wrapper() argument
897 port = vhcr->in_modifier; in mlx4_MAD_IFC_wrapper()
900 opcode_modifier = vhcr->op_modifier & ~0x8; /* clear netw view bit */ in mlx4_MAD_IFC_wrapper()
901 network_view = !!(vhcr->op_modifier & 0x8); in mlx4_MAD_IFC_wrapper()
934 vhcr->in_modifier, opcode_modifier, in mlx4_MAD_IFC_wrapper()
935 vhcr->op, MLX4_CMD_TIME_CLASS_C, MLX4_CMD_NATIVE); in mlx4_MAD_IFC_wrapper()
958 vhcr->in_modifier, in mlx4_MAD_IFC_wrapper()
960 vhcr->op, in mlx4_MAD_IFC_wrapper()
978 vhcr->in_modifier, opcode_modifier, in mlx4_MAD_IFC_wrapper()
979 vhcr->op, MLX4_CMD_TIME_CLASS_C, MLX4_CMD_NATIVE); in mlx4_MAD_IFC_wrapper()
1005 vhcr->in_modifier, opcode_modifier, in mlx4_MAD_IFC_wrapper()
1006 vhcr->op, MLX4_CMD_TIME_CLASS_C, MLX4_CMD_NATIVE); in mlx4_MAD_IFC_wrapper()
1010 struct mlx4_vhcr *vhcr, in mlx4_CMD_EPERM_wrapper() argument
1019 struct mlx4_vhcr *vhcr, in mlx4_DMA_wrapper() argument
1028 in_param = cmd->has_inbox ? (u64) inbox->dma : vhcr->in_param; in mlx4_DMA_wrapper()
1029 out_param = cmd->has_outbox ? (u64) outbox->dma : vhcr->out_param; in mlx4_DMA_wrapper()
1036 vhcr->in_modifier, vhcr->op_modifier, vhcr->op, in mlx4_DMA_wrapper()
1040 vhcr->out_param = out_param; in mlx4_DMA_wrapper()
1650 struct mlx4_vhcr_cmd *vhcr_cmd = in_vhcr ? in_vhcr : priv->mfunc.vhcr; in mlx4_master_process_vhcr()
1651 struct mlx4_vhcr *vhcr; in mlx4_master_process_vhcr() local
1661 vhcr = kzalloc(sizeof(struct mlx4_vhcr), GFP_KERNEL); in mlx4_master_process_vhcr()
1662 if (!vhcr) in mlx4_master_process_vhcr()
1676 kfree(vhcr); in mlx4_master_process_vhcr()
1682 vhcr->in_param = be64_to_cpu(vhcr_cmd->in_param); in mlx4_master_process_vhcr()
1683 vhcr->out_param = be64_to_cpu(vhcr_cmd->out_param); in mlx4_master_process_vhcr()
1684 vhcr->in_modifier = be32_to_cpu(vhcr_cmd->in_modifier); in mlx4_master_process_vhcr()
1685 vhcr->token = be16_to_cpu(vhcr_cmd->token); in mlx4_master_process_vhcr()
1686 vhcr->op = be16_to_cpu(vhcr_cmd->opcode) & 0xfff; in mlx4_master_process_vhcr()
1687 vhcr->op_modifier = (u8) (be16_to_cpu(vhcr_cmd->opcode) >> 12); in mlx4_master_process_vhcr()
1688 vhcr->e_bit = vhcr_cmd->flags & (1 << 6); in mlx4_master_process_vhcr()
1692 if (vhcr->op == cmd_info[i].opcode) { in mlx4_master_process_vhcr()
1699 vhcr->op, slave); in mlx4_master_process_vhcr()
1706 vhcr->in_param &= INBOX_MASK; in mlx4_master_process_vhcr()
1715 vhcr->in_param, in mlx4_master_process_vhcr()
1728 if (cmd->verify && cmd->verify(dev, slave, vhcr, inbox)) { in mlx4_master_process_vhcr()
1730 vhcr->op, slave, vhcr->in_modifier); in mlx4_master_process_vhcr()
1747 err = cmd->wrapper(dev, slave, vhcr, inbox, outbox, in mlx4_master_process_vhcr()
1750 vhcr_cmd->out_param = cpu_to_be64(vhcr->out_param); in mlx4_master_process_vhcr()
1753 vhcr->in_param; in mlx4_master_process_vhcr()
1755 vhcr->out_param; in mlx4_master_process_vhcr()
1757 cmd->out_is_imm, vhcr->in_modifier, in mlx4_master_process_vhcr()
1758 vhcr->op_modifier, vhcr->op, in mlx4_master_process_vhcr()
1763 vhcr->out_param = out_param; in mlx4_master_process_vhcr()
1764 vhcr_cmd->out_param = cpu_to_be64(vhcr->out_param); in mlx4_master_process_vhcr()
1771 vhcr->op, slave, vhcr->errno, err); in mlx4_master_process_vhcr()
1780 vhcr->out_param, in mlx4_master_process_vhcr()
1804 else if (vhcr->e_bit && in mlx4_master_process_vhcr()
1811 kfree(vhcr); in mlx4_master_process_vhcr()
2429 priv->mfunc.vhcr, in mlx4_multi_func_init()
2431 priv->mfunc.vhcr = NULL; in mlx4_multi_func_init()
2459 if (mlx4_is_mfunc(dev) && !priv->mfunc.vhcr) { in mlx4_cmd_init()
2460 priv->mfunc.vhcr = dma_alloc_coherent(&dev->persist->pdev->dev, in mlx4_cmd_init()
2464 if (!priv->mfunc.vhcr) in mlx4_cmd_init()
2544 if (mlx4_is_mfunc(dev) && priv->mfunc.vhcr && in mlx4_cmd_cleanup()
2547 priv->mfunc.vhcr, priv->mfunc.vhcr_dma); in mlx4_cmd_cleanup()
2548 priv->mfunc.vhcr = NULL; in mlx4_cmd_cleanup()