Lines Matching refs:pfc
548 u32 pfc, struct qed_dcbx_params *p_params) in qed_dcbx_get_pfc_data() argument
552 p_params->pfc.willing = QED_MFW_GET_FIELD(pfc, DCBX_PFC_WILLING); in qed_dcbx_get_pfc_data()
553 p_params->pfc.max_tc = QED_MFW_GET_FIELD(pfc, DCBX_PFC_CAPS); in qed_dcbx_get_pfc_data()
554 p_params->pfc.enabled = QED_MFW_GET_FIELD(pfc, DCBX_PFC_ENABLED); in qed_dcbx_get_pfc_data()
555 pfc_map = QED_MFW_GET_FIELD(pfc, DCBX_PFC_PRI_EN_BITMAP); in qed_dcbx_get_pfc_data()
556 p_params->pfc.prio[0] = !!(pfc_map & DCBX_PFC_PRI_EN_BITMAP_PRI_0); in qed_dcbx_get_pfc_data()
557 p_params->pfc.prio[1] = !!(pfc_map & DCBX_PFC_PRI_EN_BITMAP_PRI_1); in qed_dcbx_get_pfc_data()
558 p_params->pfc.prio[2] = !!(pfc_map & DCBX_PFC_PRI_EN_BITMAP_PRI_2); in qed_dcbx_get_pfc_data()
559 p_params->pfc.prio[3] = !!(pfc_map & DCBX_PFC_PRI_EN_BITMAP_PRI_3); in qed_dcbx_get_pfc_data()
560 p_params->pfc.prio[4] = !!(pfc_map & DCBX_PFC_PRI_EN_BITMAP_PRI_4); in qed_dcbx_get_pfc_data()
561 p_params->pfc.prio[5] = !!(pfc_map & DCBX_PFC_PRI_EN_BITMAP_PRI_5); in qed_dcbx_get_pfc_data()
562 p_params->pfc.prio[6] = !!(pfc_map & DCBX_PFC_PRI_EN_BITMAP_PRI_6); in qed_dcbx_get_pfc_data()
563 p_params->pfc.prio[7] = !!(pfc_map & DCBX_PFC_PRI_EN_BITMAP_PRI_7); in qed_dcbx_get_pfc_data()
567 p_params->pfc.willing, pfc_map, p_params->pfc.max_tc, in qed_dcbx_get_pfc_data()
568 p_params->pfc.enabled); in qed_dcbx_get_pfc_data()
623 u32 pfc, struct qed_dcbx_params *p_params, bool ieee) in qed_dcbx_get_common_params() argument
627 qed_dcbx_get_pfc_data(p_hwfn, pfc, p_params); in qed_dcbx_get_common_params()
638 p_feat->pfc, ¶ms->local.params, false); in qed_dcbx_get_local_params()
650 p_feat->pfc, ¶ms->remote.params, false); in qed_dcbx_get_remote_params()
701 p_feat->pfc, ¶ms->operational.params, in qed_dcbx_get_operational_params()
1048 u32 *pfc, struct qed_dcbx_params *p_params) in qed_dcbx_set_pfc_data() argument
1053 *pfc &= ~DCBX_PFC_ERROR_MASK; in qed_dcbx_set_pfc_data()
1055 if (p_params->pfc.willing) in qed_dcbx_set_pfc_data()
1056 *pfc |= DCBX_PFC_WILLING_MASK; in qed_dcbx_set_pfc_data()
1058 *pfc &= ~DCBX_PFC_WILLING_MASK; in qed_dcbx_set_pfc_data()
1060 if (p_params->pfc.enabled) in qed_dcbx_set_pfc_data()
1061 *pfc |= DCBX_PFC_ENABLED_MASK; in qed_dcbx_set_pfc_data()
1063 *pfc &= ~DCBX_PFC_ENABLED_MASK; in qed_dcbx_set_pfc_data()
1065 *pfc &= ~DCBX_PFC_CAPS_MASK; in qed_dcbx_set_pfc_data()
1066 *pfc |= (u32)p_params->pfc.max_tc << DCBX_PFC_CAPS_SHIFT; in qed_dcbx_set_pfc_data()
1069 if (p_params->pfc.prio[i]) in qed_dcbx_set_pfc_data()
1072 *pfc &= ~DCBX_PFC_PRI_EN_BITMAP_MASK; in qed_dcbx_set_pfc_data()
1073 *pfc |= (pfc_map << DCBX_PFC_PRI_EN_BITMAP_SHIFT); in qed_dcbx_set_pfc_data()
1075 DP_VERBOSE(p_hwfn, QED_MSG_DCB, "pfc = 0x%x\n", *pfc); in qed_dcbx_set_pfc_data()
1218 qed_dcbx_set_pfc_data(p_hwfn, &local_admin->features.pfc, in qed_dcbx_set_local_params()
1448 *setting = dcbx_info->operational.params.pfc.prio[priority]; in qed_dcbnl_getpfccfg()
1473 dcbx_set.config.params.pfc.prio[priority] = !!setting; in qed_dcbnl_setpfccfg()
1537 *num = dcbx_info->operational.params.pfc.max_tc; in qed_dcbnl_getnumtcs()
1559 enabled = dcbx_info->operational.params.pfc.enabled; in qed_dcbnl_getpfcstate()
1708 dcbx_set.config.params.pfc.max_tc = num; in qed_dcbnl_setnumtcs()
1741 dcbx_set.config.params.pfc.enabled = !!state; in qed_dcbnl_setpfcstate()
1899 if (dcbx_info->operational.params.pfc.enabled) in qed_dcbnl_getfeatcfg()
1947 dcbx_set.config.params.pfc.enabled = enabled; in qed_dcbnl_setfeatcfg()
1948 dcbx_set.config.params.pfc.willing = willing; in qed_dcbnl_setfeatcfg()
2015 static int qed_dcbnl_cee_peer_getpfc(struct qed_dev *cdev, struct cee_pfc *pfc) in qed_dcbnl_cee_peer_getpfc() argument
2026 if (dcbx_info->remote.params.pfc.prio[i]) in qed_dcbnl_cee_peer_getpfc()
2027 pfc->pfc_en |= BIT(i); in qed_dcbnl_cee_peer_getpfc()
2029 pfc->tcs_supported = dcbx_info->remote.params.pfc.max_tc; in qed_dcbnl_cee_peer_getpfc()
2031 pfc->pfc_en, pfc->tcs_supported); in qed_dcbnl_cee_peer_getpfc()
2060 struct ieee_pfc *pfc, bool remote) in qed_dcbnl_get_ieee_pfc() argument
2091 pfc->pfc_cap = params->pfc.max_tc; in qed_dcbnl_get_ieee_pfc()
2092 pfc->pfc_en = 0; in qed_dcbnl_get_ieee_pfc()
2094 if (params->pfc.prio[i]) in qed_dcbnl_get_ieee_pfc()
2095 pfc->pfc_en |= BIT(i); in qed_dcbnl_get_ieee_pfc()
2102 static int qed_dcbnl_ieee_getpfc(struct qed_dev *cdev, struct ieee_pfc *pfc) in qed_dcbnl_ieee_getpfc() argument
2104 return qed_dcbnl_get_ieee_pfc(cdev, pfc, false); in qed_dcbnl_ieee_getpfc()
2107 static int qed_dcbnl_ieee_setpfc(struct qed_dev *cdev, struct ieee_pfc *pfc) in qed_dcbnl_ieee_setpfc() argument
2134 dcbx_set.config.params.pfc.prio[i] = !!(pfc->pfc_en & BIT(i)); in qed_dcbnl_ieee_setpfc()
2136 dcbx_set.config.params.pfc.max_tc = pfc->pfc_cap; in qed_dcbnl_ieee_setpfc()
2251 qed_dcbnl_ieee_peer_getpfc(struct qed_dev *cdev, struct ieee_pfc *pfc) in qed_dcbnl_ieee_peer_getpfc() argument
2253 return qed_dcbnl_get_ieee_pfc(cdev, pfc, true); in qed_dcbnl_ieee_peer_getpfc()