Lines Matching +full:in +full:- +full:ports
7 * COPYING in the main directory of this source tree, or the
10 * Redistribution and use in source and binary forms, with or
14 * - Redistributions of source code must retain the above
18 * - Redistributions in binary form must reproduce the above
20 * disclaimer in the documentation and/or other materials
26 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
27 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
28 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
29 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
54 struct cma_dev_port_group *ports; member
70 return !strcmp(dev_name(&ib_dev->dev), cookie); in filter_by_name()
81 return -ENODEV; in cma_configfs_params_get()
84 group->cma_dev_group->name); in cma_configfs_params_get()
86 return -ENODEV; in cma_configfs_params_get()
111 gid_type = cma_get_default_gid_type(cma_dev, group->port_num); in default_roce_mode_show()
135 return -EINVAL; in default_roce_mode_store()
138 ret = cma_set_default_gid_type(cma_dev, group->port_num, gid_type); in default_roce_mode_store()
158 tos = cma_get_default_roce_tos(cma_dev, group->port_num); in default_roce_tos_show()
180 ret = cma_set_default_roce_tos(cma_dev, group->port_num, tos); in default_roce_tos_store()
202 struct cma_dev_port_group *ports; in make_cma_ports() local
210 return -ENODEV; in make_cma_ports()
212 ports_num = ibdev->phys_port_cnt; in make_cma_ports()
213 ports = kcalloc(ports_num, sizeof(*cma_dev_group->ports), in make_cma_ports()
216 if (!ports) in make_cma_ports()
217 return -ENOMEM; in make_cma_ports()
222 ports[i].port_num = i + 1; in make_cma_ports()
224 ports[i].cma_dev_group = cma_dev_group; in make_cma_ports()
225 config_group_init_type_name(&ports[i].group, in make_cma_ports()
228 configfs_add_default_group(&ports[i].group, in make_cma_ports()
229 &cma_dev_group->ports_group); in make_cma_ports()
232 cma_dev_group->ports = ports; in make_cma_ports()
255 kfree(cma_dev_group->ports); in release_cma_ports_group()
256 cma_dev_group->ports = NULL; in release_cma_ports_group()
280 int err = -ENODEV; in make_cma_dev()
291 err = -ENOMEM; in make_cma_dev()
295 strscpy(cma_dev_group->name, name, sizeof(cma_dev_group->name)); in make_cma_dev()
297 config_group_init_type_name(&cma_dev_group->ports_group, "ports", in make_cma_dev()
304 config_group_init_type_name(&cma_dev_group->device_group, name, in make_cma_dev()
306 configfs_add_default_group(&cma_dev_group->ports_group, in make_cma_dev()
307 &cma_dev_group->device_group); in make_cma_dev()
310 return &cma_dev_group->device_group; in make_cma_dev()
326 configfs_remove_default_groups(&cma_dev_group->ports_group); in drop_cma_dev()
327 configfs_remove_default_groups(&cma_dev_group->device_group); in drop_cma_dev()