Lines Matching refs:port_num
64 u8 port_num; member
96 u8 port_num; member
163 ret = ib_query_port(p->ibdev, p->port_num, &attr); in state_show()
178 ret = ib_query_port(p->ibdev, p->port_num, &attr); in lid_show()
192 ret = ib_query_port(p->ibdev, p->port_num, &attr); in lid_mask_count_show()
205 ret = ib_query_port(p->ibdev, p->port_num, &attr); in sm_lid_show()
218 ret = ib_query_port(p->ibdev, p->port_num, &attr); in sm_sl_show()
231 ret = ib_query_port(p->ibdev, p->port_num, &attr); in cap_mask_show()
246 ret = ib_query_port(p->ibdev, p->port_num, &attr); in rate_show()
298 ret = ib_query_port(p->ibdev, p->port_num, &attr); in phys_state_show()
317 switch (rdma_port_get_link_layer(p->ibdev, p->port_num)) { in link_layer_show()
372 gid_attr = rdma_get_gid_attr(p->ibdev, p->port_num, tab_attr->index); in _show_port_gid_attr()
389 gid_attr = rdma_get_gid_attr(p->ibdev, p->port_num, tab_attr->index); in show_port_gid()
431 ret = ib_query_pkey(p->ibdev, p->port_num, tab_attr->index, &pkey); in show_port_pkey()
456 static int get_perf_mad(struct ib_device *dev, int port_num, __be16 attr, in get_perf_mad() argument
482 in_mad->data[41] = port_num; /* PortSelect field */ in get_perf_mad()
485 port_num, NULL, NULL, in get_perf_mad()
512 ret = get_perf_mad(p->ibdev, p->port_num, tab_attr->attr_id, &data, in show_pma_counter()
763 int port_num) in get_counter_table() argument
767 if (get_perf_mad(dev, port_num, IB_PMA_CLASS_PORT_INFO, in get_counter_table()
783 u8 port_num, int index) in update_hw_stats() argument
789 ret = dev->get_hw_stats(dev, stats, port_num, index); in update_hw_stats()
813 if (!hsa->port_num) { in show_hw_stats()
823 ret = update_hw_stats(dev, stats, hsa->port_num, hsa->index); in show_hw_stats()
842 if (!hsa->port_num) { in show_stats_lifespan()
877 if (!hsa->port_num) { in set_stats_lifespan()
906 static struct attribute *alloc_hsa(int index, u8 port_num, const char *name) in alloc_hsa() argument
919 hsa->port_num = port_num; in alloc_hsa()
924 static struct attribute *alloc_hsa_lifespan(char *name, u8 port_num) in alloc_hsa_lifespan() argument
937 hsa->port_num = port_num; in alloc_hsa_lifespan()
943 u8 port_num) in setup_hw_stats() argument
949 stats = device->alloc_hw_stats(device, port_num); in setup_hw_stats()
967 ret = device->get_hw_stats(device, stats, port_num, in setup_hw_stats()
978 hsag->attrs[i] = alloc_hsa(i, port_num, stats->names[i]); in setup_hw_stats()
986 hsag->attrs[i] = alloc_hsa_lifespan("lifespan", port_num); in setup_hw_stats()
1018 static int add_port(struct ib_device *device, int port_num, in add_port() argument
1027 ret = ib_query_port(device, port_num, &attr); in add_port()
1036 p->port_num = port_num; in add_port()
1040 "%d", port_num); in add_port()
1060 p->pma_table = get_counter_table(device, port_num); in add_port()
1115 ret = port_callback(device, port_num, &p->kobj); in add_port()
1125 if (device->alloc_hw_stats && port_num) in add_port()
1126 setup_hw_stats(device, p, port_num); in add_port()