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@xxxxxxxxxxxxxx> > Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx> [...] Reviewed-by: Sergey Shtylyov <s.shtylyov@xxxxxx> [...] > 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