Subject: Re: [PATCH net V1] net: lan743x: Add set RFE read fifo threshold for PCI1x1x chips

From: Jakub Kicinski <[email-masked]>
Date: Mon, 25 Mar 2024 19:53:30 -0700

On Fri, 22 Mar 2024 12:16:50 +0530 Raju Lakkaraju wrote:
> +static int pci11x1x_set_rfe_rd_fifo_threshold(struct lan743x_adapter *adapter)

Let's make this a void function.
It only returns 0 and the caller doesn't check for errors, anyway.

> +{
> +	u16 rev = adapter->csr.id_rev & ID_REV_CHIP_REV_MASK_;
> +
> +	if (rev == ID_REV_CHIP_REV_PCI11X1X_B0_) {
> +		u32 misc_ctl;
> +
> +		misc_ctl = lan743x_csr_read(adapter, MISC_CTL_0);
> +		misc_ctl &= ~MISC_CTL_0_RFE_READ_FIFO_MASK_;
> +		misc_ctl |= FIELD_PREP(MISC_CTL_0_RFE_READ_FIFO_MASK_,
> +				       RFE_RD_FIFO_TH_3_DWORDS);
> +		lan743x_csr_write(adapter, MISC_CTL_0, misc_ctl);
> +	}
> +
> +	return 0;
> +}
> +
>  static int lan743x_hardware_init(struct lan743x_adapter *adapter,
>  				 struct pci_dev *pdev)
>  {
> @@ -3287,6 +3306,7 @@ static int lan743x_hardware_init(struct lan743x_adapter *adapter,
>  		pci11x1x_strap_get_status(adapter);
>  		spin_lock_init(&adapter->eth_syslock_spinlock);
>  		mutex_init(&adapter->sgmii_rw_lock);
> +		pci11x1x_set_rfe_rd_fifo_threshold(adapter);
-- 
pw-bot: cr