Lines Matching refs:port_num
65 u8 port_num; member
97 u8 port_num; member
164 ret = ib_query_port(p->ibdev, p->port_num, &attr); in state_show()
179 ret = ib_query_port(p->ibdev, p->port_num, &attr); in lid_show()
193 ret = ib_query_port(p->ibdev, p->port_num, &attr); in lid_mask_count_show()
206 ret = ib_query_port(p->ibdev, p->port_num, &attr); in sm_lid_show()
219 ret = ib_query_port(p->ibdev, p->port_num, &attr); in sm_sl_show()
232 ret = ib_query_port(p->ibdev, p->port_num, &attr); in cap_mask_show()
247 ret = ib_query_port(p->ibdev, p->port_num, &attr); in rate_show()
317 ret = ib_query_port(p->ibdev, p->port_num, &attr); in phys_state_show()
328 switch (rdma_port_get_link_layer(p->ibdev, p->port_num)) { in link_layer_show()
388 gid_attr = rdma_get_gid_attr(p->ibdev, p->port_num, tab_attr->index); in _show_port_gid_attr()
406 gid_attr = rdma_get_gid_attr(p->ibdev, p->port_num, tab_attr->index); in show_port_gid()
448 ret = ib_query_pkey(p->ibdev, p->port_num, tab_attr->index, &pkey); in show_port_pkey()
473 static int get_perf_mad(struct ib_device *dev, int port_num, __be16 attr, in get_perf_mad() argument
499 in_mad->data[41] = port_num; /* PortSelect field */ in get_perf_mad()
501 if ((dev->ops.process_mad(dev, IB_MAD_IGNORE_MKEY, port_num, NULL, NULL, in get_perf_mad()
527 ret = get_perf_mad(p->ibdev, p->port_num, tab_attr->attr_id, &data, in show_pma_counter()
783 int port_num) in get_counter_table() argument
787 if (get_perf_mad(dev, port_num, IB_PMA_CLASS_PORT_INFO, in get_counter_table()
803 u8 port_num, int index) in update_hw_stats() argument
809 ret = dev->ops.get_hw_stats(dev, stats, port_num, index); in update_hw_stats()
818 static ssize_t print_hw_stat(struct ib_device *dev, int port_num, in print_hw_stat() argument
821 u64 v = rdma_counter_get_hwstat_value(dev, port_num, index); in print_hw_stat()
836 if (!hsa->port_num) { in show_hw_stats()
846 ret = update_hw_stats(dev, stats, hsa->port_num, hsa->index); in show_hw_stats()
849 ret = print_hw_stat(dev, hsa->port_num, stats, hsa->index, buf); in show_hw_stats()
865 if (!hsa->port_num) { in show_stats_lifespan()
900 if (!hsa->port_num) { in set_stats_lifespan()
929 static struct attribute *alloc_hsa(int index, u8 port_num, const char *name) in alloc_hsa() argument
942 hsa->port_num = port_num; in alloc_hsa()
947 static struct attribute *alloc_hsa_lifespan(char *name, u8 port_num) in alloc_hsa_lifespan() argument
960 hsa->port_num = port_num; in alloc_hsa_lifespan()
966 u8 port_num) in setup_hw_stats() argument
972 stats = device->ops.alloc_hw_stats(device, port_num); in setup_hw_stats()
990 ret = device->ops.get_hw_stats(device, stats, port_num, in setup_hw_stats()
1001 hsag->attrs[i] = alloc_hsa(i, port_num, stats->names[i]); in setup_hw_stats()
1009 hsag->attrs[i] = alloc_hsa_lifespan("lifespan", port_num); in setup_hw_stats()
1021 device->port_data[port_num].hw_stats = stats; in setup_hw_stats()
1043 static int add_port(struct ib_core_device *coredev, int port_num) in add_port() argument
1052 ret = ib_query_port(device, port_num, &attr); in add_port()
1061 p->port_num = port_num; in add_port()
1065 "%d", port_num); in add_port()
1084 p->pma_table = get_counter_table(device, port_num); in add_port()
1149 ret = device->ops.init_port(device, port_num, &p->kobj); in add_port()
1159 if (device->ops.alloc_hw_stats && port_num && is_full_dev) in add_port()
1160 setup_hw_stats(device, p, port_num); in add_port()
1337 device->port_data[port->port_num].hw_stats = NULL; in ib_free_port_attrs()
1412 int ib_port_register_module_stat(struct ib_device *device, u8 port_num, in ib_port_register_module_stat() argument
1422 if (port->port_num != port_num) in ib_port_register_module_stat()