答复: [PATCH v6 05/17] net/r8169: add support for hw config

王颢 howard_wang at realsil.com.cn
Mon Nov 11 10:44:50 CET 2024


Dear Ferruh,

Before splitting the driver into multiple small patches, I had checked to ensure all functions were static, so there’s no need to worry about that.

Best Regards,
Howard Wang

-----邮件原件-----
发件人: Ferruh Yigit <ferruh.yigit at amd.com> 
发送时间: 2024年11月11日 8:15
收件人: 王颢 <howard_wang at realsil.com.cn>; dev at dpdk.org
抄送: pro_nic_dpdk at realtek.com
主题: Re: [PATCH v6 05/17] net/r8169: add support for hw config


External mail.



On 11/8/2024 12:11 PM, Howard Wang wrote:
> Implement the rtl_hw_config function to configure the hardware.
>
> Signed-off-by: Howard Wang <howard_wang at realsil.com.cn>
>

<...>

> +void
> +rtl_nic_reset(struct rtl_hw *hw)
> +{
> +     int i;
> +
> +     rtl_disable_rx_packet_filter(hw);
> +
> +     rtl_enable_rxdvgate(hw);
> +
> +     rtl_stop_all_request(hw);
> +
> +     rtl_wait_txrx_fifo_empty(hw);
> +
> +     rte_delay_ms(2);
> +
> +     /* Soft reset the chip. */
> +     RTL_W8(hw, ChipCmd, CmdReset);
> +
> +     /* Check that the chip has finished the reset. */
> +     for (i = 100; i > 0; i--) {
> +             rte_delay_us(100);
> +             if ((RTL_R8(hw, ChipCmd) & CmdReset) == 0)
> +                     break;
> +     }
> +}
>

Can you please make functions static as much as possible? Like above 'rtl_nic_reset()' seems can be static.
That is OK keep as it is if functions will be called later in the set.



More information about the dev mailing list