Lines Matching full:pfc
522 u32 pfc, struct qed_dcbx_params *p_params) in qed_dcbx_get_pfc_data() argument
526 p_params->pfc.willing = QED_MFW_GET_FIELD(pfc, DCBX_PFC_WILLING); in qed_dcbx_get_pfc_data()
527 p_params->pfc.max_tc = QED_MFW_GET_FIELD(pfc, DCBX_PFC_CAPS); in qed_dcbx_get_pfc_data()
528 p_params->pfc.enabled = QED_MFW_GET_FIELD(pfc, DCBX_PFC_ENABLED); in qed_dcbx_get_pfc_data()
529 pfc_map = QED_MFW_GET_FIELD(pfc, DCBX_PFC_PRI_EN_BITMAP); in qed_dcbx_get_pfc_data()
530 p_params->pfc.prio[0] = !!(pfc_map & DCBX_PFC_PRI_EN_BITMAP_PRI_0); in qed_dcbx_get_pfc_data()
531 p_params->pfc.prio[1] = !!(pfc_map & DCBX_PFC_PRI_EN_BITMAP_PRI_1); in qed_dcbx_get_pfc_data()
532 p_params->pfc.prio[2] = !!(pfc_map & DCBX_PFC_PRI_EN_BITMAP_PRI_2); in qed_dcbx_get_pfc_data()
533 p_params->pfc.prio[3] = !!(pfc_map & DCBX_PFC_PRI_EN_BITMAP_PRI_3); in qed_dcbx_get_pfc_data()
534 p_params->pfc.prio[4] = !!(pfc_map & DCBX_PFC_PRI_EN_BITMAP_PRI_4); in qed_dcbx_get_pfc_data()
535 p_params->pfc.prio[5] = !!(pfc_map & DCBX_PFC_PRI_EN_BITMAP_PRI_5); in qed_dcbx_get_pfc_data()
536 p_params->pfc.prio[6] = !!(pfc_map & DCBX_PFC_PRI_EN_BITMAP_PRI_6); in qed_dcbx_get_pfc_data()
537 p_params->pfc.prio[7] = !!(pfc_map & DCBX_PFC_PRI_EN_BITMAP_PRI_7); in qed_dcbx_get_pfc_data()
540 "PFC params: willing %d, pfc_bitmap %u max_tc = %u enabled = %d\n", in qed_dcbx_get_pfc_data()
541 p_params->pfc.willing, pfc_map, p_params->pfc.max_tc, in qed_dcbx_get_pfc_data()
542 p_params->pfc.enabled); in qed_dcbx_get_pfc_data()
597 u32 pfc, struct qed_dcbx_params *p_params, bool ieee) in qed_dcbx_get_common_params() argument
601 qed_dcbx_get_pfc_data(p_hwfn, pfc, p_params); in qed_dcbx_get_common_params()
612 p_feat->pfc, ¶ms->local.params, false); in qed_dcbx_get_local_params()
624 p_feat->pfc, ¶ms->remote.params, false); in qed_dcbx_get_remote_params()
675 p_feat->pfc, ¶ms->operational.params, in qed_dcbx_get_operational_params()
901 * honor PFC. in qed_dcbx_mib_update_event()
1020 u32 *pfc, struct qed_dcbx_params *p_params) in qed_dcbx_set_pfc_data() argument
1025 *pfc &= ~DCBX_PFC_ERROR_MASK; in qed_dcbx_set_pfc_data()
1027 if (p_params->pfc.willing) in qed_dcbx_set_pfc_data()
1028 *pfc |= DCBX_PFC_WILLING_MASK; in qed_dcbx_set_pfc_data()
1030 *pfc &= ~DCBX_PFC_WILLING_MASK; in qed_dcbx_set_pfc_data()
1032 if (p_params->pfc.enabled) in qed_dcbx_set_pfc_data()
1033 *pfc |= DCBX_PFC_ENABLED_MASK; in qed_dcbx_set_pfc_data()
1035 *pfc &= ~DCBX_PFC_ENABLED_MASK; in qed_dcbx_set_pfc_data()
1037 *pfc &= ~DCBX_PFC_CAPS_MASK; in qed_dcbx_set_pfc_data()
1038 *pfc |= (u32)p_params->pfc.max_tc << DCBX_PFC_CAPS_SHIFT; in qed_dcbx_set_pfc_data()
1041 if (p_params->pfc.prio[i]) in qed_dcbx_set_pfc_data()
1044 *pfc &= ~DCBX_PFC_PRI_EN_BITMAP_MASK; in qed_dcbx_set_pfc_data()
1045 *pfc |= (pfc_map << DCBX_PFC_PRI_EN_BITMAP_SHIFT); in qed_dcbx_set_pfc_data()
1047 DP_VERBOSE(p_hwfn, QED_MSG_DCB, "pfc = 0x%x\n", *pfc); in qed_dcbx_set_pfc_data()
1189 qed_dcbx_set_pfc_data(p_hwfn, &local_admin->features.pfc, in qed_dcbx_set_local_params()
1421 *setting = dcbx_info->operational.params.pfc.prio[priority]; in qed_dcbnl_getpfccfg()
1446 dcbx_set.config.params.pfc.prio[priority] = !!setting; in qed_dcbnl_setpfccfg()
1510 *num = dcbx_info->operational.params.pfc.max_tc; in qed_dcbnl_getnumtcs()
1532 enabled = dcbx_info->operational.params.pfc.enabled; in qed_dcbnl_getpfcstate()
1533 DP_VERBOSE(hwfn, QED_MSG_DCB, "pfc state = %d\n", enabled); in qed_dcbnl_getpfcstate()
1681 dcbx_set.config.params.pfc.max_tc = num; in qed_dcbnl_setnumtcs()
1714 dcbx_set.config.params.pfc.enabled = !!state; in qed_dcbnl_setpfcstate()
1872 if (dcbx_info->operational.params.pfc.enabled) in qed_dcbnl_getfeatcfg()
1920 dcbx_set.config.params.pfc.enabled = enabled; in qed_dcbnl_setfeatcfg()
1921 dcbx_set.config.params.pfc.willing = willing; in qed_dcbnl_setfeatcfg()
1988 static int qed_dcbnl_cee_peer_getpfc(struct qed_dev *cdev, struct cee_pfc *pfc) in qed_dcbnl_cee_peer_getpfc() argument
1999 if (dcbx_info->remote.params.pfc.prio[i]) in qed_dcbnl_cee_peer_getpfc()
2000 pfc->pfc_en |= BIT(i); in qed_dcbnl_cee_peer_getpfc()
2002 pfc->tcs_supported = dcbx_info->remote.params.pfc.max_tc; in qed_dcbnl_cee_peer_getpfc()
2003 DP_VERBOSE(hwfn, QED_MSG_DCB, "pfc state = %d tcs_supported = %d\n", in qed_dcbnl_cee_peer_getpfc()
2004 pfc->pfc_en, pfc->tcs_supported); in qed_dcbnl_cee_peer_getpfc()
2033 struct ieee_pfc *pfc, bool remote) in qed_dcbnl_get_ieee_pfc() argument
2064 pfc->pfc_cap = params->pfc.max_tc; in qed_dcbnl_get_ieee_pfc()
2065 pfc->pfc_en = 0; in qed_dcbnl_get_ieee_pfc()
2067 if (params->pfc.prio[i]) in qed_dcbnl_get_ieee_pfc()
2068 pfc->pfc_en |= BIT(i); in qed_dcbnl_get_ieee_pfc()
2075 static int qed_dcbnl_ieee_getpfc(struct qed_dev *cdev, struct ieee_pfc *pfc) in qed_dcbnl_ieee_getpfc() argument
2077 return qed_dcbnl_get_ieee_pfc(cdev, pfc, false); in qed_dcbnl_ieee_getpfc()
2080 static int qed_dcbnl_ieee_setpfc(struct qed_dev *cdev, struct ieee_pfc *pfc) in qed_dcbnl_ieee_setpfc() argument
2107 dcbx_set.config.params.pfc.prio[i] = !!(pfc->pfc_en & BIT(i)); in qed_dcbnl_ieee_setpfc()
2109 dcbx_set.config.params.pfc.max_tc = pfc->pfc_cap; in qed_dcbnl_ieee_setpfc()
2224 qed_dcbnl_ieee_peer_getpfc(struct qed_dev *cdev, struct ieee_pfc *pfc) in qed_dcbnl_ieee_peer_getpfc() argument
2226 return qed_dcbnl_get_ieee_pfc(cdev, pfc, true); in qed_dcbnl_ieee_peer_getpfc()