Intel(R) Ethernet Controller I225-V linux5.4支持

我们新板卡使用了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;
	}

igc_phy_setup_autoneg中修改:

	if (phy->autoneg_mask & ADVERTISE_2500_FULL) {
		/* Read the MULTI GBT AN Control Register - reg 7.32 */
		ret_val = phy-&g

你可能感兴趣的:(嵌入式开发,linux,运维,服务器,c语言,驱动开发)