Lines Matching refs:vhcr
523 struct mlx4_vhcr_cmd *vhcr = priv->mfunc.vhcr; in mlx4_slave_cmd() local
528 vhcr->in_param = cpu_to_be64(in_param); in mlx4_slave_cmd()
529 vhcr->out_param = out_param ? cpu_to_be64(*out_param) : 0; in mlx4_slave_cmd()
530 vhcr->in_modifier = cpu_to_be32(in_modifier); in mlx4_slave_cmd()
531 vhcr->opcode = cpu_to_be16((((u16) op_modifier) << 12) | (op & 0xfff)); in mlx4_slave_cmd()
532 vhcr->token = cpu_to_be16(CMD_POLL_TOKEN); in mlx4_slave_cmd()
533 vhcr->status = 0; in mlx4_slave_cmd()
534 vhcr->flags = !!(priv->cmd.use_events) << 6; in mlx4_slave_cmd()
537 ret = mlx4_master_process_vhcr(dev, dev->caps.function, vhcr); in mlx4_slave_cmd()
542 be64_to_cpu(vhcr->out_param); in mlx4_slave_cmd()
546 vhcr->status = CMD_STAT_BAD_PARAM; in mlx4_slave_cmd()
549 ret = mlx4_status_to_errno(vhcr->status); in mlx4_slave_cmd()
561 be64_to_cpu(vhcr->out_param); in mlx4_slave_cmd()
565 vhcr->status = CMD_STAT_BAD_PARAM; in mlx4_slave_cmd()
568 ret = mlx4_status_to_errno(vhcr->status); in mlx4_slave_cmd()
899 struct mlx4_vhcr *vhcr, in mlx4_MAD_IFC_wrapper() argument
918 slave_port = vhcr->in_modifier; in mlx4_MAD_IFC_wrapper()
922 opcode_modifier = vhcr->op_modifier & ~0x8; /* clear netw view bit */ in mlx4_MAD_IFC_wrapper()
923 network_view = !!(vhcr->op_modifier & 0x8); in mlx4_MAD_IFC_wrapper()
958 vhcr->op, MLX4_CMD_TIME_CLASS_C, MLX4_CMD_NATIVE); in mlx4_MAD_IFC_wrapper()
981 vhcr->in_modifier, in mlx4_MAD_IFC_wrapper()
983 vhcr->op, in mlx4_MAD_IFC_wrapper()
1002 vhcr->op, MLX4_CMD_TIME_CLASS_C, MLX4_CMD_NATIVE); in mlx4_MAD_IFC_wrapper()
1028 vhcr->in_modifier, opcode_modifier, in mlx4_MAD_IFC_wrapper()
1029 vhcr->op, MLX4_CMD_TIME_CLASS_C, MLX4_CMD_NATIVE); in mlx4_MAD_IFC_wrapper()
1033 struct mlx4_vhcr *vhcr, in mlx4_CMD_EPERM_wrapper() argument
1042 struct mlx4_vhcr *vhcr, in mlx4_DMA_wrapper() argument
1051 in_param = cmd->has_inbox ? (u64) inbox->dma : vhcr->in_param; in mlx4_DMA_wrapper()
1052 out_param = cmd->has_outbox ? (u64) outbox->dma : vhcr->out_param; in mlx4_DMA_wrapper()
1059 vhcr->in_modifier, vhcr->op_modifier, vhcr->op, in mlx4_DMA_wrapper()
1063 vhcr->out_param = out_param; in mlx4_DMA_wrapper()
1673 struct mlx4_vhcr_cmd *vhcr_cmd = in_vhcr ? in_vhcr : priv->mfunc.vhcr; in mlx4_master_process_vhcr()
1674 struct mlx4_vhcr *vhcr; in mlx4_master_process_vhcr() local
1684 vhcr = kzalloc(sizeof(struct mlx4_vhcr), GFP_KERNEL); in mlx4_master_process_vhcr()
1685 if (!vhcr) in mlx4_master_process_vhcr()
1699 kfree(vhcr); in mlx4_master_process_vhcr()
1705 vhcr->in_param = be64_to_cpu(vhcr_cmd->in_param); in mlx4_master_process_vhcr()
1706 vhcr->out_param = be64_to_cpu(vhcr_cmd->out_param); in mlx4_master_process_vhcr()
1707 vhcr->in_modifier = be32_to_cpu(vhcr_cmd->in_modifier); in mlx4_master_process_vhcr()
1708 vhcr->token = be16_to_cpu(vhcr_cmd->token); in mlx4_master_process_vhcr()
1709 vhcr->op = be16_to_cpu(vhcr_cmd->opcode) & 0xfff; in mlx4_master_process_vhcr()
1710 vhcr->op_modifier = (u8) (be16_to_cpu(vhcr_cmd->opcode) >> 12); in mlx4_master_process_vhcr()
1711 vhcr->e_bit = vhcr_cmd->flags & (1 << 6); in mlx4_master_process_vhcr()
1715 if (vhcr->op == cmd_info[i].opcode) { in mlx4_master_process_vhcr()
1722 vhcr->op, slave); in mlx4_master_process_vhcr()
1729 vhcr->in_param &= INBOX_MASK; in mlx4_master_process_vhcr()
1738 vhcr->in_param, in mlx4_master_process_vhcr()
1751 if (cmd->verify && cmd->verify(dev, slave, vhcr, inbox)) { in mlx4_master_process_vhcr()
1753 vhcr->op, slave, vhcr->in_modifier); in mlx4_master_process_vhcr()
1770 err = cmd->wrapper(dev, slave, vhcr, inbox, outbox, in mlx4_master_process_vhcr()
1773 vhcr_cmd->out_param = cpu_to_be64(vhcr->out_param); in mlx4_master_process_vhcr()
1776 vhcr->in_param; in mlx4_master_process_vhcr()
1778 vhcr->out_param; in mlx4_master_process_vhcr()
1780 cmd->out_is_imm, vhcr->in_modifier, in mlx4_master_process_vhcr()
1781 vhcr->op_modifier, vhcr->op, in mlx4_master_process_vhcr()
1786 vhcr->out_param = out_param; in mlx4_master_process_vhcr()
1787 vhcr_cmd->out_param = cpu_to_be64(vhcr->out_param); in mlx4_master_process_vhcr()
1793 if (vhcr->op == MLX4_CMD_ALLOC_RES && in mlx4_master_process_vhcr()
1794 (vhcr->in_modifier & 0xff) == RES_COUNTER && in mlx4_master_process_vhcr()
1801 vhcr->op, slave, vhcr->errno, err); in mlx4_master_process_vhcr()
1811 vhcr->out_param, in mlx4_master_process_vhcr()
1835 else if (vhcr->e_bit && in mlx4_master_process_vhcr()
1842 kfree(vhcr); in mlx4_master_process_vhcr()
2498 priv->mfunc.vhcr, in mlx4_multi_func_init()
2500 priv->mfunc.vhcr = NULL; in mlx4_multi_func_init()
2529 if (mlx4_is_mfunc(dev) && !priv->mfunc.vhcr) { in mlx4_cmd_init()
2530 priv->mfunc.vhcr = dma_alloc_coherent(&dev->persist->pdev->dev, in mlx4_cmd_init()
2534 if (!priv->mfunc.vhcr) in mlx4_cmd_init()
2622 if (mlx4_is_mfunc(dev) && priv->mfunc.vhcr && in mlx4_cmd_cleanup()
2625 priv->mfunc.vhcr, priv->mfunc.vhcr_dma); in mlx4_cmd_cleanup()
2626 priv->mfunc.vhcr = NULL; in mlx4_cmd_cleanup()