[PATCH v1] net/axgbe: read and save the port property register

Ferruh Yigit ferruh.yigit at amd.com
Tue Jan 9 11:35:07 CET 2024


On 1/5/2024 11:32 AM, Venkat Kumar Ande wrote:
> From: Venkat Kumar Ande <VenkatKumar.Ande at amd.com>
> 
> Read and save the port property registers once during the device probe
> and then use the saved values as they are needed.
> 

Hi Venkat,

Can you please describe what is the motivation/reason for the change?

Is it addressing a functional problem or refactoring for coming feature
etc...?

> Signed-off-by: Venkat Kumar Ande <VenkatKumar.Ande at amd.com>
> ---
>  drivers/net/axgbe/axgbe_ethdev.c   | 21 +++++----
>  drivers/net/axgbe/axgbe_ethdev.h   |  7 +++
>  drivers/net/axgbe/axgbe_phy_impl.c | 68 ++++++++++++------------------
>  3 files changed, 48 insertions(+), 48 deletions(-)
> 
> diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c
> index f174d46143..3450374535 100644
> --- a/drivers/net/axgbe/axgbe_ethdev.c
> +++ b/drivers/net/axgbe/axgbe_ethdev.c
> @@ -2342,23 +2342,28 @@ eth_axgbe_dev_init(struct rte_eth_dev *eth_dev)
>  	pdata->arcache = AXGBE_DMA_OS_ARCACHE;
>  	pdata->awcache = AXGBE_DMA_OS_AWCACHE;
>  
> +	/* Read the port property registers */
> +	pdata->pp0 = XP_IOREAD(pdata, XP_PROP_0);
> +	pdata->pp1 = XP_IOREAD(pdata, XP_PROP_1);
> +	pdata->pp2 = XP_IOREAD(pdata, XP_PROP_2);
> +	pdata->pp3 = XP_IOREAD(pdata, XP_PROP_3);
> +	pdata->pp4 = XP_IOREAD(pdata, XP_PROP_4);
> +

<...>



More information about the dev mailing list