Lines Matching refs:port_num
91 static void handle_client_rereg_event(struct mlx4_ib_dev *dev, u32 port_num);
92 static void handle_lid_change_event(struct mlx4_ib_dev *dev, u32 port_num);
93 static void __propagate_pkey_ev(struct mlx4_ib_dev *dev, int port_num,
189 static void update_sm_ah(struct mlx4_ib_dev *dev, u32 port_num, u16 lid, u8 sl) in update_sm_ah() argument
195 if (!dev->send_agent[port_num - 1][0]) in update_sm_ah()
199 ah_attr.type = rdma_ah_find_type(&dev->ib_dev, port_num); in update_sm_ah()
202 rdma_ah_set_port_num(&ah_attr, port_num); in update_sm_ah()
204 new_ah = rdma_create_ah(dev->send_agent[port_num - 1][0]->qp->pd, in update_sm_ah()
210 if (dev->sm_ah[port_num - 1]) in update_sm_ah()
211 rdma_destroy_ah(dev->sm_ah[port_num - 1], 0); in update_sm_ah()
212 dev->sm_ah[port_num - 1] = new_ah; in update_sm_ah()
220 static void smp_snoop(struct ib_device *ibdev, u32 port_num, in smp_snoop() argument
241 update_sm_ah(dev, port_num, in smp_snoop()
246 handle_client_rereg_event(dev, port_num); in smp_snoop()
249 handle_lid_change_event(dev, port_num); in smp_snoop()
256 mlx4_ib_dispatch_event(dev, port_num, in smp_snoop()
271 dev->pkeys.phys_pkey_cache[port_num - 1][i + bn*32]) { in smp_snoop()
273 dev->pkeys.phys_pkey_cache[port_num - 1][i + bn*32] = in smp_snoop()
279 port_num, bn, pkey_change_bitmap); in smp_snoop()
282 mlx4_ib_dispatch_event(dev, port_num, in smp_snoop()
285 __propagate_pkey_ev(dev, port_num, bn, in smp_snoop()
295 mlx4_ib_dispatch_event(dev, port_num, in smp_snoop()
301 mlx4_ib_update_cache_on_guid_change(dev, bn, port_num, in smp_snoop()
303 mlx4_ib_notify_slaves_on_guid_change(dev, bn, port_num, in smp_snoop()
322 port_num, jj, sl2vl64.sl8[jj]); in smp_snoop()
324 atomic64_set(&dev->sl2vl[port_num - 1], sl2vl64.sl64); in smp_snoop()
333 static void __propagate_pkey_ev(struct mlx4_ib_dev *dev, int port_num, in __propagate_pkey_ev() argument
350 ix < dev->dev->caps.pkey_table_len[port_num]; ix++) { in __propagate_pkey_ev()
351 if (dev->pkeys.virt2phys_pkey[slave][port_num - 1] in __propagate_pkey_ev()
353 err = mlx4_gen_pkey_eqe(dev->dev, slave, port_num); in __propagate_pkey_ev()
356 slave, port_num, ix, err); in __propagate_pkey_ev()
383 static void forward_trap(struct mlx4_ib_dev *dev, u32 port_num, in forward_trap() argument
388 struct ib_mad_agent *agent = dev->send_agent[port_num - 1][qpn]; in forward_trap()
406 if ((send_buf->ah = dev->sm_ah[port_num - 1])) in forward_trap()
659 wr.port_num = port; in mlx4_ib_send_to_slave()
822 static int ib_process_mad(struct ib_device *ibdev, int mad_flags, u32 port_num, in ib_process_mad() argument
833 forward_trap(to_mdev(ibdev), port_num, in_mad); in ib_process_mad()
863 !ib_query_port(ibdev, port_num, &pattr)) in ib_process_mad()
870 port_num, in_wc, in_grh, in_mad, out_mad); in ib_process_mad()
875 smp_snoop(ibdev, port_num, in_mad, prev_lid); in ib_process_mad()
937 u32 port_num, const struct ib_wc *in_wc, in iboe_process_mad() argument
953 mutex_lock(&dev->counters_table[port_num - 1].mutex); in iboe_process_mad()
955 &dev->counters_table[port_num - 1].counters_list, in iboe_process_mad()
967 mutex_unlock(&dev->counters_table[port_num - 1].mutex); in iboe_process_mad()
984 int mlx4_ib_process_mad(struct ib_device *ibdev, int mad_flags, u32 port_num, in mlx4_ib_process_mad() argument
990 enum rdma_link_layer link = rdma_port_get_link_layer(ibdev, port_num); in mlx4_ib_process_mad()
1001 return iboe_process_mad(ibdev, mad_flags, port_num, in mlx4_ib_process_mad()
1004 return ib_process_mad(ibdev, mad_flags, port_num, in_wc, in_grh, in mlx4_ib_process_mad()
1009 return iboe_process_mad(ibdev, mad_flags, port_num, in_wc, in mlx4_ib_process_mad()
1078 static void handle_lid_change_event(struct mlx4_ib_dev *dev, u32 port_num) in handle_lid_change_event() argument
1080 mlx4_ib_dispatch_event(dev, port_num, IB_EVENT_LID_CHANGE); in handle_lid_change_event()
1083 mlx4_gen_slaves_port_mgt_ev(dev->dev, port_num, in handle_lid_change_event()
1087 static void handle_client_rereg_event(struct mlx4_ib_dev *dev, u32 port_num) in handle_client_rereg_event() argument
1091 mlx4_ib_invalidate_all_guid_record(dev, port_num); in handle_client_rereg_event()
1094 mlx4_ib_mcg_port_cleanup(&dev->sriov.demux[port_num - 1], 0); in handle_client_rereg_event()
1095 mlx4_gen_slaves_port_mgt_ev(dev->dev, port_num, in handle_client_rereg_event()
1112 mlx4_ib_sl2vl_update(dev, port_num); in handle_client_rereg_event()
1114 mlx4_sched_ib_sl2vl_update_work(dev, port_num); in handle_client_rereg_event()
1116 mlx4_ib_dispatch_event(dev, port_num, IB_EVENT_CLIENT_REREGISTER); in handle_client_rereg_event()
1119 static void propagate_pkey_ev(struct mlx4_ib_dev *dev, int port_num, in propagate_pkey_ev() argument
1122 __propagate_pkey_ev(dev, port_num, GET_BLK_PTR_FROM_EQE(eqe), in propagate_pkey_ev()
1126 static void handle_slaves_guid_change(struct mlx4_ib_dev *dev, u32 port_num, in handle_slaves_guid_change() argument
1158 port_num, NULL, NULL, in_mad, out_mad)) { in handle_slaves_guid_change()
1164 port_num, in handle_slaves_guid_change()
1167 port_num, in handle_slaves_guid_change()
1279 void mlx4_ib_dispatch_event(struct mlx4_ib_dev *dev, u32 port_num, in mlx4_ib_dispatch_event() argument
1285 event.element.port_num = port_num; in mlx4_ib_dispatch_event()
1436 wr.port_num = port; in mlx4_ib_send_to_wire()
1833 qp_init_attr.init_attr.port_num = ctx->port; in create_pv_sqp()
1856 attr.port_num = ctx->port; in create_pv_sqp()