Lines Matching refs:bp
35 static void bnx2x_pfc_set_pfc(struct bnx2x *bp);
36 static void bnx2x_dcbx_update_ets_params(struct bnx2x *bp);
37 static void bnx2x_dcbx_get_ets_pri_pg_tbl(struct bnx2x *bp,
40 static void bnx2x_dcbx_get_num_pg_traf_type(struct bnx2x *bp,
43 static void bnx2x_dcbx_fill_cos_params(struct bnx2x *bp,
47 static void bnx2x_dcbx_separate_pauseable_from_non(struct bnx2x *bp,
51 static void bnx2x_dcbx_fw_struct(struct bnx2x *bp,
55 static void bnx2x_read_data(struct bnx2x *bp, u32 *buff, in bnx2x_read_data() argument
60 *buff = REG_RD(bp, addr + i); in bnx2x_read_data()
63 static void bnx2x_write_data(struct bnx2x *bp, u32 *buff, in bnx2x_write_data() argument
68 REG_WR(bp, addr + i, *buff); in bnx2x_write_data()
71 static void bnx2x_pfc_set(struct bnx2x *bp) in bnx2x_pfc_set() argument
78 bp->dcbx_port_params.ets.num_of_cos; in bnx2x_pfc_set()
81 for (i = 0; i < bp->dcbx_port_params.ets.num_of_cos; i++) in bnx2x_pfc_set()
88 bp->dcbx_port_params.ets.cos_params[i].pri_bitmask in bnx2x_pfc_set()
89 & DCBX_PFC_PRI_PAUSE_MASK(bp); in bnx2x_pfc_set()
99 if (!(pri_bit & DCBX_PFC_PRI_PAUSE_MASK(bp))) in bnx2x_pfc_set()
106 pfc_params.llfc_low_priority_classes = DCBX_PFC_PRI_PAUSE_MASK(bp); in bnx2x_pfc_set()
110 bnx2x_acquire_phy_lock(bp); in bnx2x_pfc_set()
111 bp->link_params.feature_config_flags |= FEATURE_CONFIG_PFC_ENABLED; in bnx2x_pfc_set()
112 bnx2x_update_pfc(&bp->link_params, &bp->link_vars, &pfc_params); in bnx2x_pfc_set()
113 bnx2x_release_phy_lock(bp); in bnx2x_pfc_set()
116 static void bnx2x_pfc_clear(struct bnx2x *bp) in bnx2x_pfc_clear() argument
120 bnx2x_acquire_phy_lock(bp); in bnx2x_pfc_clear()
121 bp->link_params.feature_config_flags &= ~FEATURE_CONFIG_PFC_ENABLED; in bnx2x_pfc_clear()
122 bnx2x_update_pfc(&bp->link_params, &bp->link_vars, &nig_params); in bnx2x_pfc_clear()
123 bnx2x_release_phy_lock(bp); in bnx2x_pfc_clear()
126 static void bnx2x_dump_dcbx_drv_param(struct bnx2x *bp, in bnx2x_dump_dcbx_drv_param() argument
172 static void bnx2x_dcbx_get_ap_priority(struct bnx2x *bp, in bnx2x_dcbx_get_ap_priority() argument
179 u32 *ttp = bp->dcbx_port_params.app.traffic_type_priority; in bnx2x_dcbx_get_ap_priority()
193 static void bnx2x_dcbx_get_ap_feature(struct bnx2x *bp, in bnx2x_dcbx_get_ap_feature() argument
197 u32 *ttp = bp->dcbx_port_params.app.traffic_type_priority; in bnx2x_dcbx_get_ap_feature()
211 bp->dcbx_port_params.app.enabled = true; in bnx2x_dcbx_get_ap_feature()
226 bnx2x_dcbx_get_ap_priority(bp, in bnx2x_dcbx_get_ap_feature()
233 bnx2x_dcbx_get_ap_priority(bp, in bnx2x_dcbx_get_ap_feature()
239 bp->dcbx_port_params.app.enabled = false; in bnx2x_dcbx_get_ap_feature()
245 static void bnx2x_dcbx_get_ets_feature(struct bnx2x *bp, in bnx2x_dcbx_get_ets_feature() argument
252 bp->dcbx_port_params.ets.cos_params; in bnx2x_dcbx_get_ets_feature()
263 for (i = 0; i < ARRAY_SIZE(bp->dcbx_port_params.ets.cos_params) ; i++) { in bnx2x_dcbx_get_ets_feature()
270 if (bp->dcbx_port_params.app.enabled && ets->enabled && in bnx2x_dcbx_get_ets_feature()
274 bp->dcbx_port_params.ets.enabled = true; in bnx2x_dcbx_get_ets_feature()
276 bnx2x_dcbx_get_ets_pri_pg_tbl(bp, in bnx2x_dcbx_get_ets_feature()
280 bnx2x_dcbx_get_num_pg_traf_type(bp, in bnx2x_dcbx_get_ets_feature()
284 bnx2x_dcbx_fill_cos_params(bp, &pg_help_data, in bnx2x_dcbx_get_ets_feature()
289 bp->dcbx_port_params.ets.enabled = false; in bnx2x_dcbx_get_ets_feature()
297 static void bnx2x_dcbx_get_pfc_feature(struct bnx2x *bp, in bnx2x_dcbx_get_pfc_feature() argument
305 if (bp->dcbx_port_params.app.enabled && pfc->enabled && in bnx2x_dcbx_get_pfc_feature()
308 bp->dcbx_port_params.pfc.enabled = true; in bnx2x_dcbx_get_pfc_feature()
309 bp->dcbx_port_params.pfc.priority_non_pauseable_mask = in bnx2x_dcbx_get_pfc_feature()
313 bp->dcbx_port_params.pfc.enabled = false; in bnx2x_dcbx_get_pfc_feature()
314 bp->dcbx_port_params.pfc.priority_non_pauseable_mask = 0; in bnx2x_dcbx_get_pfc_feature()
319 static void bnx2x_dcbx_map_nw(struct bnx2x *bp) in bnx2x_dcbx_map_nw() argument
323 u32 *ttp = bp->dcbx_port_params.app.traffic_type_priority; in bnx2x_dcbx_map_nw()
326 bp->dcbx_port_params.ets.cos_params; in bnx2x_dcbx_map_nw()
333 for (i = 0; i < ARRAY_SIZE(bp->dcbx_port_params.ets.cos_params); i++) { in bnx2x_dcbx_map_nw()
344 static void bnx2x_get_dcbx_drv_param(struct bnx2x *bp, in bnx2x_get_dcbx_drv_param() argument
348 bnx2x_dcbx_get_ap_feature(bp, &features->app, error); in bnx2x_get_dcbx_drv_param()
350 bnx2x_dcbx_get_pfc_feature(bp, &features->pfc, error); in bnx2x_get_dcbx_drv_param()
352 bnx2x_dcbx_get_ets_feature(bp, &features->ets, error); in bnx2x_get_dcbx_drv_param()
354 bnx2x_dcbx_map_nw(bp); in bnx2x_get_dcbx_drv_param()
358 static int bnx2x_dcbx_read_mib(struct bnx2x *bp, in bnx2x_dcbx_read_mib() argument
379 offset += BP_PORT(bp) * mib_size; in bnx2x_dcbx_read_mib()
382 bnx2x_read_data(bp, base_mib_addr, offset, mib_size); in bnx2x_dcbx_read_mib()
411 static void bnx2x_pfc_set_pfc(struct bnx2x *bp) in bnx2x_pfc_set_pfc() argument
413 int mfw_configured = SHMEM2_HAS(bp, drv_flags) && in bnx2x_pfc_set_pfc()
414 GET_FLAGS(SHMEM2_RD(bp, drv_flags), in bnx2x_pfc_set_pfc()
417 if (bp->dcbx_port_params.pfc.enabled && in bnx2x_pfc_set_pfc()
418 (!(bp->dcbx_error & DCBX_REMOTE_MIB_ERROR) || mfw_configured)) in bnx2x_pfc_set_pfc()
423 bnx2x_pfc_set(bp); in bnx2x_pfc_set_pfc()
425 bnx2x_pfc_clear(bp); in bnx2x_pfc_set_pfc()
428 int bnx2x_dcbx_stop_hw_tx(struct bnx2x *bp) in bnx2x_dcbx_stop_hw_tx() argument
433 func_params.f_obj = &bp->func_obj; in bnx2x_dcbx_stop_hw_tx()
441 rc = bnx2x_func_state_change(bp, &func_params); in bnx2x_dcbx_stop_hw_tx()
450 int bnx2x_dcbx_resume_hw_tx(struct bnx2x *bp) in bnx2x_dcbx_resume_hw_tx() argument
457 func_params.f_obj = &bp->func_obj; in bnx2x_dcbx_resume_hw_tx()
463 bnx2x_dcbx_fw_struct(bp, tx_params); in bnx2x_dcbx_resume_hw_tx()
467 rc = bnx2x_func_state_change(bp, &func_params); in bnx2x_dcbx_resume_hw_tx()
476 static void bnx2x_dcbx_2cos_limit_update_ets_config(struct bnx2x *bp) in bnx2x_dcbx_2cos_limit_update_ets_config() argument
478 struct bnx2x_dcbx_pg_params *ets = &(bp->dcbx_port_params.ets); in bnx2x_dcbx_2cos_limit_update_ets_config()
523 bnx2x_ets_bw_limit(&bp->link_params, bw_tbl_0, bw_tbl_1); in bnx2x_dcbx_2cos_limit_update_ets_config()
526 rc = bnx2x_ets_strict(&bp->link_params, 0); in bnx2x_dcbx_2cos_limit_update_ets_config()
529 rc = bnx2x_ets_strict(&bp->link_params, 1); in bnx2x_dcbx_2cos_limit_update_ets_config()
538 static void bnx2x_dcbx_update_ets_config(struct bnx2x *bp) in bnx2x_dcbx_update_ets_config() argument
540 struct bnx2x_dcbx_pg_params *ets = &(bp->dcbx_port_params.ets); in bnx2x_dcbx_update_ets_config()
569 if (bnx2x_ets_e3b0_config(&bp->link_params, &bp->link_vars, in bnx2x_dcbx_update_ets_config()
572 bnx2x_ets_disabled(&bp->link_params, &bp->link_vars); in bnx2x_dcbx_update_ets_config()
576 static void bnx2x_dcbx_update_ets_params(struct bnx2x *bp) in bnx2x_dcbx_update_ets_params() argument
578 int mfw_configured = SHMEM2_HAS(bp, drv_flags) && in bnx2x_dcbx_update_ets_params()
579 GET_FLAGS(SHMEM2_RD(bp, drv_flags), in bnx2x_dcbx_update_ets_params()
582 bnx2x_ets_disabled(&bp->link_params, &bp->link_vars); in bnx2x_dcbx_update_ets_params()
584 if (!bp->dcbx_port_params.ets.enabled || in bnx2x_dcbx_update_ets_params()
585 ((bp->dcbx_error & DCBX_REMOTE_MIB_ERROR) && !mfw_configured)) in bnx2x_dcbx_update_ets_params()
588 if (CHIP_IS_E3B0(bp)) in bnx2x_dcbx_update_ets_params()
589 bnx2x_dcbx_update_ets_config(bp); in bnx2x_dcbx_update_ets_params()
591 bnx2x_dcbx_2cos_limit_update_ets_config(bp); in bnx2x_dcbx_update_ets_params()
595 static int bnx2x_dcbx_read_shmem_remote_mib(struct bnx2x *bp) in bnx2x_dcbx_read_shmem_remote_mib() argument
598 u32 dcbx_remote_mib_offset = SHMEM2_RD(bp, dcbx_remote_mib_offset); in bnx2x_dcbx_read_shmem_remote_mib()
609 rc = bnx2x_dcbx_read_mib(bp, (u32 *)&remote_mib, dcbx_remote_mib_offset, in bnx2x_dcbx_read_shmem_remote_mib()
618 bp->dcbx_remote_feat = remote_mib.features; in bnx2x_dcbx_read_shmem_remote_mib()
619 bp->dcbx_remote_flags = remote_mib.flags; in bnx2x_dcbx_read_shmem_remote_mib()
624 static int bnx2x_dcbx_read_shmem_neg_results(struct bnx2x *bp) in bnx2x_dcbx_read_shmem_neg_results() argument
627 u32 dcbx_neg_res_offset = SHMEM2_RD(bp, dcbx_neg_res_offset); in bnx2x_dcbx_read_shmem_neg_results()
637 rc = bnx2x_dcbx_read_mib(bp, (u32 *)&local_mib, dcbx_neg_res_offset, in bnx2x_dcbx_read_shmem_neg_results()
646 bp->dcbx_local_feat = local_mib.features; in bnx2x_dcbx_read_shmem_neg_results()
647 bp->dcbx_error = local_mib.error; in bnx2x_dcbx_read_shmem_neg_results()
672 int bnx2x_dcbnl_update_applist(struct bnx2x *bp, bool delall) in bnx2x_dcbnl_update_applist() argument
678 &bp->dcbx_local_feat.app.app_pri_tbl[i]; in bnx2x_dcbnl_update_applist()
689 err = dcb_setapp(bp->dev, &app); in bnx2x_dcbnl_update_applist()
697 static inline void bnx2x_dcbx_update_tc_mapping(struct bnx2x *bp) in bnx2x_dcbx_update_tc_mapping() argument
700 for (cos = 0; cos < bp->dcbx_port_params.ets.num_of_cos; cos++) { in bnx2x_dcbx_update_tc_mapping()
702 if (bp->dcbx_port_params.ets.cos_params[cos].pri_bitmask in bnx2x_dcbx_update_tc_mapping()
704 bp->prio_to_cos[prio] = cos; in bnx2x_dcbx_update_tc_mapping()
715 bnx2x_schedule_sp_rtnl(bp, BNX2X_SP_RTNL_SETUP_TC, 0); in bnx2x_dcbx_update_tc_mapping()
718 void bnx2x_dcbx_set_params(struct bnx2x *bp, u32 state) in bnx2x_dcbx_set_params() argument
729 bnx2x_dcbnl_update_applist(bp, true); in bnx2x_dcbx_set_params()
732 if (bnx2x_dcbx_read_shmem_remote_mib(bp)) in bnx2x_dcbx_set_params()
736 if (bnx2x_dcbx_read_shmem_neg_results(bp)) in bnx2x_dcbx_set_params()
739 bnx2x_dump_dcbx_drv_param(bp, &bp->dcbx_local_feat, in bnx2x_dcbx_set_params()
740 bp->dcbx_error); in bnx2x_dcbx_set_params()
742 bnx2x_get_dcbx_drv_param(bp, &bp->dcbx_local_feat, in bnx2x_dcbx_set_params()
743 bp->dcbx_error); in bnx2x_dcbx_set_params()
746 bnx2x_update_drv_flags(bp, in bnx2x_dcbx_set_params()
753 bnx2x_dcbnl_update_applist(bp, false); in bnx2x_dcbx_set_params()
759 bnx2x_dcbx_update_tc_mapping(bp); in bnx2x_dcbx_set_params()
765 if (IS_MF(bp)) in bnx2x_dcbx_set_params()
766 bnx2x_link_sync_notify(bp); in bnx2x_dcbx_set_params()
768 bnx2x_schedule_sp_rtnl(bp, BNX2X_SP_RTNL_TX_STOP, 0); in bnx2x_dcbx_set_params()
773 bnx2x_pfc_set_pfc(bp); in bnx2x_dcbx_set_params()
775 bnx2x_dcbx_update_ets_params(bp); in bnx2x_dcbx_set_params()
778 bnx2x_set_local_cmng(bp); in bnx2x_dcbx_set_params()
782 bnx2x_fw_command(bp, DRV_MSG_CODE_DCBX_PMF_DRV_OK, 0); in bnx2x_dcbx_set_params()
787 dcbnl_cee_notify(bp->dev, RTM_GETDCB, DCB_CMD_CEE_GET, 0, 0); in bnx2x_dcbx_set_params()
795 #define LLDP_ADMIN_MIB_OFFSET(bp) (PORT_MAX*sizeof(struct lldp_params) + \ argument
796 BP_PORT(bp)*sizeof(struct lldp_admin_mib))
798 static void bnx2x_dcbx_admin_mib_updated_params(struct bnx2x *bp, in bnx2x_dcbx_admin_mib_updated_params() argument
803 u32 offset = dcbx_lldp_params_offset + LLDP_ADMIN_MIB_OFFSET(bp); in bnx2x_dcbx_admin_mib_updated_params()
807 struct bnx2x_config_dcbx_params *dp = &bp->dcbx_config_params; in bnx2x_dcbx_admin_mib_updated_params()
812 bnx2x_read_data(bp, (u32 *)&admin_mib, offset, in bnx2x_dcbx_admin_mib_updated_params()
815 if (bp->dcbx_enabled == BNX2X_DCBX_ENABLED_ON_NEG_ON) in bnx2x_dcbx_admin_mib_updated_params()
919 bnx2x_write_data(bp, (u32 *)&admin_mib, offset, in bnx2x_dcbx_admin_mib_updated_params()
923 void bnx2x_dcbx_set_state(struct bnx2x *bp, bool dcb_on, u32 dcbx_enabled) in bnx2x_dcbx_set_state() argument
925 if (!CHIP_IS_E1x(bp)) { in bnx2x_dcbx_set_state()
926 bp->dcb_state = dcb_on; in bnx2x_dcbx_set_state()
927 bp->dcbx_enabled = dcbx_enabled; in bnx2x_dcbx_set_state()
929 bp->dcb_state = false; in bnx2x_dcbx_set_state()
930 bp->dcbx_enabled = BNX2X_DCBX_ENABLED_INVALID; in bnx2x_dcbx_set_state()
940 void bnx2x_dcbx_init_params(struct bnx2x *bp) in bnx2x_dcbx_init_params() argument
942 bp->dcbx_config_params.admin_dcbx_version = 0x0; /* 0 - CEE; 1 - IEEE */ in bnx2x_dcbx_init_params()
943 bp->dcbx_config_params.admin_ets_willing = 1; in bnx2x_dcbx_init_params()
944 bp->dcbx_config_params.admin_pfc_willing = 1; in bnx2x_dcbx_init_params()
945 bp->dcbx_config_params.overwrite_settings = 1; in bnx2x_dcbx_init_params()
946 bp->dcbx_config_params.admin_ets_enable = 1; in bnx2x_dcbx_init_params()
947 bp->dcbx_config_params.admin_pfc_enable = 1; in bnx2x_dcbx_init_params()
948 bp->dcbx_config_params.admin_tc_supported_tx_enable = 1; in bnx2x_dcbx_init_params()
949 bp->dcbx_config_params.admin_ets_configuration_tx_enable = 1; in bnx2x_dcbx_init_params()
950 bp->dcbx_config_params.admin_pfc_tx_enable = 1; in bnx2x_dcbx_init_params()
951 bp->dcbx_config_params.admin_application_priority_tx_enable = 1; in bnx2x_dcbx_init_params()
952 bp->dcbx_config_params.admin_ets_reco_valid = 1; in bnx2x_dcbx_init_params()
953 bp->dcbx_config_params.admin_app_priority_willing = 1; in bnx2x_dcbx_init_params()
954 bp->dcbx_config_params.admin_configuration_bw_precentage[0] = 100; in bnx2x_dcbx_init_params()
955 bp->dcbx_config_params.admin_configuration_bw_precentage[1] = 0; in bnx2x_dcbx_init_params()
956 bp->dcbx_config_params.admin_configuration_bw_precentage[2] = 0; in bnx2x_dcbx_init_params()
957 bp->dcbx_config_params.admin_configuration_bw_precentage[3] = 0; in bnx2x_dcbx_init_params()
958 bp->dcbx_config_params.admin_configuration_bw_precentage[4] = 0; in bnx2x_dcbx_init_params()
959 bp->dcbx_config_params.admin_configuration_bw_precentage[5] = 0; in bnx2x_dcbx_init_params()
960 bp->dcbx_config_params.admin_configuration_bw_precentage[6] = 0; in bnx2x_dcbx_init_params()
961 bp->dcbx_config_params.admin_configuration_bw_precentage[7] = 0; in bnx2x_dcbx_init_params()
962 bp->dcbx_config_params.admin_configuration_ets_pg[0] = 0; in bnx2x_dcbx_init_params()
963 bp->dcbx_config_params.admin_configuration_ets_pg[1] = 0; in bnx2x_dcbx_init_params()
964 bp->dcbx_config_params.admin_configuration_ets_pg[2] = 0; in bnx2x_dcbx_init_params()
965 bp->dcbx_config_params.admin_configuration_ets_pg[3] = 0; in bnx2x_dcbx_init_params()
966 bp->dcbx_config_params.admin_configuration_ets_pg[4] = 0; in bnx2x_dcbx_init_params()
967 bp->dcbx_config_params.admin_configuration_ets_pg[5] = 0; in bnx2x_dcbx_init_params()
968 bp->dcbx_config_params.admin_configuration_ets_pg[6] = 0; in bnx2x_dcbx_init_params()
969 bp->dcbx_config_params.admin_configuration_ets_pg[7] = 0; in bnx2x_dcbx_init_params()
970 bp->dcbx_config_params.admin_recommendation_bw_precentage[0] = 100; in bnx2x_dcbx_init_params()
971 bp->dcbx_config_params.admin_recommendation_bw_precentage[1] = 0; in bnx2x_dcbx_init_params()
972 bp->dcbx_config_params.admin_recommendation_bw_precentage[2] = 0; in bnx2x_dcbx_init_params()
973 bp->dcbx_config_params.admin_recommendation_bw_precentage[3] = 0; in bnx2x_dcbx_init_params()
974 bp->dcbx_config_params.admin_recommendation_bw_precentage[4] = 0; in bnx2x_dcbx_init_params()
975 bp->dcbx_config_params.admin_recommendation_bw_precentage[5] = 0; in bnx2x_dcbx_init_params()
976 bp->dcbx_config_params.admin_recommendation_bw_precentage[6] = 0; in bnx2x_dcbx_init_params()
977 bp->dcbx_config_params.admin_recommendation_bw_precentage[7] = 0; in bnx2x_dcbx_init_params()
978 bp->dcbx_config_params.admin_recommendation_ets_pg[0] = 0; in bnx2x_dcbx_init_params()
979 bp->dcbx_config_params.admin_recommendation_ets_pg[1] = 1; in bnx2x_dcbx_init_params()
980 bp->dcbx_config_params.admin_recommendation_ets_pg[2] = 2; in bnx2x_dcbx_init_params()
981 bp->dcbx_config_params.admin_recommendation_ets_pg[3] = 3; in bnx2x_dcbx_init_params()
982 bp->dcbx_config_params.admin_recommendation_ets_pg[4] = 4; in bnx2x_dcbx_init_params()
983 bp->dcbx_config_params.admin_recommendation_ets_pg[5] = 5; in bnx2x_dcbx_init_params()
984 bp->dcbx_config_params.admin_recommendation_ets_pg[6] = 6; in bnx2x_dcbx_init_params()
985 bp->dcbx_config_params.admin_recommendation_ets_pg[7] = 7; in bnx2x_dcbx_init_params()
986 bp->dcbx_config_params.admin_pfc_bitmap = 0x0; in bnx2x_dcbx_init_params()
987 bp->dcbx_config_params.admin_priority_app_table[0].valid = 0; in bnx2x_dcbx_init_params()
988 bp->dcbx_config_params.admin_priority_app_table[1].valid = 0; in bnx2x_dcbx_init_params()
989 bp->dcbx_config_params.admin_priority_app_table[2].valid = 0; in bnx2x_dcbx_init_params()
990 bp->dcbx_config_params.admin_priority_app_table[3].valid = 0; in bnx2x_dcbx_init_params()
991 bp->dcbx_config_params.admin_default_priority = 0; in bnx2x_dcbx_init_params()
994 void bnx2x_dcbx_init(struct bnx2x *bp, bool update_shmem) in bnx2x_dcbx_init() argument
999 if ((!bp->port.pmf) && (!(bp->flags & BC_SUPPORTS_DCBX_MSG_NON_PMF))) in bnx2x_dcbx_init()
1002 if (bp->dcbx_enabled <= 0) in bnx2x_dcbx_init()
1011 bp->dcb_state, bp->port.pmf); in bnx2x_dcbx_init()
1013 if (bp->dcb_state == BNX2X_DCB_STATE_ON && in bnx2x_dcbx_init()
1014 SHMEM2_HAS(bp, dcbx_lldp_params_offset)) { in bnx2x_dcbx_init()
1016 SHMEM2_RD(bp, dcbx_lldp_params_offset); in bnx2x_dcbx_init()
1021 bnx2x_update_drv_flags(bp, 1 << DRV_FLAGS_DCB_CONFIGURED, 0); in bnx2x_dcbx_init()
1027 bnx2x_acquire_hw_lock(bp, in bnx2x_dcbx_init()
1030 bnx2x_dcbx_admin_mib_updated_params(bp, in bnx2x_dcbx_init()
1034 bnx2x_fw_command(bp, in bnx2x_dcbx_init()
1039 bnx2x_release_hw_lock(bp, in bnx2x_dcbx_init()
1045 bnx2x_dcbx_print_cos_params(struct bnx2x *bp, in bnx2x_dcbx_print_cos_params() argument
1055 bp->dcbx_port_params.pfc.priority_non_pauseable_mask); in bnx2x_dcbx_print_cos_params()
1057 for (cos = 0 ; cos < bp->dcbx_port_params.ets.num_of_cos ; cos++) { in bnx2x_dcbx_print_cos_params()
1060 cos, bp->dcbx_port_params.ets.cos_params[cos].pri_bitmask); in bnx2x_dcbx_print_cos_params()
1064 cos, bp->dcbx_port_params.ets.cos_params[cos].bw_tbl); in bnx2x_dcbx_print_cos_params()
1068 cos, bp->dcbx_port_params.ets.cos_params[cos].strict); in bnx2x_dcbx_print_cos_params()
1072 cos, bp->dcbx_port_params.ets.cos_params[cos].pauseable); in bnx2x_dcbx_print_cos_params()
1087 static void bnx2x_dcbx_get_num_pg_traf_type(struct bnx2x *bp, in bnx2x_dcbx_get_num_pg_traf_type() argument
1093 u32 *ttp = bp->dcbx_port_params.app.traffic_type_priority; in bnx2x_dcbx_get_num_pg_traf_type()
1134 static void bnx2x_dcbx_ets_disabled_entry_data(struct bnx2x *bp, in bnx2x_dcbx_ets_disabled_entry_data() argument
1140 IS_DCBX_PFC_PRI_ONLY_PAUSE(bp, pri_join_mask); in bnx2x_dcbx_ets_disabled_entry_data()
1146 static inline void bnx2x_dcbx_add_to_cos_bw(struct bnx2x *bp, in bnx2x_dcbx_add_to_cos_bw() argument
1156 static void bnx2x_dcbx_separate_pauseable_from_non(struct bnx2x *bp, in bnx2x_dcbx_separate_pauseable_from_non() argument
1172 pri_tested = 1 << bp->dcbx_port_params. in bnx2x_dcbx_separate_pauseable_from_non()
1175 if (pri_tested & DCBX_PFC_PRI_NON_PAUSE_MASK(bp)) { in bnx2x_dcbx_separate_pauseable_from_non()
1182 pg_entry = (u8)pg_pri_orginal_spread[bp->dcbx_port_params. in bnx2x_dcbx_separate_pauseable_from_non()
1186 bnx2x_dcbx_add_to_cos_bw(bp, &cos_data->data[entry], in bnx2x_dcbx_separate_pauseable_from_non()
1204 static void bnx2x_dcbx_2cos_limit_cee_single_pg_to_cos_params(struct bnx2x *bp, in bnx2x_dcbx_2cos_limit_cee_single_pg_to_cos_params() argument
1213 u32 *ttp = bp->dcbx_port_params.app.traffic_type_priority; in bnx2x_dcbx_2cos_limit_cee_single_pg_to_cos_params()
1216 bnx2x_dcbx_ets_disabled_entry_data(bp, cos_data, pri_join_mask); in bnx2x_dcbx_2cos_limit_cee_single_pg_to_cos_params()
1225 if (IS_DCBX_PFC_PRI_MIX_PAUSE(bp, pri_join_mask)) { in bnx2x_dcbx_2cos_limit_cee_single_pg_to_cos_params()
1237 if (POWER_OF_2(DCBX_PFC_PRI_GET_PAUSE(bp, in bnx2x_dcbx_2cos_limit_cee_single_pg_to_cos_params()
1247 } else if (IS_DCBX_PFC_PRI_ONLY_PAUSE(bp, pri_join_mask)) { in bnx2x_dcbx_2cos_limit_cee_single_pg_to_cos_params()
1271 bnx2x_dcbx_ets_disabled_entry_data(bp, in bnx2x_dcbx_2cos_limit_cee_single_pg_to_cos_params()
1275 if (IS_DCBX_PFC_PRI_MIX_PAUSE(bp, pri_join_mask)) { in bnx2x_dcbx_2cos_limit_cee_single_pg_to_cos_params()
1281 if (DCBX_PFC_PRI_GET_PAUSE(bp, pri_join_mask) > in bnx2x_dcbx_2cos_limit_cee_single_pg_to_cos_params()
1282 DCBX_PFC_PRI_GET_NON_PAUSE(bp, pri_join_mask)) { in bnx2x_dcbx_2cos_limit_cee_single_pg_to_cos_params()
1307 IS_DCBX_PFC_PRI_ONLY_PAUSE(bp, pri_join_mask); in bnx2x_dcbx_2cos_limit_cee_single_pg_to_cos_params()
1310 pri_tested = 1 << bp->dcbx_port_params. in bnx2x_dcbx_2cos_limit_cee_single_pg_to_cos_params()
1338 struct bnx2x *bp, in bnx2x_dcbx_2cos_limit_cee_two_pg_to_cos_params() argument
1353 if (IS_DCBX_PFC_PRI_MIX_PAUSE(bp, pri_join_mask)) { in bnx2x_dcbx_2cos_limit_cee_two_pg_to_cos_params()
1354 if (IS_DCBX_PFC_PRI_MIX_PAUSE(bp, in bnx2x_dcbx_2cos_limit_cee_two_pg_to_cos_params()
1356 IS_DCBX_PFC_PRI_MIX_PAUSE(bp, in bnx2x_dcbx_2cos_limit_cee_two_pg_to_cos_params()
1361 bnx2x_dcbx_separate_pauseable_from_non(bp, cos_data, in bnx2x_dcbx_2cos_limit_cee_two_pg_to_cos_params()
1363 bp->dcbx_port_params.ets.enabled = false; in bnx2x_dcbx_2cos_limit_cee_two_pg_to_cos_params()
1371 if (IS_DCBX_PFC_PRI_ONLY_PAUSE(bp, in bnx2x_dcbx_2cos_limit_cee_two_pg_to_cos_params()
1393 IS_DCBX_PFC_PRI_ONLY_PAUSE(bp, pri_join_mask); in bnx2x_dcbx_2cos_limit_cee_two_pg_to_cos_params()
1414 struct bnx2x *bp, in bnx2x_dcbx_join_pgs() argument
1465 struct bnx2x *bp, in bnx2x_dcbx_2cos_limit_cee_three_pg_to_cos_params() argument
1485 if (IS_DCBX_PFC_PRI_MIX_PAUSE(bp, pri_join_mask)) in bnx2x_dcbx_2cos_limit_cee_three_pg_to_cos_params()
1486 bnx2x_dcbx_separate_pauseable_from_non(bp, in bnx2x_dcbx_2cos_limit_cee_three_pg_to_cos_params()
1507 IS_DCBX_PFC_PRI_ONLY_PAUSE(bp, pri_join_mask); in bnx2x_dcbx_2cos_limit_cee_three_pg_to_cos_params()
1510 pri_tested = 1 << bp->dcbx_port_params. in bnx2x_dcbx_2cos_limit_cee_three_pg_to_cos_params()
1512 pg_entry = (u8)pg_pri_orginal_spread[bp-> in bnx2x_dcbx_2cos_limit_cee_three_pg_to_cos_params()
1527 bnx2x_dcbx_add_to_cos_bw(bp, in bnx2x_dcbx_2cos_limit_cee_three_pg_to_cos_params()
1544 static void bnx2x_dcbx_2cos_limit_cee_fill_cos_params(struct bnx2x *bp, in bnx2x_dcbx_2cos_limit_cee_fill_cos_params() argument
1558 bp, in bnx2x_dcbx_2cos_limit_cee_fill_cos_params()
1566 bp, in bnx2x_dcbx_2cos_limit_cee_fill_cos_params()
1577 bp, in bnx2x_dcbx_2cos_limit_cee_fill_cos_params()
1587 bnx2x_dcbx_ets_disabled_entry_data(bp, in bnx2x_dcbx_2cos_limit_cee_fill_cos_params()
1592 static int bnx2x_dcbx_spread_strict_pri(struct bnx2x *bp, in bnx2x_dcbx_spread_strict_pri() argument
1613 data->pausable = DCBX_IS_PFC_PRI_SOME_PAUSE(bp, in bnx2x_dcbx_spread_strict_pri()
1621 data->pausable = DCBX_IS_PFC_PRI_SOME_PAUSE(bp, in bnx2x_dcbx_spread_strict_pri()
1641 static u8 bnx2x_dcbx_cee_fill_strict_pri(struct bnx2x *bp, in bnx2x_dcbx_cee_fill_strict_pri() argument
1647 if (bnx2x_dcbx_spread_strict_pri(bp, cos_data, entry, in bnx2x_dcbx_cee_fill_strict_pri()
1656 data->pausable = DCBX_IS_PFC_PRI_SOME_PAUSE(bp, in bnx2x_dcbx_cee_fill_strict_pri()
1664 static void bnx2x_dcbx_cee_fill_cos_params(struct bnx2x *bp, in bnx2x_dcbx_cee_fill_cos_params() argument
1681 if (bnx2x_dcbx_join_pgs(bp, ets, help_data, in bnx2x_dcbx_cee_fill_cos_params()
1684 bnx2x_dcbx_ets_disabled_entry_data(bp, cos_data, in bnx2x_dcbx_cee_fill_cos_params()
1699 data->pausable = DCBX_IS_PFC_PRI_SOME_PAUSE(bp, in bnx2x_dcbx_cee_fill_cos_params()
1713 entry += bnx2x_dcbx_cee_fill_strict_pri(bp, cos_data, in bnx2x_dcbx_cee_fill_cos_params()
1721 static void bnx2x_dcbx_fill_cos_params(struct bnx2x *bp, in bnx2x_dcbx_fill_cos_params() argument
1752 if (CHIP_IS_E3B0(bp)) in bnx2x_dcbx_fill_cos_params()
1753 bnx2x_dcbx_cee_fill_cos_params(bp, help_data, ets, in bnx2x_dcbx_fill_cos_params()
1756 bnx2x_dcbx_2cos_limit_cee_fill_cos_params(bp, in bnx2x_dcbx_fill_cos_params()
1765 &bp->dcbx_port_params.ets.cos_params[i]; in bnx2x_dcbx_fill_cos_params()
1778 if (CHIP_IS_E2(bp) || CHIP_IS_E3A0(bp)) { in bnx2x_dcbx_fill_cos_params()
1781 DCBX_PFC_PRI_GET_NON_PAUSE(bp, in bnx2x_dcbx_fill_cos_params()
1787 DCBX_PFC_PRI_GET_PAUSE(bp, in bnx2x_dcbx_fill_cos_params()
1803 bp->dcbx_port_params.ets.num_of_cos = cos_data.num_of_cos ; in bnx2x_dcbx_fill_cos_params()
1806 static void bnx2x_dcbx_get_ets_pri_pg_tbl(struct bnx2x *bp, in bnx2x_dcbx_get_ets_pri_pg_tbl() argument
1820 static void bnx2x_dcbx_fw_struct(struct bnx2x *bp, in bnx2x_dcbx_fw_struct() argument
1826 u32 *ttp = bp->dcbx_port_params.app.traffic_type_priority; in bnx2x_dcbx_fw_struct()
1827 int mfw_configured = SHMEM2_HAS(bp, drv_flags) && in bnx2x_dcbx_fw_struct()
1828 GET_FLAGS(SHMEM2_RD(bp, drv_flags), in bnx2x_dcbx_fw_struct()
1834 if ((bp->dcbx_error & DCBX_REMOTE_MIB_ERROR) && !mfw_configured) in bnx2x_dcbx_fw_struct()
1841 pfc_fw_cfg->dcb_version = ++bp->dcb_version; in bnx2x_dcbx_fw_struct()
1851 for (cos = 0; cos < bp->dcbx_port_params.ets.num_of_cos; cos++) in bnx2x_dcbx_fw_struct()
1852 if (bp->dcbx_port_params.ets.cos_params[cos]. in bnx2x_dcbx_fw_struct()
1862 bnx2x_dcbx_print_cos_params(bp, pfc_fw_cfg); in bnx2x_dcbx_fw_struct()
1865 void bnx2x_dcbx_pmf_update(struct bnx2x *bp) in bnx2x_dcbx_pmf_update() argument
1870 if (SHMEM2_HAS(bp, drv_flags) && in bnx2x_dcbx_pmf_update()
1871 GET_FLAGS(SHMEM2_RD(bp, drv_flags), 1 << DRV_FLAGS_DCB_CONFIGURED)) { in bnx2x_dcbx_pmf_update()
1873 if (bnx2x_dcbx_read_shmem_neg_results(bp)) in bnx2x_dcbx_pmf_update()
1876 bnx2x_dump_dcbx_drv_param(bp, &bp->dcbx_local_feat, in bnx2x_dcbx_pmf_update()
1877 bp->dcbx_error); in bnx2x_dcbx_pmf_update()
1878 bnx2x_get_dcbx_drv_param(bp, &bp->dcbx_local_feat, in bnx2x_dcbx_pmf_update()
1879 bp->dcbx_error); in bnx2x_dcbx_pmf_update()
1884 bnx2x_dcbnl_update_applist(bp, false); in bnx2x_dcbx_pmf_update()
1888 dcbnl_cee_notify(bp->dev, RTM_GETDCB, DCB_CMD_CEE_GET, 0, 0); in bnx2x_dcbx_pmf_update()
1894 bnx2x_dcbx_update_tc_mapping(bp); in bnx2x_dcbx_pmf_update()
1904 static inline bool bnx2x_dcbnl_set_valid(struct bnx2x *bp) in bnx2x_dcbnl_set_valid() argument
1909 return bp->dcb_state && bp->dcbx_mode_uset; in bnx2x_dcbnl_set_valid()
1914 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_get_state() local
1915 DP(BNX2X_MSG_DCB, "state = %d\n", bp->dcb_state); in bnx2x_dcbnl_get_state()
1916 return bp->dcb_state; in bnx2x_dcbnl_get_state()
1921 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_set_state() local
1925 if (state && ((bp->dcbx_enabled == BNX2X_DCBX_ENABLED_OFF) || in bnx2x_dcbnl_set_state()
1926 (bp->dcbx_enabled == BNX2X_DCBX_ENABLED_INVALID))) { in bnx2x_dcbnl_set_state()
1931 bnx2x_dcbx_set_state(bp, (state ? true : false), bp->dcbx_enabled); in bnx2x_dcbnl_set_state()
1938 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_get_perm_hw_addr() local
1944 if (CNIC_LOADED(bp)) in bnx2x_dcbnl_get_perm_hw_addr()
1946 memcpy(perm_addr+netdev->addr_len, bp->fip_mac, in bnx2x_dcbnl_get_perm_hw_addr()
1954 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_set_pg_tccfg_tx() local
1957 if (!bnx2x_dcbnl_set_valid(bp) || prio >= DCBX_MAX_NUM_PRI_PG_ENTRIES) in bnx2x_dcbnl_set_pg_tccfg_tx()
1973 bp->dcbx_config_params.admin_configuration_ets_pg[prio] = pgid; in bnx2x_dcbnl_set_pg_tccfg_tx()
1974 bp->dcbx_config_params.admin_ets_configuration_tx_enable = 1; in bnx2x_dcbnl_set_pg_tccfg_tx()
1980 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_set_pg_bwgcfg_tx() local
1983 if (!bnx2x_dcbnl_set_valid(bp) || pgid >= DCBX_MAX_NUM_PG_BW_ENTRIES) in bnx2x_dcbnl_set_pg_bwgcfg_tx()
1986 bp->dcbx_config_params.admin_configuration_bw_precentage[pgid] = bw_pct; in bnx2x_dcbnl_set_pg_bwgcfg_tx()
1987 bp->dcbx_config_params.admin_ets_configuration_tx_enable = 1; in bnx2x_dcbnl_set_pg_bwgcfg_tx()
1994 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_set_pg_tccfg_rx() local
2001 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_set_pg_bwgcfg_rx() local
2009 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_get_pg_tccfg_tx() local
2026 if (!bp->dcb_state || prio >= DCBX_MAX_NUM_PRI_PG_ENTRIES) in bnx2x_dcbnl_get_pg_tccfg_tx()
2029 *pgid = DCBX_PRI_PG_GET(bp->dcbx_local_feat.ets.pri_pg_tbl, prio); in bnx2x_dcbnl_get_pg_tccfg_tx()
2035 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_get_pg_bwgcfg_tx() local
2040 if (!bp->dcb_state || pgid >= DCBX_MAX_NUM_PG_BW_ENTRIES) in bnx2x_dcbnl_get_pg_bwgcfg_tx()
2043 *bw_pct = DCBX_PG_BW_GET(bp->dcbx_local_feat.ets.pg_bw_tbl, pgid); in bnx2x_dcbnl_get_pg_bwgcfg_tx()
2050 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_get_pg_tccfg_rx() local
2059 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_get_pg_bwgcfg_rx() local
2068 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_set_pfc_cfg() local
2071 if (!bnx2x_dcbnl_set_valid(bp) || prio >= MAX_PFC_PRIORITIES) in bnx2x_dcbnl_set_pfc_cfg()
2075 bp->dcbx_config_params.admin_pfc_bitmap |= (1 << prio); in bnx2x_dcbnl_set_pfc_cfg()
2076 bp->dcbx_config_params.admin_pfc_tx_enable = 1; in bnx2x_dcbnl_set_pfc_cfg()
2078 bp->dcbx_config_params.admin_pfc_bitmap &= ~(1 << prio); in bnx2x_dcbnl_set_pfc_cfg()
2085 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_get_pfc_cfg() local
2090 if (!bp->dcb_state || prio >= MAX_PFC_PRIORITIES) in bnx2x_dcbnl_get_pfc_cfg()
2093 *setting = (bp->dcbx_local_feat.pfc.pri_en_bitmap >> prio) & 0x1; in bnx2x_dcbnl_get_pfc_cfg()
2098 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_set_all() local
2102 if (!bnx2x_dcbnl_set_valid(bp)) in bnx2x_dcbnl_set_all()
2105 if (bp->recovery_state != BNX2X_RECOVERY_DONE) { in bnx2x_dcbnl_set_all()
2106 netdev_err(bp->dev, in bnx2x_dcbnl_set_all()
2110 if (netif_running(bp->dev)) { in bnx2x_dcbnl_set_all()
2111 bnx2x_update_drv_flags(bp, in bnx2x_dcbnl_set_all()
2114 bnx2x_dcbx_init(bp, true); in bnx2x_dcbnl_set_all()
2123 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_get_cap() local
2126 if (bp->dcb_state) { in bnx2x_dcbnl_get_cap()
2168 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_get_numtcs() local
2173 if (bp->dcb_state) { in bnx2x_dcbnl_get_numtcs()
2176 *num = CHIP_IS_E3B0(bp) ? DCBX_COS_MAX_NUM_E3B0 : in bnx2x_dcbnl_get_numtcs()
2180 *num = CHIP_IS_E3B0(bp) ? DCBX_COS_MAX_NUM_E3B0 : in bnx2x_dcbnl_get_numtcs()
2198 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_set_numtcs() local
2205 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_get_pfc_state() local
2206 DP(BNX2X_MSG_DCB, "state = %d\n", bp->dcbx_local_feat.pfc.enabled); in bnx2x_dcbnl_get_pfc_state()
2208 if (!bp->dcb_state) in bnx2x_dcbnl_get_pfc_state()
2211 return bp->dcbx_local_feat.pfc.enabled; in bnx2x_dcbnl_get_pfc_state()
2216 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_set_pfc_state() local
2219 if (!bnx2x_dcbnl_set_valid(bp)) in bnx2x_dcbnl_set_pfc_state()
2222 bp->dcbx_config_params.admin_pfc_tx_enable = in bnx2x_dcbnl_set_pfc_state()
2223 bp->dcbx_config_params.admin_pfc_enable = (state ? 1 : 0); in bnx2x_dcbnl_set_pfc_state()
2271 static int bnx2x_set_admin_app_up(struct bnx2x *bp, u8 idtype, u16 idval, u8 up) in bnx2x_set_admin_app_up() argument
2278 &bp->dcbx_config_params.admin_priority_app_table[i]; in bnx2x_set_admin_app_up()
2287 bp->dcbx_config_params. in bnx2x_set_admin_app_up()
2292 &bp->dcbx_config_params.admin_priority_app_table[ff], in bnx2x_set_admin_app_up()
2302 bp->dcbx_config_params.admin_application_priority_tx_enable = 1; in bnx2x_set_admin_app_up()
2310 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_set_app_up() local
2315 if (!bnx2x_dcbnl_set_valid(bp)) { in bnx2x_dcbnl_set_app_up()
2329 return bnx2x_set_admin_app_up(bp, idtype, idval, up); in bnx2x_dcbnl_set_app_up()
2334 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_get_dcbx() local
2339 if (bp->dcbx_enabled == BNX2X_DCBX_ENABLED_ON_NEG_OFF) in bnx2x_dcbnl_get_dcbx()
2347 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_set_dcbx() local
2358 if (bp->dcb_state != BNX2X_DCB_STATE_ON) { in bnx2x_dcbnl_set_dcbx()
2364 bp->dcbx_enabled = BNX2X_DCBX_ENABLED_ON_NEG_OFF; in bnx2x_dcbnl_set_dcbx()
2366 bp->dcbx_enabled = BNX2X_DCBX_ENABLED_ON_NEG_ON; in bnx2x_dcbnl_set_dcbx()
2368 bp->dcbx_mode_uset = true; in bnx2x_dcbnl_set_dcbx()
2375 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_get_featcfg() local
2380 if (bp->dcb_state) { in bnx2x_dcbnl_get_featcfg()
2384 if (bp->dcbx_local_feat.ets.enabled) in bnx2x_dcbnl_get_featcfg()
2386 if (bp->dcbx_error & (DCBX_LOCAL_ETS_ERROR | in bnx2x_dcbnl_get_featcfg()
2391 if (bp->dcbx_local_feat.pfc.enabled) in bnx2x_dcbnl_get_featcfg()
2393 if (bp->dcbx_error & (DCBX_LOCAL_PFC_ERROR | in bnx2x_dcbnl_get_featcfg()
2399 if (bp->dcbx_local_feat.app.enabled) in bnx2x_dcbnl_get_featcfg()
2401 if (bp->dcbx_error & (DCBX_LOCAL_APP_ERROR | in bnx2x_dcbnl_get_featcfg()
2422 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_set_featcfg() local
2428 if (bnx2x_dcbnl_set_valid(bp)) { in bnx2x_dcbnl_set_featcfg()
2431 bp->dcbx_config_params.admin_ets_enable = in bnx2x_dcbnl_set_featcfg()
2433 bp->dcbx_config_params.admin_ets_willing = in bnx2x_dcbnl_set_featcfg()
2437 bp->dcbx_config_params.admin_pfc_enable = in bnx2x_dcbnl_set_featcfg()
2439 bp->dcbx_config_params.admin_pfc_willing = in bnx2x_dcbnl_set_featcfg()
2444 bp->dcbx_config_params.admin_app_priority_willing = in bnx2x_dcbnl_set_featcfg()
2464 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_peer_appinfo() local
2468 info->willing = (bp->dcbx_remote_flags & DCBX_APP_REM_WILLING) ?: 0; in bnx2x_peer_appinfo()
2469 info->error = (bp->dcbx_remote_flags & DCBX_APP_RX_ERROR) ?: 0; in bnx2x_peer_appinfo()
2473 if (bp->dcbx_remote_feat.app.app_pri_tbl[i].appBitfield & in bnx2x_peer_appinfo()
2483 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_peer_apptable() local
2489 &bp->dcbx_remote_feat.app.app_pri_tbl[i]; in bnx2x_peer_apptable()
2503 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_cee_peer_getpg() local
2505 pg->willing = (bp->dcbx_remote_flags & DCBX_ETS_REM_WILLING) ?: 0; in bnx2x_cee_peer_getpg()
2509 DCBX_PG_BW_GET(bp->dcbx_remote_feat.ets.pg_bw_tbl, i); in bnx2x_cee_peer_getpg()
2511 DCBX_PRI_PG_GET(bp->dcbx_remote_feat.ets.pri_pg_tbl, i); in bnx2x_cee_peer_getpg()
2519 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_cee_peer_getpfc() local
2520 pfc->tcs_supported = bp->dcbx_remote_feat.pfc.pfc_caps; in bnx2x_cee_peer_getpfc()
2521 pfc->pfc_en = bp->dcbx_remote_feat.pfc.pri_en_bitmap; in bnx2x_cee_peer_getpfc()