[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <207bfde9-2b34-a582-408c-1def6ceec031@omp.ru>
Date: Tue, 5 Oct 2021 22:14:48 +0300
From: Sergey Shtylyov <s.shtylyov@....ru>
To: Biju Das <biju.das.jz@...renesas.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>
CC: Sergei Shtylyov <sergei.shtylyov@...il.com>,
Geert Uytterhoeven <geert+renesas@...der.be>,
Sergey Shtylyov <s.shtylyov@...russia.ru>,
"Adam Ford" <aford173@...il.com>, Andrew Lunn <andrew@...n.ch>,
Yuusuke Ashizuka <ashiduka@...itsu.com>,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>,
<netdev@...r.kernel.org>, <linux-renesas-soc@...r.kernel.org>,
Chris Paterson <Chris.Paterson2@...esas.com>,
Biju Das <biju.das@...renesas.com>,
"Prabhakar Mahadev Lad" <prabhakar.mahadev-lad.rj@...renesas.com>
Subject: Re: [RFC 04/12] ravb: Fillup ravb_alloc_rx_desc_gbeth() stub
On 10/5/21 2:06 PM, Biju Das wrote:
> Fillup ravb_alloc_rx_desc_gbeth() function to support RZ/G2L.
>
> This patch also renames ravb_alloc_rx_desc to ravb_alloc_rx_desc_rcar
> to be consistent with the naming convention used in sh_eth driver.
>
> Signed-off-by: Biju Das <biju.das.jz@...renesas.com>
> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
[...]
Reviewed-by: Sergey Shtylyov <s.shtylyov@....ru>
[...]
> diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
> index 37f50c041114..31de4e544525 100644
> --- a/drivers/net/ethernet/renesas/ravb_main.c
> +++ b/drivers/net/ethernet/renesas/ravb_main.c
[...]
> -static void *ravb_alloc_rx_desc(struct net_device *ndev, int q)
> +static void *ravb_alloc_rx_desc_rcar(struct net_device *ndev, int q)
> {
> struct ravb_private *priv = netdev_priv(ndev);
> unsigned int ring_size;
> @@ -1085,16 +1092,25 @@ static int ravb_poll(struct napi_struct *napi, int budget)
> struct net_device *ndev = napi->dev;
> struct ravb_private *priv = netdev_priv(ndev);
> const struct ravb_hw_info *info = priv->info;
> + bool gptp = info->gptp || info->ccc_gac;
> + struct ravb_rx_desc *desc;
> unsigned long flags;
> int q = napi - priv->napi;
> int mask = BIT(q);
> int quota = budget;
> + unsigned int entry;
>
> + if (!gptp) {
> + entry = priv->cur_rx[q] % priv->num_rx_ring[q];
> + desc = &priv->gbeth_rx_ring[entry];
> + }
> /* Processing RX Descriptor Ring */
> /* Clear RX interrupt */
> ravb_write(ndev, ~(mask | RIS0_RESERVED), RIS0);
> - if (ravb_rx(ndev, "a, q))
> - goto out;
> + if (gptp || desc->die_dt != DT_FEMPTY) {
> + if (ravb_rx(ndev, "a, q))
> + goto out;
> + }
Not sure I understand this new logic around the ravb_rx() call, care to explain?
[...]
MBR, Sergey
Powered by blists - more mailing lists