Lines Matching +full:cct +full:- +full:increase

1 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
3 * Copyright(c) 2015-2017 Intel Corporation.
19 return &dd->pport[port_num - 1]; in hfi1_get_pportdata_kobj()
23 * Start of per-port congestion control structures and support code
37 ret = ppd->total_cct_entry * sizeof(struct ib_cc_table_entry_shadow) in cc_table_bin_read()
41 return -EINVAL; in cc_table_bin_read()
43 if (count > ret - pos) in cc_table_bin_read()
44 count = ret - pos; in cc_table_bin_read()
53 return -EINVAL; in cc_table_bin_read()
55 memcpy(buf, (void *)&cc_state->cct + pos, count); in cc_table_bin_read()
64 * entries for the congestion entries - increase, timer, event log
78 return -EINVAL; in cc_setting_bin_read()
79 if (count > ret - pos) in cc_setting_bin_read()
80 count = ret - pos; in cc_setting_bin_read()
89 return -EINVAL; in cc_setting_bin_read()
91 memcpy(buf, (void *)&cc_state->cong_setting + pos, count); in cc_setting_bin_read()
108 struct hfi1_pportdata *ppd = &dd->pport[port_num - 1]; in cc_prescan_show()
110 return sysfs_emit(buf, "%s\n", ppd->cc_prescan ? "on" : "off"); in cc_prescan_show()
118 struct hfi1_pportdata *ppd = &dd->pport[port_num - 1]; in cc_prescan_store()
121 ppd->cc_prescan = true; in cc_prescan_store()
123 ppd->cc_prescan = false; in cc_prescan_store()
153 return sysfs_emit(buf, "%u\n", *((u8 *)dd->sc2vl + sattr->sc)); in sc2vl_attr_show()
249 struct hfi1_ibport *ibp = &dd->pport[port_num - 1].ibport_data; in sl2sc_attr_show()
251 return sysfs_emit(buf, "%u\n", ibp->sl_to_sc[sattr->sl]); in sl2sc_attr_show()
349 return sysfs_emit(buf, "%u\n", dd->vld[vlattr->vl].mtu); in vl2mtu_attr_show()
400 /* end of per-port file structures and support code */
403 * Start of per-unit (or driver, in some cases, but replicated
412 return sysfs_emit(buf, "%x\n", dd_from_dev(dev)->minrev); in hw_rev_show()
423 if (!dd->boardname) in board_id_show()
424 return -EINVAL; in board_id_show()
426 return sysfs_emit(buf, "%s\n", dd->boardname); in board_id_show()
437 /* The string printed here is already newline-terminated. */ in boardversion_show()
438 return sysfs_emit(buf, "%s", dd->boardversion); in boardversion_show()
456 min(dd->num_user_contexts, in nctxts_show()
457 (u32)dd->sc_sizes[SC_USER].count)); in nctxts_show()
469 return sysfs_emit(buf, "%u\n", dd->freectxts); in nfreectxts_show()
480 /* dd->serial is already newline terminated in chip.c */ in serial_show()
481 return sysfs_emit(buf, "%s", dd->serial); in serial_show()
494 if (count < 5 || memcmp(buf, "reset", 5) || !dd->diag_client) { in chip_reset_store()
495 ret = -EINVAL; in chip_reset_store()
499 ret = hfi1_reset_device(dd->unit); in chip_reset_store()
513 * Dump tempsense values, in decimal, to ease shell-scripts.
540 * end of per-unit (or driver, in some cases, but replicated
544 /* start of per-unit file structures and support code */
582 if (!sde_attr->show) in sde_show()
583 return -EINVAL; in sde_show()
585 return sde_attr->show(sde, buf); in sde_show()
597 return -EPERM; in sde_store()
599 if (!sde_attr->store) in sde_store()
600 return -EINVAL; in sde_store()
602 return sde_attr->store(sde, buf, count); in sde_store()
655 struct ib_device *dev = &dd->verbs_dev.rdi.ibdev; in hfi1_verbs_register_sysfs()
656 struct device *class_dev = &dev->dev; in hfi1_verbs_register_sysfs()
659 for (i = 0; i < dd->num_sdma; i++) { in hfi1_verbs_register_sysfs()
660 ret = kobject_init_and_add(&dd->per_sdma[i].kobj, in hfi1_verbs_register_sysfs()
661 &sde_ktype, &class_dev->kobj, in hfi1_verbs_register_sysfs()
667 ret = sysfs_create_file(&dd->per_sdma[i].kobj, in hfi1_verbs_register_sysfs()
668 &sde_attribs[j]->attr); in hfi1_verbs_register_sysfs()
681 for (; i >= 0; i--) in hfi1_verbs_register_sysfs()
682 kobject_put(&dd->per_sdma[i].kobj); in hfi1_verbs_register_sysfs()
695 for (i = 0; i < dd->num_sdma; i++) in hfi1_verbs_unregister_sysfs()
696 kobject_put(&dd->per_sdma[i].kobj); in hfi1_verbs_unregister_sysfs()