[PATCH v6 08/17] net/r8169: add support for phy configuration
Ferruh Yigit
ferruh.yigit at amd.com
Mon Nov 11 01:16:32 CET 2024
On 11/8/2024 12:11 PM, Howard Wang wrote:
> This patch contains phy config, ephy config and so on.
>
> Signed-off-by: Howard Wang <howard_wang at realsil.com.cn>
>
<...>
> @@ -62,6 +62,12 @@ rtl_dev_start(struct rte_eth_dev *dev)
> struct rtl_hw *hw = &adapter->hw;
> int err;
>
> + rtl_powerup_pll(hw);
> +
> + rtl_hw_ephy_config(hw);
> +
> + rtl_hw_phy_config(hw);
> +
> rtl_hw_config(hw);
>
> /* Initialize transmission unit */
> @@ -74,6 +80,8 @@ rtl_dev_start(struct rte_eth_dev *dev)
> goto error;
> }
>
> + rtl_mdio_write(hw, 0x1F, 0x0000);
> +
>
It is very hard know what code like above does, which makes harder for
anyone to read and understand your code, can you please either create
macros for registers or comment as much as possible, so others can
improve/fix your code when required.
More information about the dev
mailing list