• Home
  • Raw
  • Download

Lines Matching refs:bp

33 static void bnx2x_pfc_set_pfc(struct bnx2x *bp);
34 static void bnx2x_dcbx_update_ets_params(struct bnx2x *bp);
35 static void bnx2x_dcbx_get_ets_pri_pg_tbl(struct bnx2x *bp,
38 static void bnx2x_dcbx_get_num_pg_traf_type(struct bnx2x *bp,
41 static void bnx2x_dcbx_fill_cos_params(struct bnx2x *bp,
45 static void bnx2x_dcbx_separate_pauseable_from_non(struct bnx2x *bp,
49 static void bnx2x_dcbx_fw_struct(struct bnx2x *bp,
53 static void bnx2x_read_data(struct bnx2x *bp, u32 *buff, in bnx2x_read_data() argument
58 *buff = REG_RD(bp, addr + i); in bnx2x_read_data()
61 static void bnx2x_write_data(struct bnx2x *bp, u32 *buff, in bnx2x_write_data() argument
66 REG_WR(bp, addr + i, *buff); in bnx2x_write_data()
69 static void bnx2x_pfc_set(struct bnx2x *bp) in bnx2x_pfc_set() argument
76 bp->dcbx_port_params.ets.num_of_cos; in bnx2x_pfc_set()
79 for (i = 0; i < bp->dcbx_port_params.ets.num_of_cos; i++) in bnx2x_pfc_set()
86 bp->dcbx_port_params.ets.cos_params[i].pri_bitmask in bnx2x_pfc_set()
87 & DCBX_PFC_PRI_PAUSE_MASK(bp); in bnx2x_pfc_set()
97 if (!(pri_bit & DCBX_PFC_PRI_PAUSE_MASK(bp))) in bnx2x_pfc_set()
104 pfc_params.llfc_low_priority_classes = DCBX_PFC_PRI_PAUSE_MASK(bp); in bnx2x_pfc_set()
108 bnx2x_acquire_phy_lock(bp); in bnx2x_pfc_set()
109 bp->link_params.feature_config_flags |= FEATURE_CONFIG_PFC_ENABLED; in bnx2x_pfc_set()
110 bnx2x_update_pfc(&bp->link_params, &bp->link_vars, &pfc_params); in bnx2x_pfc_set()
111 bnx2x_release_phy_lock(bp); in bnx2x_pfc_set()
114 static void bnx2x_pfc_clear(struct bnx2x *bp) in bnx2x_pfc_clear() argument
118 bnx2x_acquire_phy_lock(bp); in bnx2x_pfc_clear()
119 bp->link_params.feature_config_flags &= ~FEATURE_CONFIG_PFC_ENABLED; in bnx2x_pfc_clear()
120 bnx2x_update_pfc(&bp->link_params, &bp->link_vars, &nig_params); in bnx2x_pfc_clear()
121 bnx2x_release_phy_lock(bp); in bnx2x_pfc_clear()
124 static void bnx2x_dump_dcbx_drv_param(struct bnx2x *bp, in bnx2x_dump_dcbx_drv_param() argument
170 static void bnx2x_dcbx_get_ap_priority(struct bnx2x *bp, in bnx2x_dcbx_get_ap_priority() argument
177 u32 *ttp = bp->dcbx_port_params.app.traffic_type_priority; in bnx2x_dcbx_get_ap_priority()
191 static void bnx2x_dcbx_get_ap_feature(struct bnx2x *bp, in bnx2x_dcbx_get_ap_feature() argument
195 u32 *ttp = bp->dcbx_port_params.app.traffic_type_priority; in bnx2x_dcbx_get_ap_feature()
209 bp->dcbx_port_params.app.enabled = true; in bnx2x_dcbx_get_ap_feature()
224 bnx2x_dcbx_get_ap_priority(bp, in bnx2x_dcbx_get_ap_feature()
231 bnx2x_dcbx_get_ap_priority(bp, in bnx2x_dcbx_get_ap_feature()
237 bp->dcbx_port_params.app.enabled = false; in bnx2x_dcbx_get_ap_feature()
243 static void bnx2x_dcbx_get_ets_feature(struct bnx2x *bp, in bnx2x_dcbx_get_ets_feature() argument
250 bp->dcbx_port_params.ets.cos_params; in bnx2x_dcbx_get_ets_feature()
261 for (i = 0; i < ARRAY_SIZE(bp->dcbx_port_params.ets.cos_params) ; i++) { in bnx2x_dcbx_get_ets_feature()
268 if (bp->dcbx_port_params.app.enabled && ets->enabled && in bnx2x_dcbx_get_ets_feature()
272 bp->dcbx_port_params.ets.enabled = true; in bnx2x_dcbx_get_ets_feature()
274 bnx2x_dcbx_get_ets_pri_pg_tbl(bp, in bnx2x_dcbx_get_ets_feature()
278 bnx2x_dcbx_get_num_pg_traf_type(bp, in bnx2x_dcbx_get_ets_feature()
282 bnx2x_dcbx_fill_cos_params(bp, &pg_help_data, in bnx2x_dcbx_get_ets_feature()
287 bp->dcbx_port_params.ets.enabled = false; in bnx2x_dcbx_get_ets_feature()
295 static void bnx2x_dcbx_get_pfc_feature(struct bnx2x *bp, in bnx2x_dcbx_get_pfc_feature() argument
303 if (bp->dcbx_port_params.app.enabled && pfc->enabled && in bnx2x_dcbx_get_pfc_feature()
306 bp->dcbx_port_params.pfc.enabled = true; in bnx2x_dcbx_get_pfc_feature()
307 bp->dcbx_port_params.pfc.priority_non_pauseable_mask = in bnx2x_dcbx_get_pfc_feature()
311 bp->dcbx_port_params.pfc.enabled = false; in bnx2x_dcbx_get_pfc_feature()
312 bp->dcbx_port_params.pfc.priority_non_pauseable_mask = 0; in bnx2x_dcbx_get_pfc_feature()
317 static void bnx2x_dcbx_map_nw(struct bnx2x *bp) in bnx2x_dcbx_map_nw() argument
321 u32 *ttp = bp->dcbx_port_params.app.traffic_type_priority; in bnx2x_dcbx_map_nw()
324 bp->dcbx_port_params.ets.cos_params; in bnx2x_dcbx_map_nw()
331 for (i = 0; i < ARRAY_SIZE(bp->dcbx_port_params.ets.cos_params); i++) { in bnx2x_dcbx_map_nw()
342 static void bnx2x_get_dcbx_drv_param(struct bnx2x *bp, in bnx2x_get_dcbx_drv_param() argument
346 bnx2x_dcbx_get_ap_feature(bp, &features->app, error); in bnx2x_get_dcbx_drv_param()
348 bnx2x_dcbx_get_pfc_feature(bp, &features->pfc, error); in bnx2x_get_dcbx_drv_param()
350 bnx2x_dcbx_get_ets_feature(bp, &features->ets, error); in bnx2x_get_dcbx_drv_param()
352 bnx2x_dcbx_map_nw(bp); in bnx2x_get_dcbx_drv_param()
356 static int bnx2x_dcbx_read_mib(struct bnx2x *bp, in bnx2x_dcbx_read_mib() argument
377 offset += BP_PORT(bp) * mib_size; in bnx2x_dcbx_read_mib()
380 bnx2x_read_data(bp, base_mib_addr, offset, mib_size); in bnx2x_dcbx_read_mib()
409 static void bnx2x_pfc_set_pfc(struct bnx2x *bp) in bnx2x_pfc_set_pfc() argument
411 int mfw_configured = SHMEM2_HAS(bp, drv_flags) && in bnx2x_pfc_set_pfc()
412 GET_FLAGS(SHMEM2_RD(bp, drv_flags), in bnx2x_pfc_set_pfc()
415 if (bp->dcbx_port_params.pfc.enabled && in bnx2x_pfc_set_pfc()
416 (!(bp->dcbx_error & DCBX_REMOTE_MIB_ERROR) || mfw_configured)) in bnx2x_pfc_set_pfc()
421 bnx2x_pfc_set(bp); in bnx2x_pfc_set_pfc()
423 bnx2x_pfc_clear(bp); in bnx2x_pfc_set_pfc()
426 int bnx2x_dcbx_stop_hw_tx(struct bnx2x *bp) in bnx2x_dcbx_stop_hw_tx() argument
431 func_params.f_obj = &bp->func_obj; in bnx2x_dcbx_stop_hw_tx()
439 rc = bnx2x_func_state_change(bp, &func_params); in bnx2x_dcbx_stop_hw_tx()
448 int bnx2x_dcbx_resume_hw_tx(struct bnx2x *bp) in bnx2x_dcbx_resume_hw_tx() argument
455 func_params.f_obj = &bp->func_obj; in bnx2x_dcbx_resume_hw_tx()
461 bnx2x_dcbx_fw_struct(bp, tx_params); in bnx2x_dcbx_resume_hw_tx()
465 rc = bnx2x_func_state_change(bp, &func_params); in bnx2x_dcbx_resume_hw_tx()
474 static void bnx2x_dcbx_2cos_limit_update_ets_config(struct bnx2x *bp) in bnx2x_dcbx_2cos_limit_update_ets_config() argument
476 struct bnx2x_dcbx_pg_params *ets = &(bp->dcbx_port_params.ets); in bnx2x_dcbx_2cos_limit_update_ets_config()
521 bnx2x_ets_bw_limit(&bp->link_params, bw_tbl_0, bw_tbl_1); in bnx2x_dcbx_2cos_limit_update_ets_config()
524 rc = bnx2x_ets_strict(&bp->link_params, 0); in bnx2x_dcbx_2cos_limit_update_ets_config()
527 rc = bnx2x_ets_strict(&bp->link_params, 1); in bnx2x_dcbx_2cos_limit_update_ets_config()
536 static void bnx2x_dcbx_update_ets_config(struct bnx2x *bp) in bnx2x_dcbx_update_ets_config() argument
538 struct bnx2x_dcbx_pg_params *ets = &(bp->dcbx_port_params.ets); in bnx2x_dcbx_update_ets_config()
567 if (bnx2x_ets_e3b0_config(&bp->link_params, &bp->link_vars, in bnx2x_dcbx_update_ets_config()
570 bnx2x_ets_disabled(&bp->link_params, &bp->link_vars); in bnx2x_dcbx_update_ets_config()
574 static void bnx2x_dcbx_update_ets_params(struct bnx2x *bp) in bnx2x_dcbx_update_ets_params() argument
576 int mfw_configured = SHMEM2_HAS(bp, drv_flags) && in bnx2x_dcbx_update_ets_params()
577 GET_FLAGS(SHMEM2_RD(bp, drv_flags), in bnx2x_dcbx_update_ets_params()
580 bnx2x_ets_disabled(&bp->link_params, &bp->link_vars); in bnx2x_dcbx_update_ets_params()
582 if (!bp->dcbx_port_params.ets.enabled || in bnx2x_dcbx_update_ets_params()
583 ((bp->dcbx_error & DCBX_REMOTE_MIB_ERROR) && !mfw_configured)) in bnx2x_dcbx_update_ets_params()
586 if (CHIP_IS_E3B0(bp)) in bnx2x_dcbx_update_ets_params()
587 bnx2x_dcbx_update_ets_config(bp); in bnx2x_dcbx_update_ets_params()
589 bnx2x_dcbx_2cos_limit_update_ets_config(bp); in bnx2x_dcbx_update_ets_params()
593 static int bnx2x_dcbx_read_shmem_remote_mib(struct bnx2x *bp) in bnx2x_dcbx_read_shmem_remote_mib() argument
596 u32 dcbx_remote_mib_offset = SHMEM2_RD(bp, dcbx_remote_mib_offset); in bnx2x_dcbx_read_shmem_remote_mib()
607 rc = bnx2x_dcbx_read_mib(bp, (u32 *)&remote_mib, dcbx_remote_mib_offset, in bnx2x_dcbx_read_shmem_remote_mib()
616 bp->dcbx_remote_feat = remote_mib.features; in bnx2x_dcbx_read_shmem_remote_mib()
617 bp->dcbx_remote_flags = remote_mib.flags; in bnx2x_dcbx_read_shmem_remote_mib()
622 static int bnx2x_dcbx_read_shmem_neg_results(struct bnx2x *bp) in bnx2x_dcbx_read_shmem_neg_results() argument
625 u32 dcbx_neg_res_offset = SHMEM2_RD(bp, dcbx_neg_res_offset); in bnx2x_dcbx_read_shmem_neg_results()
635 rc = bnx2x_dcbx_read_mib(bp, (u32 *)&local_mib, dcbx_neg_res_offset, in bnx2x_dcbx_read_shmem_neg_results()
644 bp->dcbx_local_feat = local_mib.features; in bnx2x_dcbx_read_shmem_neg_results()
645 bp->dcbx_error = local_mib.error; in bnx2x_dcbx_read_shmem_neg_results()
670 int bnx2x_dcbnl_update_applist(struct bnx2x *bp, bool delall) in bnx2x_dcbnl_update_applist() argument
676 &bp->dcbx_local_feat.app.app_pri_tbl[i]; in bnx2x_dcbnl_update_applist()
687 err = dcb_setapp(bp->dev, &app); in bnx2x_dcbnl_update_applist()
695 static inline void bnx2x_dcbx_update_tc_mapping(struct bnx2x *bp) in bnx2x_dcbx_update_tc_mapping() argument
698 for (cos = 0; cos < bp->dcbx_port_params.ets.num_of_cos; cos++) { in bnx2x_dcbx_update_tc_mapping()
700 if (bp->dcbx_port_params.ets.cos_params[cos].pri_bitmask in bnx2x_dcbx_update_tc_mapping()
702 bp->prio_to_cos[prio] = cos; in bnx2x_dcbx_update_tc_mapping()
713 bnx2x_schedule_sp_rtnl(bp, BNX2X_SP_RTNL_SETUP_TC, 0); in bnx2x_dcbx_update_tc_mapping()
716 void bnx2x_dcbx_set_params(struct bnx2x *bp, u32 state) in bnx2x_dcbx_set_params() argument
727 bnx2x_dcbnl_update_applist(bp, true); in bnx2x_dcbx_set_params()
730 if (bnx2x_dcbx_read_shmem_remote_mib(bp)) in bnx2x_dcbx_set_params()
734 if (bnx2x_dcbx_read_shmem_neg_results(bp)) in bnx2x_dcbx_set_params()
737 bnx2x_dump_dcbx_drv_param(bp, &bp->dcbx_local_feat, in bnx2x_dcbx_set_params()
738 bp->dcbx_error); in bnx2x_dcbx_set_params()
740 bnx2x_get_dcbx_drv_param(bp, &bp->dcbx_local_feat, in bnx2x_dcbx_set_params()
741 bp->dcbx_error); in bnx2x_dcbx_set_params()
744 bnx2x_update_drv_flags(bp, in bnx2x_dcbx_set_params()
751 bnx2x_dcbnl_update_applist(bp, false); in bnx2x_dcbx_set_params()
757 bnx2x_dcbx_update_tc_mapping(bp); in bnx2x_dcbx_set_params()
763 if (IS_MF(bp)) in bnx2x_dcbx_set_params()
764 bnx2x_link_sync_notify(bp); in bnx2x_dcbx_set_params()
766 bnx2x_schedule_sp_rtnl(bp, BNX2X_SP_RTNL_TX_STOP, 0); in bnx2x_dcbx_set_params()
771 bnx2x_pfc_set_pfc(bp); in bnx2x_dcbx_set_params()
773 bnx2x_dcbx_update_ets_params(bp); in bnx2x_dcbx_set_params()
776 bnx2x_set_local_cmng(bp); in bnx2x_dcbx_set_params()
780 bnx2x_fw_command(bp, DRV_MSG_CODE_DCBX_PMF_DRV_OK, 0); in bnx2x_dcbx_set_params()
785 dcbnl_cee_notify(bp->dev, RTM_GETDCB, DCB_CMD_CEE_GET, 0, 0); in bnx2x_dcbx_set_params()
793 #define LLDP_ADMIN_MIB_OFFSET(bp) (PORT_MAX*sizeof(struct lldp_params) + \ argument
794 BP_PORT(bp)*sizeof(struct lldp_admin_mib))
796 static void bnx2x_dcbx_admin_mib_updated_params(struct bnx2x *bp, in bnx2x_dcbx_admin_mib_updated_params() argument
801 u32 offset = dcbx_lldp_params_offset + LLDP_ADMIN_MIB_OFFSET(bp); in bnx2x_dcbx_admin_mib_updated_params()
805 struct bnx2x_config_dcbx_params *dp = &bp->dcbx_config_params; in bnx2x_dcbx_admin_mib_updated_params()
810 bnx2x_read_data(bp, (u32 *)&admin_mib, offset, in bnx2x_dcbx_admin_mib_updated_params()
813 if (bp->dcbx_enabled == BNX2X_DCBX_ENABLED_ON_NEG_ON) in bnx2x_dcbx_admin_mib_updated_params()
917 bnx2x_write_data(bp, (u32 *)&admin_mib, offset, in bnx2x_dcbx_admin_mib_updated_params()
921 void bnx2x_dcbx_set_state(struct bnx2x *bp, bool dcb_on, u32 dcbx_enabled) in bnx2x_dcbx_set_state() argument
923 if (!CHIP_IS_E1x(bp)) { in bnx2x_dcbx_set_state()
924 bp->dcb_state = dcb_on; in bnx2x_dcbx_set_state()
925 bp->dcbx_enabled = dcbx_enabled; in bnx2x_dcbx_set_state()
927 bp->dcb_state = false; in bnx2x_dcbx_set_state()
928 bp->dcbx_enabled = BNX2X_DCBX_ENABLED_INVALID; in bnx2x_dcbx_set_state()
938 void bnx2x_dcbx_init_params(struct bnx2x *bp) in bnx2x_dcbx_init_params() argument
940 bp->dcbx_config_params.admin_dcbx_version = 0x0; /* 0 - CEE; 1 - IEEE */ in bnx2x_dcbx_init_params()
941 bp->dcbx_config_params.admin_ets_willing = 1; in bnx2x_dcbx_init_params()
942 bp->dcbx_config_params.admin_pfc_willing = 1; in bnx2x_dcbx_init_params()
943 bp->dcbx_config_params.overwrite_settings = 1; in bnx2x_dcbx_init_params()
944 bp->dcbx_config_params.admin_ets_enable = 1; in bnx2x_dcbx_init_params()
945 bp->dcbx_config_params.admin_pfc_enable = 1; in bnx2x_dcbx_init_params()
946 bp->dcbx_config_params.admin_tc_supported_tx_enable = 1; in bnx2x_dcbx_init_params()
947 bp->dcbx_config_params.admin_ets_configuration_tx_enable = 1; in bnx2x_dcbx_init_params()
948 bp->dcbx_config_params.admin_pfc_tx_enable = 1; in bnx2x_dcbx_init_params()
949 bp->dcbx_config_params.admin_application_priority_tx_enable = 1; in bnx2x_dcbx_init_params()
950 bp->dcbx_config_params.admin_ets_reco_valid = 1; in bnx2x_dcbx_init_params()
951 bp->dcbx_config_params.admin_app_priority_willing = 1; in bnx2x_dcbx_init_params()
952 bp->dcbx_config_params.admin_configuration_bw_precentage[0] = 100; in bnx2x_dcbx_init_params()
953 bp->dcbx_config_params.admin_configuration_bw_precentage[1] = 0; in bnx2x_dcbx_init_params()
954 bp->dcbx_config_params.admin_configuration_bw_precentage[2] = 0; in bnx2x_dcbx_init_params()
955 bp->dcbx_config_params.admin_configuration_bw_precentage[3] = 0; in bnx2x_dcbx_init_params()
956 bp->dcbx_config_params.admin_configuration_bw_precentage[4] = 0; in bnx2x_dcbx_init_params()
957 bp->dcbx_config_params.admin_configuration_bw_precentage[5] = 0; in bnx2x_dcbx_init_params()
958 bp->dcbx_config_params.admin_configuration_bw_precentage[6] = 0; in bnx2x_dcbx_init_params()
959 bp->dcbx_config_params.admin_configuration_bw_precentage[7] = 0; in bnx2x_dcbx_init_params()
960 bp->dcbx_config_params.admin_configuration_ets_pg[0] = 0; in bnx2x_dcbx_init_params()
961 bp->dcbx_config_params.admin_configuration_ets_pg[1] = 0; in bnx2x_dcbx_init_params()
962 bp->dcbx_config_params.admin_configuration_ets_pg[2] = 0; in bnx2x_dcbx_init_params()
963 bp->dcbx_config_params.admin_configuration_ets_pg[3] = 0; in bnx2x_dcbx_init_params()
964 bp->dcbx_config_params.admin_configuration_ets_pg[4] = 0; in bnx2x_dcbx_init_params()
965 bp->dcbx_config_params.admin_configuration_ets_pg[5] = 0; in bnx2x_dcbx_init_params()
966 bp->dcbx_config_params.admin_configuration_ets_pg[6] = 0; in bnx2x_dcbx_init_params()
967 bp->dcbx_config_params.admin_configuration_ets_pg[7] = 0; in bnx2x_dcbx_init_params()
968 bp->dcbx_config_params.admin_recommendation_bw_precentage[0] = 100; in bnx2x_dcbx_init_params()
969 bp->dcbx_config_params.admin_recommendation_bw_precentage[1] = 0; in bnx2x_dcbx_init_params()
970 bp->dcbx_config_params.admin_recommendation_bw_precentage[2] = 0; in bnx2x_dcbx_init_params()
971 bp->dcbx_config_params.admin_recommendation_bw_precentage[3] = 0; in bnx2x_dcbx_init_params()
972 bp->dcbx_config_params.admin_recommendation_bw_precentage[4] = 0; in bnx2x_dcbx_init_params()
973 bp->dcbx_config_params.admin_recommendation_bw_precentage[5] = 0; in bnx2x_dcbx_init_params()
974 bp->dcbx_config_params.admin_recommendation_bw_precentage[6] = 0; in bnx2x_dcbx_init_params()
975 bp->dcbx_config_params.admin_recommendation_bw_precentage[7] = 0; in bnx2x_dcbx_init_params()
976 bp->dcbx_config_params.admin_recommendation_ets_pg[0] = 0; in bnx2x_dcbx_init_params()
977 bp->dcbx_config_params.admin_recommendation_ets_pg[1] = 1; in bnx2x_dcbx_init_params()
978 bp->dcbx_config_params.admin_recommendation_ets_pg[2] = 2; in bnx2x_dcbx_init_params()
979 bp->dcbx_config_params.admin_recommendation_ets_pg[3] = 3; in bnx2x_dcbx_init_params()
980 bp->dcbx_config_params.admin_recommendation_ets_pg[4] = 4; in bnx2x_dcbx_init_params()
981 bp->dcbx_config_params.admin_recommendation_ets_pg[5] = 5; in bnx2x_dcbx_init_params()
982 bp->dcbx_config_params.admin_recommendation_ets_pg[6] = 6; in bnx2x_dcbx_init_params()
983 bp->dcbx_config_params.admin_recommendation_ets_pg[7] = 7; in bnx2x_dcbx_init_params()
984 bp->dcbx_config_params.admin_pfc_bitmap = 0x0; in bnx2x_dcbx_init_params()
985 bp->dcbx_config_params.admin_priority_app_table[0].valid = 0; in bnx2x_dcbx_init_params()
986 bp->dcbx_config_params.admin_priority_app_table[1].valid = 0; in bnx2x_dcbx_init_params()
987 bp->dcbx_config_params.admin_priority_app_table[2].valid = 0; in bnx2x_dcbx_init_params()
988 bp->dcbx_config_params.admin_priority_app_table[3].valid = 0; in bnx2x_dcbx_init_params()
989 bp->dcbx_config_params.admin_default_priority = 0; in bnx2x_dcbx_init_params()
992 void bnx2x_dcbx_init(struct bnx2x *bp, bool update_shmem) in bnx2x_dcbx_init() argument
997 if ((!bp->port.pmf) && (!(bp->flags & BC_SUPPORTS_DCBX_MSG_NON_PMF))) in bnx2x_dcbx_init()
1000 if (bp->dcbx_enabled <= 0) in bnx2x_dcbx_init()
1009 bp->dcb_state, bp->port.pmf); in bnx2x_dcbx_init()
1011 if (bp->dcb_state == BNX2X_DCB_STATE_ON && in bnx2x_dcbx_init()
1012 SHMEM2_HAS(bp, dcbx_lldp_params_offset)) { in bnx2x_dcbx_init()
1014 SHMEM2_RD(bp, dcbx_lldp_params_offset); in bnx2x_dcbx_init()
1019 bnx2x_update_drv_flags(bp, 1 << DRV_FLAGS_DCB_CONFIGURED, 0); in bnx2x_dcbx_init()
1025 bnx2x_acquire_hw_lock(bp, in bnx2x_dcbx_init()
1028 bnx2x_dcbx_admin_mib_updated_params(bp, in bnx2x_dcbx_init()
1032 bnx2x_fw_command(bp, in bnx2x_dcbx_init()
1037 bnx2x_release_hw_lock(bp, in bnx2x_dcbx_init()
1043 bnx2x_dcbx_print_cos_params(struct bnx2x *bp, in bnx2x_dcbx_print_cos_params() argument
1053 bp->dcbx_port_params.pfc.priority_non_pauseable_mask); in bnx2x_dcbx_print_cos_params()
1055 for (cos = 0 ; cos < bp->dcbx_port_params.ets.num_of_cos ; cos++) { in bnx2x_dcbx_print_cos_params()
1058 cos, bp->dcbx_port_params.ets.cos_params[cos].pri_bitmask); in bnx2x_dcbx_print_cos_params()
1062 cos, bp->dcbx_port_params.ets.cos_params[cos].bw_tbl); in bnx2x_dcbx_print_cos_params()
1066 cos, bp->dcbx_port_params.ets.cos_params[cos].strict); in bnx2x_dcbx_print_cos_params()
1070 cos, bp->dcbx_port_params.ets.cos_params[cos].pauseable); in bnx2x_dcbx_print_cos_params()
1085 static void bnx2x_dcbx_get_num_pg_traf_type(struct bnx2x *bp, in bnx2x_dcbx_get_num_pg_traf_type() argument
1091 u32 *ttp = bp->dcbx_port_params.app.traffic_type_priority; in bnx2x_dcbx_get_num_pg_traf_type()
1132 static void bnx2x_dcbx_ets_disabled_entry_data(struct bnx2x *bp, in bnx2x_dcbx_ets_disabled_entry_data() argument
1138 IS_DCBX_PFC_PRI_ONLY_PAUSE(bp, pri_join_mask); in bnx2x_dcbx_ets_disabled_entry_data()
1144 static inline void bnx2x_dcbx_add_to_cos_bw(struct bnx2x *bp, in bnx2x_dcbx_add_to_cos_bw() argument
1154 static void bnx2x_dcbx_separate_pauseable_from_non(struct bnx2x *bp, in bnx2x_dcbx_separate_pauseable_from_non() argument
1170 pri_tested = 1 << bp->dcbx_port_params. in bnx2x_dcbx_separate_pauseable_from_non()
1173 if (pri_tested & DCBX_PFC_PRI_NON_PAUSE_MASK(bp)) { in bnx2x_dcbx_separate_pauseable_from_non()
1180 pg_entry = (u8)pg_pri_orginal_spread[bp->dcbx_port_params. in bnx2x_dcbx_separate_pauseable_from_non()
1184 bnx2x_dcbx_add_to_cos_bw(bp, &cos_data->data[entry], in bnx2x_dcbx_separate_pauseable_from_non()
1202 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
1211 u32 *ttp = bp->dcbx_port_params.app.traffic_type_priority; in bnx2x_dcbx_2cos_limit_cee_single_pg_to_cos_params()
1214 bnx2x_dcbx_ets_disabled_entry_data(bp, cos_data, pri_join_mask); in bnx2x_dcbx_2cos_limit_cee_single_pg_to_cos_params()
1223 if (IS_DCBX_PFC_PRI_MIX_PAUSE(bp, pri_join_mask)) { in bnx2x_dcbx_2cos_limit_cee_single_pg_to_cos_params()
1235 if (POWER_OF_2(DCBX_PFC_PRI_GET_PAUSE(bp, in bnx2x_dcbx_2cos_limit_cee_single_pg_to_cos_params()
1245 } else if (IS_DCBX_PFC_PRI_ONLY_PAUSE(bp, pri_join_mask)) { in bnx2x_dcbx_2cos_limit_cee_single_pg_to_cos_params()
1269 bnx2x_dcbx_ets_disabled_entry_data(bp, in bnx2x_dcbx_2cos_limit_cee_single_pg_to_cos_params()
1273 if (IS_DCBX_PFC_PRI_MIX_PAUSE(bp, pri_join_mask)) { in bnx2x_dcbx_2cos_limit_cee_single_pg_to_cos_params()
1279 if (DCBX_PFC_PRI_GET_PAUSE(bp, pri_join_mask) > in bnx2x_dcbx_2cos_limit_cee_single_pg_to_cos_params()
1280 DCBX_PFC_PRI_GET_NON_PAUSE(bp, pri_join_mask)) { in bnx2x_dcbx_2cos_limit_cee_single_pg_to_cos_params()
1305 IS_DCBX_PFC_PRI_ONLY_PAUSE(bp, pri_join_mask); in bnx2x_dcbx_2cos_limit_cee_single_pg_to_cos_params()
1308 pri_tested = 1 << bp->dcbx_port_params. in bnx2x_dcbx_2cos_limit_cee_single_pg_to_cos_params()
1336 struct bnx2x *bp, in bnx2x_dcbx_2cos_limit_cee_two_pg_to_cos_params() argument
1351 if (IS_DCBX_PFC_PRI_MIX_PAUSE(bp, pri_join_mask)) { in bnx2x_dcbx_2cos_limit_cee_two_pg_to_cos_params()
1352 if (IS_DCBX_PFC_PRI_MIX_PAUSE(bp, in bnx2x_dcbx_2cos_limit_cee_two_pg_to_cos_params()
1354 IS_DCBX_PFC_PRI_MIX_PAUSE(bp, in bnx2x_dcbx_2cos_limit_cee_two_pg_to_cos_params()
1359 bnx2x_dcbx_separate_pauseable_from_non(bp, cos_data, in bnx2x_dcbx_2cos_limit_cee_two_pg_to_cos_params()
1361 bp->dcbx_port_params.ets.enabled = false; in bnx2x_dcbx_2cos_limit_cee_two_pg_to_cos_params()
1369 if (IS_DCBX_PFC_PRI_ONLY_PAUSE(bp, in bnx2x_dcbx_2cos_limit_cee_two_pg_to_cos_params()
1391 IS_DCBX_PFC_PRI_ONLY_PAUSE(bp, pri_join_mask); in bnx2x_dcbx_2cos_limit_cee_two_pg_to_cos_params()
1412 struct bnx2x *bp, in bnx2x_dcbx_join_pgs() argument
1463 struct bnx2x *bp, in bnx2x_dcbx_2cos_limit_cee_three_pg_to_cos_params() argument
1483 if (IS_DCBX_PFC_PRI_MIX_PAUSE(bp, pri_join_mask)) in bnx2x_dcbx_2cos_limit_cee_three_pg_to_cos_params()
1484 bnx2x_dcbx_separate_pauseable_from_non(bp, in bnx2x_dcbx_2cos_limit_cee_three_pg_to_cos_params()
1505 IS_DCBX_PFC_PRI_ONLY_PAUSE(bp, pri_join_mask); in bnx2x_dcbx_2cos_limit_cee_three_pg_to_cos_params()
1508 pri_tested = 1 << bp->dcbx_port_params. in bnx2x_dcbx_2cos_limit_cee_three_pg_to_cos_params()
1510 pg_entry = (u8)pg_pri_orginal_spread[bp-> in bnx2x_dcbx_2cos_limit_cee_three_pg_to_cos_params()
1525 bnx2x_dcbx_add_to_cos_bw(bp, in bnx2x_dcbx_2cos_limit_cee_three_pg_to_cos_params()
1542 static void bnx2x_dcbx_2cos_limit_cee_fill_cos_params(struct bnx2x *bp, in bnx2x_dcbx_2cos_limit_cee_fill_cos_params() argument
1556 bp, in bnx2x_dcbx_2cos_limit_cee_fill_cos_params()
1564 bp, in bnx2x_dcbx_2cos_limit_cee_fill_cos_params()
1575 bp, in bnx2x_dcbx_2cos_limit_cee_fill_cos_params()
1585 bnx2x_dcbx_ets_disabled_entry_data(bp, in bnx2x_dcbx_2cos_limit_cee_fill_cos_params()
1590 static int bnx2x_dcbx_spread_strict_pri(struct bnx2x *bp, in bnx2x_dcbx_spread_strict_pri() argument
1611 data->pausable = DCBX_IS_PFC_PRI_SOME_PAUSE(bp, in bnx2x_dcbx_spread_strict_pri()
1619 data->pausable = DCBX_IS_PFC_PRI_SOME_PAUSE(bp, in bnx2x_dcbx_spread_strict_pri()
1639 static u8 bnx2x_dcbx_cee_fill_strict_pri(struct bnx2x *bp, in bnx2x_dcbx_cee_fill_strict_pri() argument
1645 if (bnx2x_dcbx_spread_strict_pri(bp, cos_data, entry, in bnx2x_dcbx_cee_fill_strict_pri()
1654 data->pausable = DCBX_IS_PFC_PRI_SOME_PAUSE(bp, in bnx2x_dcbx_cee_fill_strict_pri()
1662 static void bnx2x_dcbx_cee_fill_cos_params(struct bnx2x *bp, in bnx2x_dcbx_cee_fill_cos_params() argument
1679 if (bnx2x_dcbx_join_pgs(bp, ets, help_data, in bnx2x_dcbx_cee_fill_cos_params()
1682 bnx2x_dcbx_ets_disabled_entry_data(bp, cos_data, in bnx2x_dcbx_cee_fill_cos_params()
1697 data->pausable = DCBX_IS_PFC_PRI_SOME_PAUSE(bp, in bnx2x_dcbx_cee_fill_cos_params()
1711 entry += bnx2x_dcbx_cee_fill_strict_pri(bp, cos_data, in bnx2x_dcbx_cee_fill_cos_params()
1719 static void bnx2x_dcbx_fill_cos_params(struct bnx2x *bp, in bnx2x_dcbx_fill_cos_params() argument
1750 if (CHIP_IS_E3B0(bp)) in bnx2x_dcbx_fill_cos_params()
1751 bnx2x_dcbx_cee_fill_cos_params(bp, help_data, ets, in bnx2x_dcbx_fill_cos_params()
1754 bnx2x_dcbx_2cos_limit_cee_fill_cos_params(bp, in bnx2x_dcbx_fill_cos_params()
1763 &bp->dcbx_port_params.ets.cos_params[i]; in bnx2x_dcbx_fill_cos_params()
1776 if (CHIP_IS_E2(bp) || CHIP_IS_E3A0(bp)) { in bnx2x_dcbx_fill_cos_params()
1779 DCBX_PFC_PRI_GET_NON_PAUSE(bp, in bnx2x_dcbx_fill_cos_params()
1785 DCBX_PFC_PRI_GET_PAUSE(bp, in bnx2x_dcbx_fill_cos_params()
1801 bp->dcbx_port_params.ets.num_of_cos = cos_data.num_of_cos ; in bnx2x_dcbx_fill_cos_params()
1804 static void bnx2x_dcbx_get_ets_pri_pg_tbl(struct bnx2x *bp, in bnx2x_dcbx_get_ets_pri_pg_tbl() argument
1818 static void bnx2x_dcbx_fw_struct(struct bnx2x *bp, in bnx2x_dcbx_fw_struct() argument
1824 u32 *ttp = bp->dcbx_port_params.app.traffic_type_priority; in bnx2x_dcbx_fw_struct()
1825 int mfw_configured = SHMEM2_HAS(bp, drv_flags) && in bnx2x_dcbx_fw_struct()
1826 GET_FLAGS(SHMEM2_RD(bp, drv_flags), in bnx2x_dcbx_fw_struct()
1832 if ((bp->dcbx_error & DCBX_REMOTE_MIB_ERROR) && !mfw_configured) in bnx2x_dcbx_fw_struct()
1839 pfc_fw_cfg->dcb_version = ++bp->dcb_version; in bnx2x_dcbx_fw_struct()
1849 for (cos = 0; cos < bp->dcbx_port_params.ets.num_of_cos; cos++) in bnx2x_dcbx_fw_struct()
1850 if (bp->dcbx_port_params.ets.cos_params[cos]. in bnx2x_dcbx_fw_struct()
1858 bnx2x_dcbx_print_cos_params(bp, pfc_fw_cfg); in bnx2x_dcbx_fw_struct()
1861 void bnx2x_dcbx_pmf_update(struct bnx2x *bp) in bnx2x_dcbx_pmf_update() argument
1866 if (SHMEM2_HAS(bp, drv_flags) && in bnx2x_dcbx_pmf_update()
1867 GET_FLAGS(SHMEM2_RD(bp, drv_flags), 1 << DRV_FLAGS_DCB_CONFIGURED)) { in bnx2x_dcbx_pmf_update()
1869 if (bnx2x_dcbx_read_shmem_neg_results(bp)) in bnx2x_dcbx_pmf_update()
1872 bnx2x_dump_dcbx_drv_param(bp, &bp->dcbx_local_feat, in bnx2x_dcbx_pmf_update()
1873 bp->dcbx_error); in bnx2x_dcbx_pmf_update()
1874 bnx2x_get_dcbx_drv_param(bp, &bp->dcbx_local_feat, in bnx2x_dcbx_pmf_update()
1875 bp->dcbx_error); in bnx2x_dcbx_pmf_update()
1880 bnx2x_dcbnl_update_applist(bp, false); in bnx2x_dcbx_pmf_update()
1884 dcbnl_cee_notify(bp->dev, RTM_GETDCB, DCB_CMD_CEE_GET, 0, 0); in bnx2x_dcbx_pmf_update()
1890 bnx2x_dcbx_update_tc_mapping(bp); in bnx2x_dcbx_pmf_update()
1900 static inline bool bnx2x_dcbnl_set_valid(struct bnx2x *bp) in bnx2x_dcbnl_set_valid() argument
1905 return bp->dcb_state && bp->dcbx_mode_uset; in bnx2x_dcbnl_set_valid()
1910 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_get_state() local
1911 DP(BNX2X_MSG_DCB, "state = %d\n", bp->dcb_state); in bnx2x_dcbnl_get_state()
1912 return bp->dcb_state; in bnx2x_dcbnl_get_state()
1917 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_set_state() local
1921 if (state && ((bp->dcbx_enabled == BNX2X_DCBX_ENABLED_OFF) || in bnx2x_dcbnl_set_state()
1922 (bp->dcbx_enabled == BNX2X_DCBX_ENABLED_INVALID))) { in bnx2x_dcbnl_set_state()
1927 bnx2x_dcbx_set_state(bp, (state ? true : false), bp->dcbx_enabled); in bnx2x_dcbnl_set_state()
1934 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_get_perm_hw_addr() local
1940 if (CNIC_LOADED(bp)) in bnx2x_dcbnl_get_perm_hw_addr()
1942 memcpy(perm_addr+netdev->addr_len, bp->fip_mac, in bnx2x_dcbnl_get_perm_hw_addr()
1950 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_set_pg_tccfg_tx() local
1953 if (!bnx2x_dcbnl_set_valid(bp) || prio >= DCBX_MAX_NUM_PRI_PG_ENTRIES) in bnx2x_dcbnl_set_pg_tccfg_tx()
1969 bp->dcbx_config_params.admin_configuration_ets_pg[prio] = pgid; in bnx2x_dcbnl_set_pg_tccfg_tx()
1970 bp->dcbx_config_params.admin_ets_configuration_tx_enable = 1; in bnx2x_dcbnl_set_pg_tccfg_tx()
1976 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_set_pg_bwgcfg_tx() local
1979 if (!bnx2x_dcbnl_set_valid(bp) || pgid >= DCBX_MAX_NUM_PG_BW_ENTRIES) in bnx2x_dcbnl_set_pg_bwgcfg_tx()
1982 bp->dcbx_config_params.admin_configuration_bw_precentage[pgid] = bw_pct; in bnx2x_dcbnl_set_pg_bwgcfg_tx()
1983 bp->dcbx_config_params.admin_ets_configuration_tx_enable = 1; in bnx2x_dcbnl_set_pg_bwgcfg_tx()
1990 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_set_pg_tccfg_rx() local
1997 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_set_pg_bwgcfg_rx() local
2005 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_get_pg_tccfg_tx() local
2022 if (!bp->dcb_state || prio >= DCBX_MAX_NUM_PRI_PG_ENTRIES) in bnx2x_dcbnl_get_pg_tccfg_tx()
2025 *pgid = DCBX_PRI_PG_GET(bp->dcbx_local_feat.ets.pri_pg_tbl, prio); in bnx2x_dcbnl_get_pg_tccfg_tx()
2031 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_get_pg_bwgcfg_tx() local
2036 if (!bp->dcb_state || pgid >= DCBX_MAX_NUM_PG_BW_ENTRIES) in bnx2x_dcbnl_get_pg_bwgcfg_tx()
2039 *bw_pct = DCBX_PG_BW_GET(bp->dcbx_local_feat.ets.pg_bw_tbl, pgid); in bnx2x_dcbnl_get_pg_bwgcfg_tx()
2046 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_get_pg_tccfg_rx() local
2055 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_get_pg_bwgcfg_rx() local
2064 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_set_pfc_cfg() local
2067 if (!bnx2x_dcbnl_set_valid(bp) || prio >= MAX_PFC_PRIORITIES) in bnx2x_dcbnl_set_pfc_cfg()
2071 bp->dcbx_config_params.admin_pfc_bitmap |= (1 << prio); in bnx2x_dcbnl_set_pfc_cfg()
2072 bp->dcbx_config_params.admin_pfc_tx_enable = 1; in bnx2x_dcbnl_set_pfc_cfg()
2074 bp->dcbx_config_params.admin_pfc_bitmap &= ~(1 << prio); in bnx2x_dcbnl_set_pfc_cfg()
2081 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_get_pfc_cfg() local
2086 if (!bp->dcb_state || prio >= MAX_PFC_PRIORITIES) in bnx2x_dcbnl_get_pfc_cfg()
2089 *setting = (bp->dcbx_local_feat.pfc.pri_en_bitmap >> prio) & 0x1; in bnx2x_dcbnl_get_pfc_cfg()
2094 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_set_all() local
2098 if (!bnx2x_dcbnl_set_valid(bp)) in bnx2x_dcbnl_set_all()
2101 if (bp->recovery_state != BNX2X_RECOVERY_DONE) { in bnx2x_dcbnl_set_all()
2102 netdev_err(bp->dev, in bnx2x_dcbnl_set_all()
2106 if (netif_running(bp->dev)) { in bnx2x_dcbnl_set_all()
2107 bnx2x_update_drv_flags(bp, in bnx2x_dcbnl_set_all()
2110 bnx2x_dcbx_init(bp, true); in bnx2x_dcbnl_set_all()
2119 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_get_cap() local
2122 if (bp->dcb_state) { in bnx2x_dcbnl_get_cap()
2164 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_get_numtcs() local
2169 if (bp->dcb_state) { in bnx2x_dcbnl_get_numtcs()
2172 *num = CHIP_IS_E3B0(bp) ? DCBX_COS_MAX_NUM_E3B0 : in bnx2x_dcbnl_get_numtcs()
2176 *num = CHIP_IS_E3B0(bp) ? DCBX_COS_MAX_NUM_E3B0 : in bnx2x_dcbnl_get_numtcs()
2194 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_set_numtcs() local
2201 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_get_pfc_state() local
2202 DP(BNX2X_MSG_DCB, "state = %d\n", bp->dcbx_local_feat.pfc.enabled); in bnx2x_dcbnl_get_pfc_state()
2204 if (!bp->dcb_state) in bnx2x_dcbnl_get_pfc_state()
2207 return bp->dcbx_local_feat.pfc.enabled; in bnx2x_dcbnl_get_pfc_state()
2212 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_set_pfc_state() local
2215 if (!bnx2x_dcbnl_set_valid(bp)) in bnx2x_dcbnl_set_pfc_state()
2218 bp->dcbx_config_params.admin_pfc_tx_enable = in bnx2x_dcbnl_set_pfc_state()
2219 bp->dcbx_config_params.admin_pfc_enable = (state ? 1 : 0); in bnx2x_dcbnl_set_pfc_state()
2267 static int bnx2x_set_admin_app_up(struct bnx2x *bp, u8 idtype, u16 idval, u8 up) in bnx2x_set_admin_app_up() argument
2274 &bp->dcbx_config_params.admin_priority_app_table[i]; in bnx2x_set_admin_app_up()
2283 bp->dcbx_config_params. in bnx2x_set_admin_app_up()
2288 &bp->dcbx_config_params.admin_priority_app_table[ff], in bnx2x_set_admin_app_up()
2298 bp->dcbx_config_params.admin_application_priority_tx_enable = 1; in bnx2x_set_admin_app_up()
2306 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_set_app_up() local
2311 if (!bnx2x_dcbnl_set_valid(bp)) { in bnx2x_dcbnl_set_app_up()
2325 return bnx2x_set_admin_app_up(bp, idtype, idval, up); in bnx2x_dcbnl_set_app_up()
2330 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_get_dcbx() local
2335 if (bp->dcbx_enabled == BNX2X_DCBX_ENABLED_ON_NEG_OFF) in bnx2x_dcbnl_get_dcbx()
2343 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_set_dcbx() local
2354 if (bp->dcb_state != BNX2X_DCB_STATE_ON) { in bnx2x_dcbnl_set_dcbx()
2360 bp->dcbx_enabled = BNX2X_DCBX_ENABLED_ON_NEG_OFF; in bnx2x_dcbnl_set_dcbx()
2362 bp->dcbx_enabled = BNX2X_DCBX_ENABLED_ON_NEG_ON; in bnx2x_dcbnl_set_dcbx()
2364 bp->dcbx_mode_uset = true; in bnx2x_dcbnl_set_dcbx()
2371 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_get_featcfg() local
2376 if (bp->dcb_state) { in bnx2x_dcbnl_get_featcfg()
2380 if (bp->dcbx_local_feat.ets.enabled) in bnx2x_dcbnl_get_featcfg()
2382 if (bp->dcbx_error & (DCBX_LOCAL_ETS_ERROR | in bnx2x_dcbnl_get_featcfg()
2387 if (bp->dcbx_local_feat.pfc.enabled) in bnx2x_dcbnl_get_featcfg()
2389 if (bp->dcbx_error & (DCBX_LOCAL_PFC_ERROR | in bnx2x_dcbnl_get_featcfg()
2395 if (bp->dcbx_local_feat.app.enabled) in bnx2x_dcbnl_get_featcfg()
2397 if (bp->dcbx_error & (DCBX_LOCAL_APP_ERROR | in bnx2x_dcbnl_get_featcfg()
2418 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_set_featcfg() local
2424 if (bnx2x_dcbnl_set_valid(bp)) { in bnx2x_dcbnl_set_featcfg()
2427 bp->dcbx_config_params.admin_ets_enable = in bnx2x_dcbnl_set_featcfg()
2429 bp->dcbx_config_params.admin_ets_willing = in bnx2x_dcbnl_set_featcfg()
2433 bp->dcbx_config_params.admin_pfc_enable = in bnx2x_dcbnl_set_featcfg()
2435 bp->dcbx_config_params.admin_pfc_willing = in bnx2x_dcbnl_set_featcfg()
2440 bp->dcbx_config_params.admin_app_priority_willing = in bnx2x_dcbnl_set_featcfg()
2460 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_peer_appinfo() local
2464 info->willing = (bp->dcbx_remote_flags & DCBX_APP_REM_WILLING) ?: 0; in bnx2x_peer_appinfo()
2465 info->error = (bp->dcbx_remote_flags & DCBX_APP_RX_ERROR) ?: 0; in bnx2x_peer_appinfo()
2469 if (bp->dcbx_remote_feat.app.app_pri_tbl[i].appBitfield & in bnx2x_peer_appinfo()
2479 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_peer_apptable() local
2485 &bp->dcbx_remote_feat.app.app_pri_tbl[i]; in bnx2x_peer_apptable()
2499 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_cee_peer_getpg() local
2501 pg->willing = (bp->dcbx_remote_flags & DCBX_ETS_REM_WILLING) ?: 0; in bnx2x_cee_peer_getpg()
2505 DCBX_PG_BW_GET(bp->dcbx_remote_feat.ets.pg_bw_tbl, i); in bnx2x_cee_peer_getpg()
2507 DCBX_PRI_PG_GET(bp->dcbx_remote_feat.ets.pri_pg_tbl, i); in bnx2x_cee_peer_getpg()
2515 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_cee_peer_getpfc() local
2516 pfc->tcs_supported = bp->dcbx_remote_feat.pfc.pfc_caps; in bnx2x_cee_peer_getpfc()
2517 pfc->pfc_en = bp->dcbx_remote_feat.pfc.pri_en_bitmap; in bnx2x_cee_peer_getpfc()