[PATCH 5/9] net/ngbe: optimize the PHY initialization process

Ferruh Yigit ferruh.yigit at intel.com
Tue Feb 8 18:39:31 CET 2022


On 2/8/2022 10:11 AM, Jiawen Wu wrote:
> Reduce the probability of PHY init failure, And add its error return.
> 

Patch is missing stable tag, is it intentional?
Or do you want patch not to be backported?

> Signed-off-by: Jiawen Wu <jiawenwu at trustnetic.com>

<...>

> @@ -234,17 +242,7 @@ s32 ngbe_reset_phy_rtl(struct ngbe_hw *hw)
>   	value |= RTL_BMCR_RESET;
>   	status = hw->phy.write_reg(hw, RTL_BMCR, RTL_DEV_ZERO, value);
>   
> -	for (i = 0; i < RTL_PHY_RST_WAIT_PERIOD; i++) {
> -		status = hw->phy.read_reg(hw, RTL_BMCR, RTL_DEV_ZERO, &value);
> -		if (!(value & RTL_BMCR_RESET))
> -			break;
> -		msleep(1);
> -	}
> -
> -	if (i == RTL_PHY_RST_WAIT_PERIOD) {
> -		DEBUGOUT("PHY reset polling failed to complete.\n");
> -		return NGBE_ERR_RESET_FAILED;
> -	}
> +	msec_delay(5);
>   

There are hardcoded delays added in this patch and other ones in this set,
I just want to remind that this can lead unexpected (and very hard to debug)
errors.


More information about the dev mailing list