Lines Matching refs:ibdev

216 static void smp_snoop(struct ib_device *ibdev, u8 port_num, const struct ib_mad *mad,  in smp_snoop()  argument
226 struct mlx4_ib_dev *dev = to_mdev(ibdev); in smp_snoop()
385 static int mlx4_ib_demux_sa_handler(struct ib_device *ibdev, int port, int slave, in mlx4_ib_demux_sa_handler() argument
393 ret = mlx4_ib_mcg_demux_handler(ibdev, port, slave, sa_mad); in mlx4_ib_demux_sa_handler()
401 int mlx4_ib_find_real_gid(struct ib_device *ibdev, u8 port, __be64 guid) in mlx4_ib_find_real_gid() argument
403 struct mlx4_ib_dev *dev = to_mdev(ibdev); in mlx4_ib_find_real_gid()
604 static int mlx4_ib_demux_mad(struct ib_device *ibdev, u8 port, in mlx4_ib_demux_mad() argument
608 struct mlx4_ib_dev *dev = to_mdev(ibdev); in mlx4_ib_demux_mad()
614 if (rdma_port_get_link_layer(ibdev, port) == IB_LINK_LAYER_INFINIBAND) in mlx4_ib_demux_mad()
621 mlx4_ib_warn(ibdev, "RoCE grh not present.\n"); in mlx4_ib_demux_mad()
625 mlx4_ib_warn(ibdev, "RoCE mgmt class is not CM\n"); in mlx4_ib_demux_mad()
629 mlx4_ib_warn(ibdev, "failed matching grh\n"); in mlx4_ib_demux_mad()
633 mlx4_ib_warn(ibdev, "slave id: %d is bigger than allowed:%d\n", in mlx4_ib_demux_mad()
638 if (mlx4_ib_demux_cm_handler(ibdev, port, NULL, mad)) in mlx4_ib_demux_mad()
661 slave = mlx4_ib_find_real_gid(ibdev, port, grh->dgid.global.interface_id); in mlx4_ib_demux_mad()
663 mlx4_ib_warn(ibdev, "failed matching grh\n"); in mlx4_ib_demux_mad()
677 … mlx4_ib_warn(ibdev, "demux QP0. rejecting unsolicited mad for slave %d class 0x%x, method 0x%x\n", in mlx4_ib_demux_mad()
685 if (mlx4_ib_demux_sa_handler(ibdev, port, slave, in mlx4_ib_demux_mad()
690 if (mlx4_ib_demux_cm_handler(ibdev, port, &slave, mad)) in mlx4_ib_demux_mad()
707 mlx4_ib_warn(ibdev, "slave id: %d is bigger than allowed:%d\n", in mlx4_ib_demux_mad()
719 static int ib_process_mad(struct ib_device *ibdev, int mad_flags, u8 port_num, in ib_process_mad() argument
749 forward_trap(to_mdev(ibdev), port_num, in_mad); in ib_process_mad()
779 !ib_query_port(ibdev, port_num, &pattr)) in ib_process_mad()
782 err = mlx4_MAD_IFC(to_mdev(ibdev), in ib_process_mad()
791 if (!(to_mdev(ibdev)->dev->caps.flags & MLX4_DEV_CAP_FLAG_PORT_MNG_CHG_EV)) in ib_process_mad()
792 smp_snoop(ibdev, port_num, in_mad, prev_lid); in ib_process_mad()
794 if (!mlx4_is_slave(to_mdev(ibdev)->dev)) in ib_process_mad()
795 node_desc_override(ibdev, out_mad); in ib_process_mad()
822 static int iboe_process_mad(struct ib_device *ibdev, int mad_flags, u8 port_num, in iboe_process_mad() argument
827 struct mlx4_ib_dev *dev = to_mdev(ibdev); in iboe_process_mad()
866 int mlx4_ib_process_mad(struct ib_device *ibdev, int mad_flags, u8 port_num, in mlx4_ib_process_mad() argument
872 struct mlx4_ib_dev *dev = to_mdev(ibdev); in mlx4_ib_process_mad()
875 enum rdma_link_layer link = rdma_port_get_link_layer(ibdev, port_num); in mlx4_ib_process_mad()
888 return iboe_process_mad(ibdev, mad_flags, port_num, in_wc, in mlx4_ib_process_mad()
891 return ib_process_mad(ibdev, mad_flags, port_num, in_wc, in mlx4_ib_process_mad()
896 return iboe_process_mad(ibdev, mad_flags, port_num, in_wc, in mlx4_ib_process_mad()
1160 static int mlx4_ib_multiplex_sa_handler(struct ib_device *ibdev, int port, in mlx4_ib_multiplex_sa_handler() argument
1168 ret = mlx4_ib_mcg_multiplex_handler(ibdev, port, slave, sa_mad); in mlx4_ib_multiplex_sa_handler()
1798 static int create_pv_resources(struct ib_device *ibdev, int slave, int port, in create_pv_resources() argument
1809 if (rdma_port_get_link_layer(ibdev, ctx->port) == in create_pv_resources()
1868 ctx->wq = to_mdev(ibdev)->sriov.demux[port - 1].wq; in create_pv_resources()