MCPcopy Create free account
hub / github.com/F-Stack/f-stack / bnxt_update_phy_setting

Function bnxt_update_phy_setting

dpdk/drivers/net/bnxt/bnxt_ethdev.c:685–711  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

683}
684
685static int bnxt_update_phy_setting(struct bnxt *bp)
686{
687 struct rte_eth_link new;
688 int rc;
689
690 rc = bnxt_get_hwrm_link_config(bp, &new);
691 if (rc) {
692 PMD_DRV_LOG(ERR, "Failed to get link settings\n");
693 return rc;
694 }
695
696 /*
697 * Device is not obliged link down in certain scenarios, even
698 * when forced. When FW does not allow any user other than BMC
699 * to shutdown the port, bnxt_get_hwrm_link_config() call always
700 * returns link up. Force phy update always in that case.
701 */
702 if (!new.link_status || bnxt_force_link_config(bp)) {
703 rc = bnxt_set_hwrm_link_config(bp, true);
704 if (rc) {
705 PMD_DRV_LOG(ERR, "Failed to update PHY settings\n");
706 return rc;
707 }
708 }
709
710 return rc;
711}
712
713static void bnxt_free_prev_ring_stats(struct bnxt *bp)
714{

Callers 1

bnxt_start_nicFunction · 0.85

Calls 3

bnxt_force_link_configFunction · 0.85

Tested by

no test coverage detected