Lines Matching full:die

20  *   the die:
415 u8 die_idx, struct hccs_die_info *die) in hccs_query_die_info_on_chip() argument
431 die->die_id = rsp_data->die_id; in hccs_query_die_info_on_chip()
432 die->port_num = rsp_data->port_num; in hccs_query_die_info_on_chip()
433 die->min_port_id = rsp_data->min_port_id; in hccs_query_die_info_on_chip()
434 die->max_port_id = rsp_data->max_port_id; in hccs_query_die_info_on_chip()
435 if (die->min_port_id > die->max_port_id) { in hccs_query_die_info_on_chip()
437 die->min_port_id, die->max_port_id, die_idx); in hccs_query_die_info_on_chip()
440 if (die->max_port_id > HCCS_DIE_MAX_PORT_ID) { in hccs_query_die_info_on_chip()
442 die->max_port_id, die_idx); in hccs_query_die_info_on_chip()
453 struct hccs_die_info *die; in hccs_query_all_die_info_on_platform() local
472 die = &chip->dies[j]; in hccs_query_all_die_info_on_platform()
473 ret = hccs_query_die_info_on_chip(hdev, i, j, die); in hccs_query_all_die_info_on_platform()
475 dev_err(dev, "get die idx (%u) info on chip%u failed, ret = %d.\n", in hccs_query_all_die_info_on_platform()
479 die->chip = chip; in hccs_query_all_die_info_on_platform()
515 struct hccs_die_info *die, in hccs_get_all_port_attr() argument
530 start_id = die->min_port_id; in hccs_get_all_port_attr()
531 while (start_id <= die->max_port_id) { in hccs_get_all_port_attr()
536 req_param->chip_id = die->chip->chip_id; in hccs_get_all_port_attr()
537 req_param->die_id = die->die_id; in hccs_get_all_port_attr()
543 "get the information of port%u on die%u failed, ret = %d.\n", in hccs_get_all_port_attr()
544 start_id, die->die_id, ret); in hccs_get_all_port_attr()
552 "next port id (%u) is not greater than last start id (%u) on die%u.\n", in hccs_get_all_port_attr()
553 rsp_head.next_id, start_id, die->die_id); in hccs_get_all_port_attr()
569 struct hccs_die_info *die) in hccs_get_all_port_info_on_die() argument
576 attrs = kcalloc(die->port_num, sizeof(struct hccs_port_attr), in hccs_get_all_port_info_on_die()
581 ret = hccs_get_all_port_attr(hdev, die, attrs, die->port_num); in hccs_get_all_port_info_on_die()
585 for (i = 0; i < die->port_num; i++) { in hccs_get_all_port_info_on_die()
586 port = &die->ports[i]; in hccs_get_all_port_info_on_die()
591 port->die = die; in hccs_get_all_port_info_on_die()
603 struct hccs_die_info *die; in hccs_query_all_port_info_on_platform() local
610 die = &chip->dies[j]; in hccs_query_all_port_info_on_platform()
611 if (!die->port_num) in hccs_query_all_port_info_on_platform()
614 die->ports = devm_kzalloc(dev, in hccs_query_all_port_info_on_platform()
615 die->port_num * sizeof(struct hccs_port_info), in hccs_query_all_port_info_on_platform()
617 if (!die->ports) { in hccs_query_all_port_info_on_platform()
618 dev_err(dev, "allocate ports memory on chip%u/die%u failed.\n", in hccs_query_all_port_info_on_platform()
619 i, die->die_id); in hccs_query_all_port_info_on_platform()
623 ret = hccs_get_all_port_info_on_die(hdev, die); in hccs_query_all_port_info_on_platform()
625 dev_err(dev, "get all port info on chip%u/die%u failed, ret = %d.\n", in hccs_query_all_port_info_on_platform()
626 i, die->die_id, ret); in hccs_query_all_port_info_on_platform()
648 dev_err(hdev->dev, "query all die info on platform failed, ret = %d.\n", in hccs_get_hw_info()
667 const struct hccs_die_info *die = port->die; in hccs_query_port_link_status() local
668 const struct hccs_chip_info *chip = die->chip; in hccs_query_port_link_status()
676 req_param->die_id = die->die_id; in hccs_query_port_link_status()
694 const struct hccs_die_info *die = port->die; in hccs_query_port_crc_err_cnt() local
695 const struct hccs_chip_info *chip = die->chip; in hccs_query_port_crc_err_cnt()
703 req_param->die_id = die->die_id; in hccs_query_port_crc_err_cnt()
718 const struct hccs_die_info *die, in hccs_get_die_all_link_status() argument
725 if (die->port_num == 0) { in hccs_get_die_all_link_status()
732 req_param->chip_id = die->chip->chip_id; in hccs_get_die_all_link_status()
733 req_param->die_id = die->die_id; in hccs_get_die_all_link_status()
737 "get link status of all ports failed on die%u, ret = %d.\n", in hccs_get_die_all_link_status()
738 die->die_id, ret); in hccs_get_die_all_link_status()
748 const struct hccs_die_info *die, in hccs_get_die_all_port_lane_status() argument
755 if (die->port_num == 0) { in hccs_get_die_all_port_lane_status()
762 req_param->chip_id = die->chip->chip_id; in hccs_get_die_all_port_lane_status()
763 req_param->die_id = die->die_id; in hccs_get_die_all_port_lane_status()
766 dev_err(hdev->dev, "get lane status of all ports failed on die%u, ret = %d.\n", in hccs_get_die_all_port_lane_status()
767 die->die_id, ret); in hccs_get_die_all_port_lane_status()
777 const struct hccs_die_info *die, in hccs_get_die_total_crc_err_cnt() argument
784 if (die->port_num == 0) { in hccs_get_die_total_crc_err_cnt()
791 req_param->chip_id = die->chip->chip_id; in hccs_get_die_total_crc_err_cnt()
792 req_param->die_id = die->die_id; in hccs_get_die_total_crc_err_cnt()
795 dev_err(hdev->dev, "get crc error count sum failed on die%u, ret = %d.\n", in hccs_get_die_total_crc_err_cnt()
796 die->die_id, ret); in hccs_get_die_total_crc_err_cnt()
849 struct hccs_dev *hdev = port->die->chip->hdev; in cur_lane_num_show()
867 struct hccs_dev *hdev = port->die->chip->hdev; in link_fsm_show()
903 struct hccs_dev *hdev = port->die->chip->hdev; in lane_mask_show()
921 struct hccs_dev *hdev = port->die->chip->hdev; in crc_err_cnt_show()
955 const struct hccs_die_info *die = kobj_to_die_info(kobj); in all_linked_on_die_show() local
956 struct hccs_dev *hdev = die->chip->hdev; in all_linked_on_die_show()
961 ret = hccs_get_die_all_link_status(hdev, die, &all_linked); in all_linked_on_die_show()
975 const struct hccs_die_info *die = kobj_to_die_info(kobj); in linked_full_lane_on_die_show() local
976 struct hccs_dev *hdev = die->chip->hdev; in linked_full_lane_on_die_show()
981 ret = hccs_get_die_all_port_lane_status(hdev, die, &full_lane); in linked_full_lane_on_die_show()
995 const struct hccs_die_info *die = kobj_to_die_info(kobj); in crc_err_cnt_sum_on_die_show() local
996 struct hccs_dev *hdev = die->chip->hdev; in crc_err_cnt_sum_on_die_show()
1001 ret = hccs_get_die_total_crc_err_cnt(hdev, die, &total_crc_err_cnt); in crc_err_cnt_sum_on_die_show()
1029 const struct hccs_die_info *die; in all_linked_on_chip_show() local
1036 die = &chip->dies[i]; in all_linked_on_chip_show()
1037 ret = hccs_get_die_all_link_status(hdev, die, &tmp); in all_linked_on_chip_show()
1060 const struct hccs_die_info *die; in linked_full_lane_on_chip_show() local
1067 die = &chip->dies[i]; in linked_full_lane_on_chip_show()
1068 ret = hccs_get_die_all_port_lane_status(hdev, die, &tmp); in linked_full_lane_on_chip_show()
1092 const struct hccs_die_info *die; in crc_err_cnt_sum_on_chip_show() local
1098 die = &chip->dies[i]; in crc_err_cnt_sum_on_chip_show()
1099 ret = hccs_get_die_total_crc_err_cnt(hdev, die, &crc_err_cnt); in crc_err_cnt_sum_on_chip_show()
1127 static void hccs_remove_die_dir(struct hccs_die_info *die) in hccs_remove_die_dir() argument
1132 for (i = 0; i < die->port_num; i++) { in hccs_remove_die_dir()
1133 port = &die->ports[i]; in hccs_remove_die_dir()
1138 kobject_put(&die->kobj); in hccs_remove_die_dir()
1143 struct hccs_die_info *die; in hccs_remove_chip_dir() local
1147 die = &chip->dies[i]; in hccs_remove_chip_dir()
1148 if (die->dir_created) in hccs_remove_chip_dir()
1149 hccs_remove_die_dir(die); in hccs_remove_chip_dir()
1164 struct hccs_die_info *die, in hccs_create_hccs_dir() argument
1170 &die->kobj, "hccs%u", port->port_id); in hccs_create_hccs_dir()
1181 struct hccs_die_info *die) in hccs_create_die_dir() argument
1187 ret = kobject_init_and_add(&die->kobj, &hccs_die_type, in hccs_create_die_dir()
1188 &chip->kobj, "die%u", die->die_id); in hccs_create_die_dir()
1190 kobject_put(&die->kobj); in hccs_create_die_dir()
1194 for (i = 0; i < die->port_num; i++) { in hccs_create_die_dir()
1195 port = &die->ports[i]; in hccs_create_die_dir()
1196 ret = hccs_create_hccs_dir(hdev, die, port); in hccs_create_die_dir()
1207 hccs_remove_die_dir(die); in hccs_create_die_dir()
1215 struct hccs_die_info *die; in hccs_create_chip_dir() local
1227 die = &chip->dies[id]; in hccs_create_chip_dir()
1228 ret = hccs_create_die_dir(hdev, chip, die); in hccs_create_chip_dir()
1231 die->dir_created = true; in hccs_create_chip_dir()