| 683 | } |
| 684 | |
| 685 | static 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 | |
| 713 | static void bnxt_free_prev_ring_stats(struct bnxt *bp) |
| 714 | { |
no test coverage detected