git: c16cbd2e9162 - stable/13 - Default to always accepting the PHY that's present. Linux did something similar a while back, and there are devices in the wild that otherwise won't attach. This patch is temporary until the PHY code is further cleared up.

From: Alexander Motin <mav_at_FreeBSD.org>
Date: Sun, 15 May 2022 16:31:59 UTC
The branch stable/13 has been updated by mav:

URL: https://cgit.FreeBSD.org/src/commit/?id=c16cbd2e9162c33e9eee76653dccda7bd6ec2160

commit c16cbd2e9162c33e9eee76653dccda7bd6ec2160
Author:     Scott Long <scottl@FreeBSD.org>
AuthorDate: 2022-02-27 01:29:08 +0000
Commit:     Alexander Motin <mav@FreeBSD.org>
CommitDate: 2022-05-15 16:29:57 +0000

    Default to always accepting the PHY that's present.  Linux did
    something similar a while back, and there are devices in the wild
    that otherwise won't attach.  This patch is temporary until the
    PHY code is further cleared up.
    
    Obtained from: grehan
    
    (cherry picked from commit 6f3c0d2764f230444818a95009028861493c1594)
---
 sys/dev/igc/igc_i225.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sys/dev/igc/igc_i225.c b/sys/dev/igc/igc_i225.c
index 4c50daa16b79..95d7d1536184 100644
--- a/sys/dev/igc/igc_i225.c
+++ b/sys/dev/igc/igc_i225.c
@@ -172,14 +172,12 @@ static s32 igc_init_phy_params_i225(struct igc_hw *hw)
 	/* Verify phy id and set remaining function pointers */
 	switch (phy->id) {
 	case I225_I_PHY_ID:
+	default:
 		phy->type		= igc_phy_i225;
 		phy->ops.set_d0_lplu_state = igc_set_d0_lplu_state_i225;
 		phy->ops.set_d3_lplu_state = igc_set_d3_lplu_state_i225;
 		/* TODO - complete with GPY PHY information */
 		break;
-	default:
-		ret_val = -IGC_ERR_PHY;
-		goto out;
 	}
 
 out: