Re: [PATCH net-next v1 3/9] net: dsa: qca: ar9331: reorder MDIO write sequence

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Oleksij

Maybe add a short comment about why the order is important.

> -	ret = __ar9331_mdio_write(sbus, AR9331_SW_MDIO_PHY_MODE_REG, reg, val);
> +	ret = __ar9331_mdio_write(sbus, AR9331_SW_MDIO_PHY_MODE_REG, reg + 2,
> +				  val >> 16);
>  	if (ret < 0)
>  		goto error;
>  
> -	ret = __ar9331_mdio_write(sbus, AR9331_SW_MDIO_PHY_MODE_REG, reg + 2,
> -				  val >> 16);
> +	ret = __ar9331_mdio_write(sbus, AR9331_SW_MDIO_PHY_MODE_REG, reg, val);
>  	if (ret < 0)
>  		goto error;
>  
>  	return 0;
> +
>  error:
>  	dev_err_ratelimited(&sbus->dev, "Bus error. Failed to write register.\n");
>  	return ret;

With that:

Reviewed-by: Andrew Lunn <andrew@xxxxxxx>

    Andrew





> -- 
> 2.29.2
> 



[Index of Archives]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux