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_w...@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.

Reply via email to