Lines Matching refs:to_mdev
88 struct mlx4_ib_dev *dev = to_mdev(ibdev); in mlx4_ib_query_device()
101 err = mlx4_MAD_IFC(to_mdev(ibdev), 1, 1, 1, NULL, NULL, in_mad, out_mad); in mlx4_ib_query_device()
178 struct mlx4_dev *dev = to_mdev(device)->dev; in mlx4_ib_port_link_layer()
201 err = mlx4_MAD_IFC(to_mdev(ibdev), 1, 1, port, NULL, NULL, in ib_link_query_port()
214 props->gid_tbl_len = to_mdev(ibdev)->dev->caps.gid_table_len[port]; in ib_link_query_port()
215 props->max_msg_sz = to_mdev(ibdev)->dev->caps.max_msg_sz; in ib_link_query_port()
216 props->pkey_tbl_len = to_mdev(ibdev)->dev->caps.pkey_table_len[port]; in ib_link_query_port()
247 err = mlx4_MAD_IFC(to_mdev(ibdev), 1, 1, port, in ib_link_query_port()
276 struct mlx4_ib_dev *mdev = to_mdev(ibdev); in eth_link_query_port()
353 err = mlx4_MAD_IFC(to_mdev(ibdev), 1, 1, port, NULL, NULL, in_mad, out_mad); in __mlx4_ib_query_gid()
363 err = mlx4_MAD_IFC(to_mdev(ibdev), 1, 1, port, NULL, NULL, in_mad, out_mad); in __mlx4_ib_query_gid()
378 struct mlx4_ib_dev *dev = to_mdev(ibdev); in iboe_query_gid()
410 err = mlx4_MAD_IFC(to_mdev(ibdev), 1, 1, port, NULL, NULL, in_mad, out_mad); in mlx4_ib_query_pkey()
433 spin_lock(&to_mdev(ibdev)->sm_lock); in mlx4_ib_modify_device()
435 spin_unlock(&to_mdev(ibdev)->sm_lock); in mlx4_ib_modify_device()
441 mailbox = mlx4_alloc_cmd_mailbox(to_mdev(ibdev)->dev); in mlx4_ib_modify_device()
447 mlx4_cmd(to_mdev(ibdev)->dev, mailbox->dma, 1, 0, in mlx4_ib_modify_device()
450 mlx4_free_cmd_mailbox(to_mdev(ibdev)->dev, mailbox); in mlx4_ib_modify_device()
490 mutex_lock(&to_mdev(ibdev)->cap_mask_mutex); in mlx4_ib_modify_port()
499 err = mlx4_SET_PORT(to_mdev(ibdev), port, in mlx4_ib_modify_port()
504 mutex_unlock(&to_mdev(ibdev)->cap_mask_mutex); in mlx4_ib_modify_port()
511 struct mlx4_ib_dev *dev = to_mdev(ibdev); in mlx4_ib_alloc_ucontext()
527 err = mlx4_uar_alloc(to_mdev(ibdev)->dev, &context->uar); in mlx4_ib_alloc_ucontext()
538 mlx4_uar_free(to_mdev(ibdev)->dev, &context->uar); in mlx4_ib_alloc_ucontext()
550 mlx4_uar_free(to_mdev(ibcontext->device)->dev, &context->uar); in mlx4_ib_dealloc_ucontext()
558 struct mlx4_ib_dev *dev = to_mdev(context->device); in mlx4_ib_mmap()
595 err = mlx4_pd_alloc(to_mdev(ibdev)->dev, &pd->pdn); in mlx4_ib_alloc_pd()
603 mlx4_pd_free(to_mdev(ibdev)->dev, pd->pdn); in mlx4_ib_alloc_pd()
613 mlx4_pd_free(to_mdev(pd->device)->dev, to_mpd(pd)->pdn); in mlx4_ib_dealloc_pd()
626 if (!(to_mdev(ibdev)->dev->caps.flags & MLX4_DEV_CAP_FLAG_XRC)) in mlx4_ib_alloc_xrcd()
633 err = mlx4_xrcd_alloc(to_mdev(ibdev)->dev, &xrcd->xrcdn); in mlx4_ib_alloc_xrcd()
654 mlx4_xrcd_free(to_mdev(ibdev)->dev, xrcd->xrcdn); in mlx4_ib_alloc_xrcd()
664 mlx4_xrcd_free(to_mdev(xrcd->device)->dev, to_mxrcd(xrcd)->xrcdn); in mlx4_ib_dealloc_xrcd()
673 struct mlx4_ib_dev *mdev = to_mdev(ibqp->device); in add_gid_entry()
724 struct mlx4_ib_dev *mdev = to_mdev(ibqp->device); in mlx4_ib_mcg_attach()
763 struct mlx4_ib_dev *mdev = to_mdev(ibqp->device); in mlx4_ib_mcg_detach()
1310 struct mlx4_ib_dev *ibdev = to_mdev((struct ib_device *) ibdev_ptr); in mlx4_ib_event()