Lines Matching refs:mdev
348 struct mlx4_ib_dev *mdev = to_mdev(ibdev); in eth_link_query_port() local
349 struct mlx4_ib_iboe *iboe = &mdev->iboe; in eth_link_query_port()
354 int is_bonded = mlx4_is_bonded(mdev->dev); in eth_link_query_port()
356 mailbox = mlx4_alloc_cmd_mailbox(mdev->dev); in eth_link_query_port()
360 err = mlx4_cmd_box(mdev->dev, 0, mailbox->dma, port, 0, in eth_link_query_port()
370 props->gid_tbl_len = mdev->dev->caps.gid_table_len[port]; in eth_link_query_port()
371 props->max_msg_sz = mdev->dev->caps.max_msg_sz; in eth_link_query_port()
398 mlx4_free_cmd_mailbox(mdev->dev, mailbox); in eth_link_query_port()
601 struct mlx4_ib_dev *mdev = to_mdev(ibdev); in mlx4_ib_modify_port() local
602 u8 is_eth = mdev->dev->caps.port_type[port] == MLX4_PORT_TYPE_ETH; in mlx4_ib_modify_port()
614 mutex_lock(&mdev->cap_mask_mutex); in mlx4_ib_modify_port()
623 err = mlx4_ib_SET_PORT(mdev, port, in mlx4_ib_modify_port()
810 struct mlx4_ib_dev *mdev = to_mdev(ibqp->device); in add_gid_entry() local
818 if (mlx4_ib_add_mc(mdev, mqp, gid)) { in add_gid_entry()
830 int mlx4_ib_add_mc(struct mlx4_ib_dev *mdev, struct mlx4_ib_qp *mqp, in mlx4_ib_add_mc() argument
839 spin_lock_bh(&mdev->iboe.lock); in mlx4_ib_add_mc()
840 ndev = mdev->iboe.netdevs[mqp->port - 1]; in mlx4_ib_add_mc()
843 spin_unlock_bh(&mdev->iboe.lock); in mlx4_ib_add_mc()
985 struct mlx4_ib_dev *mdev, in __mlx4_ib_create_default_rules() argument
1009 ret = parse_flow_attr(mdev->dev, 0, &ib_spec, in __mlx4_ib_create_default_rules()
1030 struct mlx4_ib_dev *mdev = to_mdev(qp->device); in __mlx4_ib_create_flow() local
1052 if (mlx4_map_sw_to_hw_steering_mode(mdev->dev, flow_type) < 0) in __mlx4_ib_create_flow()
1055 mailbox = mlx4_alloc_cmd_mailbox(mdev->dev); in __mlx4_ib_create_flow()
1062 ctrl->type = mlx4_map_sw_to_hw_steering_mode(mdev->dev, flow_type); in __mlx4_ib_create_flow()
1072 mdev, qp, default_table + default_flow, in __mlx4_ib_create_flow()
1075 mlx4_free_cmd_mailbox(mdev->dev, mailbox); in __mlx4_ib_create_flow()
1081 ret = parse_flow_attr(mdev->dev, qp->qp_num, ib_flow, in __mlx4_ib_create_flow()
1084 mlx4_free_cmd_mailbox(mdev->dev, mailbox); in __mlx4_ib_create_flow()
1091 ret = mlx4_cmd_imm(mdev->dev, mailbox->dma, reg_id, size >> 2, 0, in __mlx4_ib_create_flow()
1101 mlx4_free_cmd_mailbox(mdev->dev, mailbox); in __mlx4_ib_create_flow()
1246 struct mlx4_ib_dev *mdev = to_mdev(flow_id->qp->device); in mlx4_ib_destroy_flow() local
1250 err = __mlx4_ib_destroy_flow(mdev->dev, mflow->reg_id[i].id); in mlx4_ib_destroy_flow()
1254 err = __mlx4_ib_destroy_flow(mdev->dev, in mlx4_ib_destroy_flow()
1269 struct mlx4_ib_dev *mdev = to_mdev(ibqp->device); in mlx4_ib_mcg_attach() local
1270 struct mlx4_dev *dev = mdev->dev; in mlx4_ib_mcg_attach()
1276 if (mdev->dev->caps.steering_mode == in mlx4_ib_mcg_attach()
1283 err = mlx4_multicast_attach(mdev->dev, &mqp->mqp, gid->raw, mqp->port, in mlx4_ib_mcg_attach()
1294 err = mlx4_multicast_attach(mdev->dev, &mqp->mqp, gid->raw, in mlx4_ib_mcg_attach()
1317 mlx4_multicast_detach(mdev->dev, &mqp->mqp, gid->raw, in mlx4_ib_mcg_attach()
1320 mlx4_multicast_detach(mdev->dev, &mqp->mqp, gid->raw, in mlx4_ib_mcg_attach()
1347 struct mlx4_ib_dev *mdev = to_mdev(ibqp->device); in mlx4_ib_mcg_detach() local
1348 struct mlx4_dev *dev = mdev->dev; in mlx4_ib_mcg_detach()
1355 if (mdev->dev->caps.steering_mode == in mlx4_ib_mcg_detach()
1375 err = mlx4_multicast_detach(mdev->dev, &mqp->mqp, gid->raw, in mlx4_ib_mcg_detach()
1381 err = mlx4_multicast_detach(mdev->dev, &mqp->mqp, gid->raw, in mlx4_ib_mcg_detach()
1390 spin_lock_bh(&mdev->iboe.lock); in mlx4_ib_mcg_detach()
1391 ndev = ge->added ? mdev->iboe.netdevs[ge->port - 1] : NULL; in mlx4_ib_mcg_detach()
1394 spin_unlock_bh(&mdev->iboe.lock); in mlx4_ib_mcg_detach()
2491 int mlx4_ib_steer_qp_reg(struct mlx4_ib_dev *mdev, struct mlx4_ib_qp *mqp, in mlx4_ib_steer_qp_reg() argument
2519 err = __mlx4_ib_destroy_flow(mdev->dev, mqp->reg_id); in mlx4_ib_steer_qp_reg()