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()
212 bp->dcbx_port_params.app.enabled = true; in bnx2x_dcbx_get_ap_feature()
243 bnx2x_dcbx_get_ap_priority(bp, in bnx2x_dcbx_get_ap_feature()
268 bp->dcbx_port_params.app.enabled = false; in bnx2x_dcbx_get_ap_feature()
274 static void bnx2x_dcbx_get_ets_feature(struct bnx2x *bp, in bnx2x_dcbx_get_ets_feature() argument
281 bp->dcbx_port_params.ets.cos_params; in bnx2x_dcbx_get_ets_feature()
292 for (i = 0; i < ARRAY_SIZE(bp->dcbx_port_params.ets.cos_params) ; i++) { in bnx2x_dcbx_get_ets_feature()
299 if (bp->dcbx_port_params.app.enabled && ets->enabled && in bnx2x_dcbx_get_ets_feature()
303 bp->dcbx_port_params.ets.enabled = true; in bnx2x_dcbx_get_ets_feature()
305 bnx2x_dcbx_get_ets_pri_pg_tbl(bp, in bnx2x_dcbx_get_ets_feature()
309 bnx2x_dcbx_get_num_pg_traf_type(bp, in bnx2x_dcbx_get_ets_feature()
313 bnx2x_dcbx_fill_cos_params(bp, &pg_help_data, in bnx2x_dcbx_get_ets_feature()
318 bp->dcbx_port_params.ets.enabled = false; in bnx2x_dcbx_get_ets_feature()
326 static void bnx2x_dcbx_get_pfc_feature(struct bnx2x *bp, in bnx2x_dcbx_get_pfc_feature() argument
334 if (bp->dcbx_port_params.app.enabled && pfc->enabled && in bnx2x_dcbx_get_pfc_feature()
337 bp->dcbx_port_params.pfc.enabled = true; in bnx2x_dcbx_get_pfc_feature()
338 bp->dcbx_port_params.pfc.priority_non_pauseable_mask = in bnx2x_dcbx_get_pfc_feature()
342 bp->dcbx_port_params.pfc.enabled = false; in bnx2x_dcbx_get_pfc_feature()
343 bp->dcbx_port_params.pfc.priority_non_pauseable_mask = 0; in bnx2x_dcbx_get_pfc_feature()
348 static void bnx2x_dcbx_map_nw(struct bnx2x *bp) in bnx2x_dcbx_map_nw() argument
352 u32 *ttp = bp->dcbx_port_params.app.traffic_type_priority; in bnx2x_dcbx_map_nw()
355 bp->dcbx_port_params.ets.cos_params; in bnx2x_dcbx_map_nw()
362 for (i = 0; i < ARRAY_SIZE(bp->dcbx_port_params.ets.cos_params); i++) { in bnx2x_dcbx_map_nw()
373 static void bnx2x_get_dcbx_drv_param(struct bnx2x *bp, in bnx2x_get_dcbx_drv_param() argument
377 bnx2x_dcbx_get_ap_feature(bp, &features->app, error); in bnx2x_get_dcbx_drv_param()
379 bnx2x_dcbx_get_pfc_feature(bp, &features->pfc, error); in bnx2x_get_dcbx_drv_param()
381 bnx2x_dcbx_get_ets_feature(bp, &features->ets, error); in bnx2x_get_dcbx_drv_param()
383 bnx2x_dcbx_map_nw(bp); in bnx2x_get_dcbx_drv_param()
387 static int bnx2x_dcbx_read_mib(struct bnx2x *bp, in bnx2x_dcbx_read_mib() argument
408 offset += BP_PORT(bp) * mib_size; in bnx2x_dcbx_read_mib()
411 bnx2x_read_data(bp, base_mib_addr, offset, mib_size); in bnx2x_dcbx_read_mib()
440 static void bnx2x_pfc_set_pfc(struct bnx2x *bp) in bnx2x_pfc_set_pfc() argument
442 int mfw_configured = SHMEM2_HAS(bp, drv_flags) && in bnx2x_pfc_set_pfc()
443 GET_FLAGS(SHMEM2_RD(bp, drv_flags), in bnx2x_pfc_set_pfc()
446 if (bp->dcbx_port_params.pfc.enabled && in bnx2x_pfc_set_pfc()
447 (!(bp->dcbx_error & DCBX_REMOTE_MIB_ERROR) || mfw_configured)) in bnx2x_pfc_set_pfc()
452 bnx2x_pfc_set(bp); in bnx2x_pfc_set_pfc()
454 bnx2x_pfc_clear(bp); in bnx2x_pfc_set_pfc()
457 int bnx2x_dcbx_stop_hw_tx(struct bnx2x *bp) in bnx2x_dcbx_stop_hw_tx() argument
462 func_params.f_obj = &bp->func_obj; in bnx2x_dcbx_stop_hw_tx()
470 rc = bnx2x_func_state_change(bp, &func_params); in bnx2x_dcbx_stop_hw_tx()
479 int bnx2x_dcbx_resume_hw_tx(struct bnx2x *bp) in bnx2x_dcbx_resume_hw_tx() argument
486 func_params.f_obj = &bp->func_obj; in bnx2x_dcbx_resume_hw_tx()
492 bnx2x_dcbx_fw_struct(bp, tx_params); in bnx2x_dcbx_resume_hw_tx()
496 rc = bnx2x_func_state_change(bp, &func_params); in bnx2x_dcbx_resume_hw_tx()
505 static void bnx2x_dcbx_2cos_limit_update_ets_config(struct bnx2x *bp) in bnx2x_dcbx_2cos_limit_update_ets_config() argument
507 struct bnx2x_dcbx_pg_params *ets = &(bp->dcbx_port_params.ets); in bnx2x_dcbx_2cos_limit_update_ets_config()
552 bnx2x_ets_bw_limit(&bp->link_params, bw_tbl_0, bw_tbl_1); in bnx2x_dcbx_2cos_limit_update_ets_config()
555 rc = bnx2x_ets_strict(&bp->link_params, 0); in bnx2x_dcbx_2cos_limit_update_ets_config()
558 rc = bnx2x_ets_strict(&bp->link_params, 1); in bnx2x_dcbx_2cos_limit_update_ets_config()
567 static void bnx2x_dcbx_update_ets_config(struct bnx2x *bp) in bnx2x_dcbx_update_ets_config() argument
569 struct bnx2x_dcbx_pg_params *ets = &(bp->dcbx_port_params.ets); in bnx2x_dcbx_update_ets_config()
598 if (bnx2x_ets_e3b0_config(&bp->link_params, &bp->link_vars, in bnx2x_dcbx_update_ets_config()
601 bnx2x_ets_disabled(&bp->link_params, &bp->link_vars); in bnx2x_dcbx_update_ets_config()
605 static void bnx2x_dcbx_update_ets_params(struct bnx2x *bp) in bnx2x_dcbx_update_ets_params() argument
607 int mfw_configured = SHMEM2_HAS(bp, drv_flags) && in bnx2x_dcbx_update_ets_params()
608 GET_FLAGS(SHMEM2_RD(bp, drv_flags), in bnx2x_dcbx_update_ets_params()
611 bnx2x_ets_disabled(&bp->link_params, &bp->link_vars); in bnx2x_dcbx_update_ets_params()
613 if (!bp->dcbx_port_params.ets.enabled || in bnx2x_dcbx_update_ets_params()
614 ((bp->dcbx_error & DCBX_REMOTE_MIB_ERROR) && !mfw_configured)) in bnx2x_dcbx_update_ets_params()
617 if (CHIP_IS_E3B0(bp)) in bnx2x_dcbx_update_ets_params()
618 bnx2x_dcbx_update_ets_config(bp); in bnx2x_dcbx_update_ets_params()
620 bnx2x_dcbx_2cos_limit_update_ets_config(bp); in bnx2x_dcbx_update_ets_params()
624 static int bnx2x_dcbx_read_shmem_remote_mib(struct bnx2x *bp) in bnx2x_dcbx_read_shmem_remote_mib() argument
627 u32 dcbx_remote_mib_offset = SHMEM2_RD(bp, dcbx_remote_mib_offset); in bnx2x_dcbx_read_shmem_remote_mib()
638 rc = bnx2x_dcbx_read_mib(bp, (u32 *)&remote_mib, dcbx_remote_mib_offset, in bnx2x_dcbx_read_shmem_remote_mib()
647 bp->dcbx_remote_feat = remote_mib.features; in bnx2x_dcbx_read_shmem_remote_mib()
648 bp->dcbx_remote_flags = remote_mib.flags; in bnx2x_dcbx_read_shmem_remote_mib()
653 static int bnx2x_dcbx_read_shmem_neg_results(struct bnx2x *bp) in bnx2x_dcbx_read_shmem_neg_results() argument
656 u32 dcbx_neg_res_offset = SHMEM2_RD(bp, dcbx_neg_res_offset); in bnx2x_dcbx_read_shmem_neg_results()
666 rc = bnx2x_dcbx_read_mib(bp, (u32 *)&local_mib, dcbx_neg_res_offset, in bnx2x_dcbx_read_shmem_neg_results()
675 bp->dcbx_local_feat = local_mib.features; in bnx2x_dcbx_read_shmem_neg_results()
676 bp->dcbx_error = local_mib.error; in bnx2x_dcbx_read_shmem_neg_results()
701 int bnx2x_dcbnl_update_applist(struct bnx2x *bp, bool delall) in bnx2x_dcbnl_update_applist() argument
707 &bp->dcbx_local_feat.app.app_pri_tbl[i]; in bnx2x_dcbnl_update_applist()
718 err = dcb_setapp(bp->dev, &app); in bnx2x_dcbnl_update_applist()
726 static inline void bnx2x_dcbx_update_tc_mapping(struct bnx2x *bp) in bnx2x_dcbx_update_tc_mapping() argument
729 for (cos = 0; cos < bp->dcbx_port_params.ets.num_of_cos; cos++) { in bnx2x_dcbx_update_tc_mapping()
731 if (bp->dcbx_port_params.ets.cos_params[cos].pri_bitmask in bnx2x_dcbx_update_tc_mapping()
733 bp->prio_to_cos[prio] = cos; in bnx2x_dcbx_update_tc_mapping()
744 bnx2x_schedule_sp_rtnl(bp, BNX2X_SP_RTNL_SETUP_TC, 0); in bnx2x_dcbx_update_tc_mapping()
747 void bnx2x_dcbx_set_params(struct bnx2x *bp, u32 state) in bnx2x_dcbx_set_params() argument
758 bnx2x_dcbnl_update_applist(bp, true); in bnx2x_dcbx_set_params()
761 if (bnx2x_dcbx_read_shmem_remote_mib(bp)) in bnx2x_dcbx_set_params()
765 if (bnx2x_dcbx_read_shmem_neg_results(bp)) in bnx2x_dcbx_set_params()
768 bnx2x_dump_dcbx_drv_param(bp, &bp->dcbx_local_feat, in bnx2x_dcbx_set_params()
769 bp->dcbx_error); in bnx2x_dcbx_set_params()
771 bnx2x_get_dcbx_drv_param(bp, &bp->dcbx_local_feat, in bnx2x_dcbx_set_params()
772 bp->dcbx_error); in bnx2x_dcbx_set_params()
775 bnx2x_update_drv_flags(bp, in bnx2x_dcbx_set_params()
782 bnx2x_dcbnl_update_applist(bp, false); in bnx2x_dcbx_set_params()
788 bnx2x_dcbx_update_tc_mapping(bp); in bnx2x_dcbx_set_params()
794 if (IS_MF(bp)) in bnx2x_dcbx_set_params()
795 bnx2x_link_sync_notify(bp); in bnx2x_dcbx_set_params()
797 bnx2x_schedule_sp_rtnl(bp, BNX2X_SP_RTNL_TX_STOP, 0); in bnx2x_dcbx_set_params()
802 bnx2x_pfc_set_pfc(bp); in bnx2x_dcbx_set_params()
804 bnx2x_dcbx_update_ets_params(bp); in bnx2x_dcbx_set_params()
807 bnx2x_set_local_cmng(bp); in bnx2x_dcbx_set_params()
811 bnx2x_fw_command(bp, DRV_MSG_CODE_DCBX_PMF_DRV_OK, 0); in bnx2x_dcbx_set_params()
816 dcbnl_cee_notify(bp->dev, RTM_GETDCB, DCB_CMD_CEE_GET, 0, 0); in bnx2x_dcbx_set_params()
824 #define LLDP_ADMIN_MIB_OFFSET(bp) (PORT_MAX*sizeof(struct lldp_params) + \ argument
825 BP_PORT(bp)*sizeof(struct lldp_admin_mib))
827 static void bnx2x_dcbx_admin_mib_updated_params(struct bnx2x *bp, in bnx2x_dcbx_admin_mib_updated_params() argument
832 u32 offset = dcbx_lldp_params_offset + LLDP_ADMIN_MIB_OFFSET(bp); in bnx2x_dcbx_admin_mib_updated_params()
836 struct bnx2x_config_dcbx_params *dp = &bp->dcbx_config_params; in bnx2x_dcbx_admin_mib_updated_params()
841 bnx2x_read_data(bp, (u32 *)&admin_mib, offset, in bnx2x_dcbx_admin_mib_updated_params()
844 if (bp->dcbx_enabled == BNX2X_DCBX_ENABLED_ON_NEG_ON) in bnx2x_dcbx_admin_mib_updated_params()
948 bnx2x_write_data(bp, (u32 *)&admin_mib, offset, in bnx2x_dcbx_admin_mib_updated_params()
952 void bnx2x_dcbx_set_state(struct bnx2x *bp, bool dcb_on, u32 dcbx_enabled) in bnx2x_dcbx_set_state() argument
954 if (!CHIP_IS_E1x(bp)) { in bnx2x_dcbx_set_state()
955 bp->dcb_state = dcb_on; in bnx2x_dcbx_set_state()
956 bp->dcbx_enabled = dcbx_enabled; in bnx2x_dcbx_set_state()
958 bp->dcb_state = false; in bnx2x_dcbx_set_state()
959 bp->dcbx_enabled = BNX2X_DCBX_ENABLED_INVALID; in bnx2x_dcbx_set_state()
969 void bnx2x_dcbx_init_params(struct bnx2x *bp) in bnx2x_dcbx_init_params() argument
971 bp->dcbx_config_params.admin_dcbx_version = 0x0; /* 0 - CEE; 1 - IEEE */ in bnx2x_dcbx_init_params()
972 bp->dcbx_config_params.admin_ets_willing = 1; in bnx2x_dcbx_init_params()
973 bp->dcbx_config_params.admin_pfc_willing = 1; in bnx2x_dcbx_init_params()
974 bp->dcbx_config_params.overwrite_settings = 1; in bnx2x_dcbx_init_params()
975 bp->dcbx_config_params.admin_ets_enable = 1; in bnx2x_dcbx_init_params()
976 bp->dcbx_config_params.admin_pfc_enable = 1; in bnx2x_dcbx_init_params()
977 bp->dcbx_config_params.admin_tc_supported_tx_enable = 1; in bnx2x_dcbx_init_params()
978 bp->dcbx_config_params.admin_ets_configuration_tx_enable = 1; in bnx2x_dcbx_init_params()
979 bp->dcbx_config_params.admin_pfc_tx_enable = 1; in bnx2x_dcbx_init_params()
980 bp->dcbx_config_params.admin_application_priority_tx_enable = 1; in bnx2x_dcbx_init_params()
981 bp->dcbx_config_params.admin_ets_reco_valid = 1; in bnx2x_dcbx_init_params()
982 bp->dcbx_config_params.admin_app_priority_willing = 1; in bnx2x_dcbx_init_params()
983 bp->dcbx_config_params.admin_configuration_bw_precentage[0] = 100; in bnx2x_dcbx_init_params()
984 bp->dcbx_config_params.admin_configuration_bw_precentage[1] = 0; in bnx2x_dcbx_init_params()
985 bp->dcbx_config_params.admin_configuration_bw_precentage[2] = 0; in bnx2x_dcbx_init_params()
986 bp->dcbx_config_params.admin_configuration_bw_precentage[3] = 0; in bnx2x_dcbx_init_params()
987 bp->dcbx_config_params.admin_configuration_bw_precentage[4] = 0; in bnx2x_dcbx_init_params()
988 bp->dcbx_config_params.admin_configuration_bw_precentage[5] = 0; in bnx2x_dcbx_init_params()
989 bp->dcbx_config_params.admin_configuration_bw_precentage[6] = 0; in bnx2x_dcbx_init_params()
990 bp->dcbx_config_params.admin_configuration_bw_precentage[7] = 0; in bnx2x_dcbx_init_params()
991 bp->dcbx_config_params.admin_configuration_ets_pg[0] = 0; in bnx2x_dcbx_init_params()
992 bp->dcbx_config_params.admin_configuration_ets_pg[1] = 0; in bnx2x_dcbx_init_params()
993 bp->dcbx_config_params.admin_configuration_ets_pg[2] = 0; in bnx2x_dcbx_init_params()
994 bp->dcbx_config_params.admin_configuration_ets_pg[3] = 0; in bnx2x_dcbx_init_params()
995 bp->dcbx_config_params.admin_configuration_ets_pg[4] = 0; in bnx2x_dcbx_init_params()
996 bp->dcbx_config_params.admin_configuration_ets_pg[5] = 0; in bnx2x_dcbx_init_params()
997 bp->dcbx_config_params.admin_configuration_ets_pg[6] = 0; in bnx2x_dcbx_init_params()
998 bp->dcbx_config_params.admin_configuration_ets_pg[7] = 0; in bnx2x_dcbx_init_params()
999 bp->dcbx_config_params.admin_recommendation_bw_precentage[0] = 100; in bnx2x_dcbx_init_params()
1000 bp->dcbx_config_params.admin_recommendation_bw_precentage[1] = 0; in bnx2x_dcbx_init_params()
1001 bp->dcbx_config_params.admin_recommendation_bw_precentage[2] = 0; in bnx2x_dcbx_init_params()
1002 bp->dcbx_config_params.admin_recommendation_bw_precentage[3] = 0; in bnx2x_dcbx_init_params()
1003 bp->dcbx_config_params.admin_recommendation_bw_precentage[4] = 0; in bnx2x_dcbx_init_params()
1004 bp->dcbx_config_params.admin_recommendation_bw_precentage[5] = 0; in bnx2x_dcbx_init_params()
1005 bp->dcbx_config_params.admin_recommendation_bw_precentage[6] = 0; in bnx2x_dcbx_init_params()
1006 bp->dcbx_config_params.admin_recommendation_bw_precentage[7] = 0; in bnx2x_dcbx_init_params()
1007 bp->dcbx_config_params.admin_recommendation_ets_pg[0] = 0; in bnx2x_dcbx_init_params()
1008 bp->dcbx_config_params.admin_recommendation_ets_pg[1] = 1; in bnx2x_dcbx_init_params()
1009 bp->dcbx_config_params.admin_recommendation_ets_pg[2] = 2; in bnx2x_dcbx_init_params()
1010 bp->dcbx_config_params.admin_recommendation_ets_pg[3] = 3; in bnx2x_dcbx_init_params()
1011 bp->dcbx_config_params.admin_recommendation_ets_pg[4] = 4; in bnx2x_dcbx_init_params()
1012 bp->dcbx_config_params.admin_recommendation_ets_pg[5] = 5; in bnx2x_dcbx_init_params()
1013 bp->dcbx_config_params.admin_recommendation_ets_pg[6] = 6; in bnx2x_dcbx_init_params()
1014 bp->dcbx_config_params.admin_recommendation_ets_pg[7] = 7; in bnx2x_dcbx_init_params()
1015 bp->dcbx_config_params.admin_pfc_bitmap = 0x0; in bnx2x_dcbx_init_params()
1016 bp->dcbx_config_params.admin_priority_app_table[0].valid = 0; in bnx2x_dcbx_init_params()
1017 bp->dcbx_config_params.admin_priority_app_table[1].valid = 0; in bnx2x_dcbx_init_params()
1018 bp->dcbx_config_params.admin_priority_app_table[2].valid = 0; in bnx2x_dcbx_init_params()
1019 bp->dcbx_config_params.admin_priority_app_table[3].valid = 0; in bnx2x_dcbx_init_params()
1020 bp->dcbx_config_params.admin_default_priority = 0; in bnx2x_dcbx_init_params()
1023 void bnx2x_dcbx_init(struct bnx2x *bp, bool update_shmem) in bnx2x_dcbx_init() argument
1028 if ((!bp->port.pmf) && (!(bp->flags & BC_SUPPORTS_DCBX_MSG_NON_PMF))) in bnx2x_dcbx_init()
1031 if (bp->dcbx_enabled <= 0) in bnx2x_dcbx_init()
1040 bp->dcb_state, bp->port.pmf); in bnx2x_dcbx_init()
1042 if (bp->dcb_state == BNX2X_DCB_STATE_ON && in bnx2x_dcbx_init()
1043 SHMEM2_HAS(bp, dcbx_lldp_params_offset)) { in bnx2x_dcbx_init()
1045 SHMEM2_RD(bp, dcbx_lldp_params_offset); in bnx2x_dcbx_init()
1050 bnx2x_update_drv_flags(bp, 1 << DRV_FLAGS_DCB_CONFIGURED, 0); in bnx2x_dcbx_init()
1056 bnx2x_acquire_hw_lock(bp, in bnx2x_dcbx_init()
1059 bnx2x_dcbx_admin_mib_updated_params(bp, in bnx2x_dcbx_init()
1063 bnx2x_fw_command(bp, in bnx2x_dcbx_init()
1068 bnx2x_release_hw_lock(bp, in bnx2x_dcbx_init()
1074 bnx2x_dcbx_print_cos_params(struct bnx2x *bp, in bnx2x_dcbx_print_cos_params() argument
1084 bp->dcbx_port_params.pfc.priority_non_pauseable_mask); in bnx2x_dcbx_print_cos_params()
1086 for (cos = 0 ; cos < bp->dcbx_port_params.ets.num_of_cos ; cos++) { in bnx2x_dcbx_print_cos_params()
1089 cos, bp->dcbx_port_params.ets.cos_params[cos].pri_bitmask); in bnx2x_dcbx_print_cos_params()
1093 cos, bp->dcbx_port_params.ets.cos_params[cos].bw_tbl); in bnx2x_dcbx_print_cos_params()
1097 cos, bp->dcbx_port_params.ets.cos_params[cos].strict); in bnx2x_dcbx_print_cos_params()
1101 cos, bp->dcbx_port_params.ets.cos_params[cos].pauseable); in bnx2x_dcbx_print_cos_params()
1116 static void bnx2x_dcbx_get_num_pg_traf_type(struct bnx2x *bp, in bnx2x_dcbx_get_num_pg_traf_type() argument
1122 u32 *ttp = bp->dcbx_port_params.app.traffic_type_priority; in bnx2x_dcbx_get_num_pg_traf_type()
1163 static void bnx2x_dcbx_ets_disabled_entry_data(struct bnx2x *bp, in bnx2x_dcbx_ets_disabled_entry_data() argument
1169 IS_DCBX_PFC_PRI_ONLY_PAUSE(bp, pri_join_mask); in bnx2x_dcbx_ets_disabled_entry_data()
1175 static inline void bnx2x_dcbx_add_to_cos_bw(struct bnx2x *bp, in bnx2x_dcbx_add_to_cos_bw() argument
1185 static void bnx2x_dcbx_separate_pauseable_from_non(struct bnx2x *bp, in bnx2x_dcbx_separate_pauseable_from_non() argument
1201 pri_tested = 1 << bp->dcbx_port_params. in bnx2x_dcbx_separate_pauseable_from_non()
1204 if (pri_tested & DCBX_PFC_PRI_NON_PAUSE_MASK(bp)) { in bnx2x_dcbx_separate_pauseable_from_non()
1211 pg_entry = (u8)pg_pri_orginal_spread[bp->dcbx_port_params. in bnx2x_dcbx_separate_pauseable_from_non()
1215 bnx2x_dcbx_add_to_cos_bw(bp, &cos_data->data[entry], in bnx2x_dcbx_separate_pauseable_from_non()
1233 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
1242 u32 *ttp = bp->dcbx_port_params.app.traffic_type_priority; in bnx2x_dcbx_2cos_limit_cee_single_pg_to_cos_params()
1245 bnx2x_dcbx_ets_disabled_entry_data(bp, cos_data, pri_join_mask); in bnx2x_dcbx_2cos_limit_cee_single_pg_to_cos_params()
1254 if (IS_DCBX_PFC_PRI_MIX_PAUSE(bp, pri_join_mask)) { in bnx2x_dcbx_2cos_limit_cee_single_pg_to_cos_params()
1266 if (POWER_OF_2(DCBX_PFC_PRI_GET_PAUSE(bp, in bnx2x_dcbx_2cos_limit_cee_single_pg_to_cos_params()
1276 } else if (IS_DCBX_PFC_PRI_ONLY_PAUSE(bp, pri_join_mask)) { in bnx2x_dcbx_2cos_limit_cee_single_pg_to_cos_params()
1300 bnx2x_dcbx_ets_disabled_entry_data(bp, in bnx2x_dcbx_2cos_limit_cee_single_pg_to_cos_params()
1304 if (IS_DCBX_PFC_PRI_MIX_PAUSE(bp, pri_join_mask)) { in bnx2x_dcbx_2cos_limit_cee_single_pg_to_cos_params()
1310 if (DCBX_PFC_PRI_GET_PAUSE(bp, pri_join_mask) > in bnx2x_dcbx_2cos_limit_cee_single_pg_to_cos_params()
1311 DCBX_PFC_PRI_GET_NON_PAUSE(bp, pri_join_mask)) { in bnx2x_dcbx_2cos_limit_cee_single_pg_to_cos_params()
1336 IS_DCBX_PFC_PRI_ONLY_PAUSE(bp, pri_join_mask); in bnx2x_dcbx_2cos_limit_cee_single_pg_to_cos_params()
1339 pri_tested = 1 << bp->dcbx_port_params. in bnx2x_dcbx_2cos_limit_cee_single_pg_to_cos_params()
1367 struct bnx2x *bp, in bnx2x_dcbx_2cos_limit_cee_two_pg_to_cos_params() argument
1382 if (IS_DCBX_PFC_PRI_MIX_PAUSE(bp, pri_join_mask)) { in bnx2x_dcbx_2cos_limit_cee_two_pg_to_cos_params()
1383 if (IS_DCBX_PFC_PRI_MIX_PAUSE(bp, in bnx2x_dcbx_2cos_limit_cee_two_pg_to_cos_params()
1385 IS_DCBX_PFC_PRI_MIX_PAUSE(bp, in bnx2x_dcbx_2cos_limit_cee_two_pg_to_cos_params()
1390 bnx2x_dcbx_separate_pauseable_from_non(bp, cos_data, in bnx2x_dcbx_2cos_limit_cee_two_pg_to_cos_params()
1392 bp->dcbx_port_params.ets.enabled = false; in bnx2x_dcbx_2cos_limit_cee_two_pg_to_cos_params()
1400 if (IS_DCBX_PFC_PRI_ONLY_PAUSE(bp, in bnx2x_dcbx_2cos_limit_cee_two_pg_to_cos_params()
1422 IS_DCBX_PFC_PRI_ONLY_PAUSE(bp, pri_join_mask); in bnx2x_dcbx_2cos_limit_cee_two_pg_to_cos_params()
1443 struct bnx2x *bp, in bnx2x_dcbx_join_pgs() argument
1494 struct bnx2x *bp, in bnx2x_dcbx_2cos_limit_cee_three_pg_to_cos_params() argument
1514 if (IS_DCBX_PFC_PRI_MIX_PAUSE(bp, pri_join_mask)) in bnx2x_dcbx_2cos_limit_cee_three_pg_to_cos_params()
1515 bnx2x_dcbx_separate_pauseable_from_non(bp, in bnx2x_dcbx_2cos_limit_cee_three_pg_to_cos_params()
1536 IS_DCBX_PFC_PRI_ONLY_PAUSE(bp, pri_join_mask); in bnx2x_dcbx_2cos_limit_cee_three_pg_to_cos_params()
1539 pri_tested = 1 << bp->dcbx_port_params. in bnx2x_dcbx_2cos_limit_cee_three_pg_to_cos_params()
1541 pg_entry = (u8)pg_pri_orginal_spread[bp-> in bnx2x_dcbx_2cos_limit_cee_three_pg_to_cos_params()
1555 bnx2x_dcbx_add_to_cos_bw(bp, in bnx2x_dcbx_2cos_limit_cee_three_pg_to_cos_params()
1572 static void bnx2x_dcbx_2cos_limit_cee_fill_cos_params(struct bnx2x *bp, in bnx2x_dcbx_2cos_limit_cee_fill_cos_params() argument
1586 bp, in bnx2x_dcbx_2cos_limit_cee_fill_cos_params()
1594 bp, in bnx2x_dcbx_2cos_limit_cee_fill_cos_params()
1605 bp, in bnx2x_dcbx_2cos_limit_cee_fill_cos_params()
1615 bnx2x_dcbx_ets_disabled_entry_data(bp, in bnx2x_dcbx_2cos_limit_cee_fill_cos_params()
1620 static int bnx2x_dcbx_spread_strict_pri(struct bnx2x *bp, in bnx2x_dcbx_spread_strict_pri() argument
1641 data->pausable = DCBX_IS_PFC_PRI_SOME_PAUSE(bp, in bnx2x_dcbx_spread_strict_pri()
1649 data->pausable = DCBX_IS_PFC_PRI_SOME_PAUSE(bp, in bnx2x_dcbx_spread_strict_pri()
1669 static u8 bnx2x_dcbx_cee_fill_strict_pri(struct bnx2x *bp, in bnx2x_dcbx_cee_fill_strict_pri() argument
1675 if (bnx2x_dcbx_spread_strict_pri(bp, cos_data, entry, in bnx2x_dcbx_cee_fill_strict_pri()
1684 data->pausable = DCBX_IS_PFC_PRI_SOME_PAUSE(bp, in bnx2x_dcbx_cee_fill_strict_pri()
1692 static void bnx2x_dcbx_cee_fill_cos_params(struct bnx2x *bp, in bnx2x_dcbx_cee_fill_cos_params() argument
1709 if (bnx2x_dcbx_join_pgs(bp, ets, help_data, in bnx2x_dcbx_cee_fill_cos_params()
1712 bnx2x_dcbx_ets_disabled_entry_data(bp, cos_data, in bnx2x_dcbx_cee_fill_cos_params()
1727 data->pausable = DCBX_IS_PFC_PRI_SOME_PAUSE(bp, in bnx2x_dcbx_cee_fill_cos_params()
1741 entry += bnx2x_dcbx_cee_fill_strict_pri(bp, cos_data, in bnx2x_dcbx_cee_fill_cos_params()
1749 static void bnx2x_dcbx_fill_cos_params(struct bnx2x *bp, in bnx2x_dcbx_fill_cos_params() argument
1780 if (CHIP_IS_E3B0(bp)) in bnx2x_dcbx_fill_cos_params()
1781 bnx2x_dcbx_cee_fill_cos_params(bp, help_data, ets, in bnx2x_dcbx_fill_cos_params()
1784 bnx2x_dcbx_2cos_limit_cee_fill_cos_params(bp, in bnx2x_dcbx_fill_cos_params()
1793 &bp->dcbx_port_params.ets.cos_params[i]; in bnx2x_dcbx_fill_cos_params()
1806 if (CHIP_IS_E2(bp) || CHIP_IS_E3A0(bp)) { in bnx2x_dcbx_fill_cos_params()
1809 DCBX_PFC_PRI_GET_NON_PAUSE(bp, in bnx2x_dcbx_fill_cos_params()
1815 DCBX_PFC_PRI_GET_PAUSE(bp, in bnx2x_dcbx_fill_cos_params()
1831 bp->dcbx_port_params.ets.num_of_cos = cos_data.num_of_cos ; in bnx2x_dcbx_fill_cos_params()
1834 static void bnx2x_dcbx_get_ets_pri_pg_tbl(struct bnx2x *bp, in bnx2x_dcbx_get_ets_pri_pg_tbl() argument
1848 static void bnx2x_dcbx_fw_struct(struct bnx2x *bp, in bnx2x_dcbx_fw_struct() argument
1854 u32 *ttp = bp->dcbx_port_params.app.traffic_type_priority; in bnx2x_dcbx_fw_struct()
1855 int mfw_configured = SHMEM2_HAS(bp, drv_flags) && in bnx2x_dcbx_fw_struct()
1856 GET_FLAGS(SHMEM2_RD(bp, drv_flags), in bnx2x_dcbx_fw_struct()
1862 if ((bp->dcbx_error & DCBX_REMOTE_MIB_ERROR) && !mfw_configured) in bnx2x_dcbx_fw_struct()
1869 pfc_fw_cfg->dcb_version = ++bp->dcb_version; in bnx2x_dcbx_fw_struct()
1879 for (cos = 0; cos < bp->dcbx_port_params.ets.num_of_cos; cos++) in bnx2x_dcbx_fw_struct()
1880 if (bp->dcbx_port_params.ets.cos_params[cos]. in bnx2x_dcbx_fw_struct()
1890 bnx2x_dcbx_print_cos_params(bp, pfc_fw_cfg); in bnx2x_dcbx_fw_struct()
1893 void bnx2x_dcbx_pmf_update(struct bnx2x *bp) in bnx2x_dcbx_pmf_update() argument
1898 if (SHMEM2_HAS(bp, drv_flags) && in bnx2x_dcbx_pmf_update()
1899 GET_FLAGS(SHMEM2_RD(bp, drv_flags), 1 << DRV_FLAGS_DCB_CONFIGURED)) { in bnx2x_dcbx_pmf_update()
1901 if (bnx2x_dcbx_read_shmem_neg_results(bp)) in bnx2x_dcbx_pmf_update()
1904 bnx2x_dump_dcbx_drv_param(bp, &bp->dcbx_local_feat, in bnx2x_dcbx_pmf_update()
1905 bp->dcbx_error); in bnx2x_dcbx_pmf_update()
1906 bnx2x_get_dcbx_drv_param(bp, &bp->dcbx_local_feat, in bnx2x_dcbx_pmf_update()
1907 bp->dcbx_error); in bnx2x_dcbx_pmf_update()
1912 bnx2x_dcbnl_update_applist(bp, false); in bnx2x_dcbx_pmf_update()
1916 dcbnl_cee_notify(bp->dev, RTM_GETDCB, DCB_CMD_CEE_GET, 0, 0); in bnx2x_dcbx_pmf_update()
1922 bnx2x_dcbx_update_tc_mapping(bp); in bnx2x_dcbx_pmf_update()
1932 static inline bool bnx2x_dcbnl_set_valid(struct bnx2x *bp) in bnx2x_dcbnl_set_valid() argument
1937 return bp->dcb_state && bp->dcbx_mode_uset; in bnx2x_dcbnl_set_valid()
1942 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_get_state() local
1943 DP(BNX2X_MSG_DCB, "state = %d\n", bp->dcb_state); in bnx2x_dcbnl_get_state()
1944 return bp->dcb_state; in bnx2x_dcbnl_get_state()
1949 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_set_state() local
1953 if (state && ((bp->dcbx_enabled == BNX2X_DCBX_ENABLED_OFF) || in bnx2x_dcbnl_set_state()
1954 (bp->dcbx_enabled == BNX2X_DCBX_ENABLED_INVALID))) { in bnx2x_dcbnl_set_state()
1959 bnx2x_dcbx_set_state(bp, (state ? true : false), bp->dcbx_enabled); in bnx2x_dcbnl_set_state()
1966 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_get_perm_hw_addr() local
1972 if (CNIC_LOADED(bp)) in bnx2x_dcbnl_get_perm_hw_addr()
1974 memcpy(perm_addr+netdev->addr_len, bp->fip_mac, in bnx2x_dcbnl_get_perm_hw_addr()
1982 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_set_pg_tccfg_tx() local
1985 if (!bnx2x_dcbnl_set_valid(bp) || prio >= DCBX_MAX_NUM_PRI_PG_ENTRIES) in bnx2x_dcbnl_set_pg_tccfg_tx()
2001 bp->dcbx_config_params.admin_configuration_ets_pg[prio] = pgid; in bnx2x_dcbnl_set_pg_tccfg_tx()
2002 bp->dcbx_config_params.admin_ets_configuration_tx_enable = 1; in bnx2x_dcbnl_set_pg_tccfg_tx()
2008 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_set_pg_bwgcfg_tx() local
2011 if (!bnx2x_dcbnl_set_valid(bp) || pgid >= DCBX_MAX_NUM_PG_BW_ENTRIES) in bnx2x_dcbnl_set_pg_bwgcfg_tx()
2014 bp->dcbx_config_params.admin_configuration_bw_precentage[pgid] = bw_pct; in bnx2x_dcbnl_set_pg_bwgcfg_tx()
2015 bp->dcbx_config_params.admin_ets_configuration_tx_enable = 1; in bnx2x_dcbnl_set_pg_bwgcfg_tx()
2022 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_set_pg_tccfg_rx() local
2029 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_set_pg_bwgcfg_rx() local
2037 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_get_pg_tccfg_tx() local
2054 if (!bp->dcb_state || prio >= DCBX_MAX_NUM_PRI_PG_ENTRIES) in bnx2x_dcbnl_get_pg_tccfg_tx()
2057 *pgid = DCBX_PRI_PG_GET(bp->dcbx_local_feat.ets.pri_pg_tbl, prio); in bnx2x_dcbnl_get_pg_tccfg_tx()
2063 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_get_pg_bwgcfg_tx() local
2068 if (!bp->dcb_state || pgid >= DCBX_MAX_NUM_PG_BW_ENTRIES) in bnx2x_dcbnl_get_pg_bwgcfg_tx()
2071 *bw_pct = DCBX_PG_BW_GET(bp->dcbx_local_feat.ets.pg_bw_tbl, pgid); in bnx2x_dcbnl_get_pg_bwgcfg_tx()
2078 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_get_pg_tccfg_rx() local
2087 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_get_pg_bwgcfg_rx() local
2096 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_set_pfc_cfg() local
2099 if (!bnx2x_dcbnl_set_valid(bp) || prio >= MAX_PFC_PRIORITIES) in bnx2x_dcbnl_set_pfc_cfg()
2103 bp->dcbx_config_params.admin_pfc_bitmap |= (1 << prio); in bnx2x_dcbnl_set_pfc_cfg()
2104 bp->dcbx_config_params.admin_pfc_tx_enable = 1; in bnx2x_dcbnl_set_pfc_cfg()
2106 bp->dcbx_config_params.admin_pfc_bitmap &= ~(1 << prio); in bnx2x_dcbnl_set_pfc_cfg()
2113 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_get_pfc_cfg() local
2118 if (!bp->dcb_state || prio >= MAX_PFC_PRIORITIES) in bnx2x_dcbnl_get_pfc_cfg()
2121 *setting = (bp->dcbx_local_feat.pfc.pri_en_bitmap >> prio) & 0x1; in bnx2x_dcbnl_get_pfc_cfg()
2126 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_set_all() local
2130 if (!bnx2x_dcbnl_set_valid(bp)) in bnx2x_dcbnl_set_all()
2133 if (bp->recovery_state != BNX2X_RECOVERY_DONE) { in bnx2x_dcbnl_set_all()
2134 netdev_err(bp->dev, in bnx2x_dcbnl_set_all()
2138 if (netif_running(bp->dev)) { in bnx2x_dcbnl_set_all()
2139 bnx2x_update_drv_flags(bp, in bnx2x_dcbnl_set_all()
2142 bnx2x_dcbx_init(bp, true); in bnx2x_dcbnl_set_all()
2151 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_get_cap() local
2154 if (bp->dcb_state) { in bnx2x_dcbnl_get_cap()
2196 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_get_numtcs() local
2201 if (bp->dcb_state) { in bnx2x_dcbnl_get_numtcs()
2204 *num = CHIP_IS_E3B0(bp) ? DCBX_COS_MAX_NUM_E3B0 : in bnx2x_dcbnl_get_numtcs()
2208 *num = CHIP_IS_E3B0(bp) ? DCBX_COS_MAX_NUM_E3B0 : in bnx2x_dcbnl_get_numtcs()
2226 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_set_numtcs() local
2233 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_get_pfc_state() local
2234 DP(BNX2X_MSG_DCB, "state = %d\n", bp->dcbx_local_feat.pfc.enabled); in bnx2x_dcbnl_get_pfc_state()
2236 if (!bp->dcb_state) in bnx2x_dcbnl_get_pfc_state()
2239 return bp->dcbx_local_feat.pfc.enabled; in bnx2x_dcbnl_get_pfc_state()
2244 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_set_pfc_state() local
2247 if (!bnx2x_dcbnl_set_valid(bp)) in bnx2x_dcbnl_set_pfc_state()
2250 bp->dcbx_config_params.admin_pfc_tx_enable = in bnx2x_dcbnl_set_pfc_state()
2251 bp->dcbx_config_params.admin_pfc_enable = (state ? 1 : 0); in bnx2x_dcbnl_set_pfc_state()
2299 static int bnx2x_set_admin_app_up(struct bnx2x *bp, u8 idtype, u16 idval, u8 up) in bnx2x_set_admin_app_up() argument
2306 &bp->dcbx_config_params.admin_priority_app_table[i]; in bnx2x_set_admin_app_up()
2315 bp->dcbx_config_params. in bnx2x_set_admin_app_up()
2320 &bp->dcbx_config_params.admin_priority_app_table[ff], in bnx2x_set_admin_app_up()
2330 bp->dcbx_config_params.admin_application_priority_tx_enable = 1; in bnx2x_set_admin_app_up()
2338 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_set_app_up() local
2343 if (!bnx2x_dcbnl_set_valid(bp)) { in bnx2x_dcbnl_set_app_up()
2357 return bnx2x_set_admin_app_up(bp, idtype, idval, up); in bnx2x_dcbnl_set_app_up()
2362 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_get_dcbx() local
2367 if (bp->dcbx_enabled == BNX2X_DCBX_ENABLED_ON_NEG_OFF) in bnx2x_dcbnl_get_dcbx()
2375 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_set_dcbx() local
2386 if (bp->dcb_state != BNX2X_DCB_STATE_ON) { in bnx2x_dcbnl_set_dcbx()
2392 bp->dcbx_enabled = BNX2X_DCBX_ENABLED_ON_NEG_OFF; in bnx2x_dcbnl_set_dcbx()
2394 bp->dcbx_enabled = BNX2X_DCBX_ENABLED_ON_NEG_ON; in bnx2x_dcbnl_set_dcbx()
2396 bp->dcbx_mode_uset = true; in bnx2x_dcbnl_set_dcbx()
2403 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_get_featcfg() local
2408 if (bp->dcb_state) { in bnx2x_dcbnl_get_featcfg()
2412 if (bp->dcbx_local_feat.ets.enabled) in bnx2x_dcbnl_get_featcfg()
2414 if (bp->dcbx_error & (DCBX_LOCAL_ETS_ERROR | in bnx2x_dcbnl_get_featcfg()
2419 if (bp->dcbx_local_feat.pfc.enabled) in bnx2x_dcbnl_get_featcfg()
2421 if (bp->dcbx_error & (DCBX_LOCAL_PFC_ERROR | in bnx2x_dcbnl_get_featcfg()
2427 if (bp->dcbx_local_feat.app.enabled) in bnx2x_dcbnl_get_featcfg()
2429 if (bp->dcbx_error & (DCBX_LOCAL_APP_ERROR | in bnx2x_dcbnl_get_featcfg()
2450 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_dcbnl_set_featcfg() local
2456 if (bnx2x_dcbnl_set_valid(bp)) { in bnx2x_dcbnl_set_featcfg()
2459 bp->dcbx_config_params.admin_ets_enable = in bnx2x_dcbnl_set_featcfg()
2461 bp->dcbx_config_params.admin_ets_willing = in bnx2x_dcbnl_set_featcfg()
2465 bp->dcbx_config_params.admin_pfc_enable = in bnx2x_dcbnl_set_featcfg()
2467 bp->dcbx_config_params.admin_pfc_willing = in bnx2x_dcbnl_set_featcfg()
2472 bp->dcbx_config_params.admin_app_priority_willing = in bnx2x_dcbnl_set_featcfg()
2492 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_peer_appinfo() local
2496 info->willing = (bp->dcbx_remote_flags & DCBX_APP_REM_WILLING) ?: 0; in bnx2x_peer_appinfo()
2497 info->error = (bp->dcbx_remote_flags & DCBX_APP_RX_ERROR) ?: 0; in bnx2x_peer_appinfo()
2501 if (bp->dcbx_remote_feat.app.app_pri_tbl[i].appBitfield & in bnx2x_peer_appinfo()
2511 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_peer_apptable() local
2517 &bp->dcbx_remote_feat.app.app_pri_tbl[i]; in bnx2x_peer_apptable()
2531 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_cee_peer_getpg() local
2533 pg->willing = (bp->dcbx_remote_flags & DCBX_ETS_REM_WILLING) ?: 0; in bnx2x_cee_peer_getpg()
2537 DCBX_PG_BW_GET(bp->dcbx_remote_feat.ets.pg_bw_tbl, i); in bnx2x_cee_peer_getpg()
2539 DCBX_PRI_PG_GET(bp->dcbx_remote_feat.ets.pri_pg_tbl, i); in bnx2x_cee_peer_getpg()
2547 struct bnx2x *bp = netdev_priv(netdev); in bnx2x_cee_peer_getpfc() local
2548 pfc->tcs_supported = bp->dcbx_remote_feat.pfc.pfc_caps; in bnx2x_cee_peer_getpfc()
2549 pfc->pfc_en = bp->dcbx_remote_feat.pfc.pri_en_bitmap; in bnx2x_cee_peer_getpfc()