我们新板卡使用了Intel(R) Ethernet Controller I225-V网卡,使用的内核版本是linux-5.4.0,但是加载igc驱动后,报错 igc: probe of 0000:01:00.0 failed with error -2
分析igc驱动源码后,发现读出来的phy id是0x67C9DCC0,驱动源码中igc_init_phy_params_base函数发现,并不支持这个PHY ID,代码如下:
/* Verify phy id and set remaining function pointers */
switch (phy->id) {
case I225_I_PHY_ID:
phy->type = igc_phy_i225;
break;
default:
ret_val = -IGC_ERR_PHY;
goto out;
}
经过修改后
/* Verify phy id and set remaining function pointers */
switch (phy->id) {
case I225_I_PHY_ID:
phy->type = igc_phy_i225;
break;
default:
phy->type = igc_phy_i225;
break;
}