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

Ande, Venkat Kumar VenkatKumar.Ande at amd.com
Tue Jan 9 12:14:49 CET 2024


[AMD Official Use Only - General]

Hi Ferruh,

This change will be refactoring for future code readability of AMD AXGBE driver.

Regards,
Venkat

-----Original Message-----
From: Yigit, Ferruh <Ferruh.Yigit at amd.com>
Sent: Tuesday, January 9, 2024 4:05 PM
To: Ande, Venkat Kumar <VenkatKumar.Ande at amd.com>; dev at dpdk.org
Cc: Sebastian, Selwin <Selwin.Sebastian at amd.com>
Subject: Re: [PATCH v1] net/axgbe: read and save the port property register

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